lib/windows/limits.rb in windows-pr-1.2.4 vs lib/windows/limits.rb in windows-pr-1.2.5

- old
+ new

@@ -1,34 +1,34 @@ -module Windows - module Limits - private - - MINCHAR = 0x80 - MAXCHAR = 0x7f - MINSHORT = 0x8000 - MAXSHORT = 0x7fff - MINLONG = 0x80000000 - MAXLONG = 0x7fffffff - MAXBYTE = 0xff - MAXWORD = 0xffff - MAXDWORD = 0xffffffff - - # For wide character functions the actual path limit is actually 32k - # for most functions that deal with paths, but in the interests of not - # wasting huge chunks of memory on buffers I limit it to 1k, which - # should be more than enough in practice. - # - if RUBY_VERSION.to_f >= 1.9 - if __ENCODING__.name == 'UTF-8' - MAXPATH = 1024 - else - MAXPATH = 256 - end - else - if $KCODE == 'UTF8' - MAXPATH = 1024 - else - MAXPATH = 256 - end - end - end -end +module Windows + module Limits + private + + MINCHAR = 0x80 + MAXCHAR = 0x7f + MINSHORT = 0x8000 + MAXSHORT = 0x7fff + MINLONG = 0x80000000 + MAXLONG = 0x7fffffff + MAXBYTE = 0xff + MAXWORD = 0xffff + MAXDWORD = 0xffffffff + + # For wide character functions the actual path limit is actually 32k + # for most functions that deal with paths, but in the interests of not + # wasting huge chunks of memory on buffers I limit it to 1k, which + # should be more than enough in practice. + # + if RUBY_VERSION.to_f >= 1.9 + if __ENCODING__.name == 'UTF-8' + MAXPATH = 1024 + else + MAXPATH = 256 + end + else + if $KCODE == 'UTF8' + MAXPATH = 1024 + else + MAXPATH = 256 + end + end + end +end