Take the 2008 Git User's Survey and help out! [ hide ]

public
Description: Rubinius, the Ruby VM
Homepage: http://rubini.us
Clone URL: git://github.com/evanphx/rubinius.git
Search Repo:
Remove trailing whitespace
drbrain (author)
Wed May 14 16:33:55 -0700 2008
commit  6d087b592a71bc7a401714e18f6996cbca17f8c7
tree    df932fc02c35558440dcc9b03fd207256956b7f1
parent  9ee378da5e8a5bc110ec0986fd46215f27f54395
...
4
5
6
7
 
8
9
10
...
61
62
63
64
 
65
66
67
...
96
97
98
99
 
100
101
102
...
224
225
226
227
 
228
229
230
231
232
233
234
 
 
235
236
237
...
242
243
244
245
 
246
247
248
...
274
275
276
277
 
278
279
280
...
289
290
291
292
 
293
294
295
...
302
303
304
305
 
306
307
308
 
309
310
311
...
318
319
320
321
 
322
323
324
...
344
345
346
347
 
348
349
 
350
351
352
353
 
 
354
355
356
...
484
485
486
487
 
488
489
490
491
 
492
493
494
...
563
564
565
566
 
567
568
569
...
571
572
573
574
 
575
576
577
...
581
582
583
584
 
585
586
587
588
 
589
590
591
592
 
593
594
595
596
597
598
 
599
600
601
602
603
 
604
605
606
...
640
641
642
643
 
644
645
646
...
651
652
653
654
 
655
656
657
658
659
660
 
661
662
663
664
 
665
666
667
668
 
669
670
671
672
 
673
674
675
...
681
682
683
684
 
685
686
687
688
 
689
690
691
692
693
 
694
695
696
...
741
742
743
744
 
745
746
747
...
749
750
751
752
 
753
754
755
...
761
762
763
764
 
765
766
767
768
 
769
770
771
772
 
773
774
775
...
777
778
779
780
 
781
782
783
...
785
786
787
788
 
789
790
791
792
793
 
794
795
796
797
798
 
799
800
801
...
813
814
815
816
 
817
818
819
...
829
830
831
832
 
833
834
835
...
847
848
849
850
 
851
852
853
...
4
5
6
 
7
8
9
10
...
61
62
63
 
64
65
66
67
...
96
97
98
 
99
100
101
102
...
224
225
226
 
227
228
229
230
231
232
 
 
233
234
235
236
237
...
242
243
244
 
245
246
247
248
...
274
275
276
 
277
278
279
280
...
289
290
291
 
292
293
294
295
...
302
303
304
 
305
306
307
 
308
309
310
311
...
318
319
320
 
321
322
323
324
...
344
345
346
 
347
348
 
349
350
351
 
 
352
353
354
355
356
...
484
485
486
 
487
488
489
490
 
491
492
493
494
...
563
564
565
 
566
567
568
569
...
571
572
573
 
574
575
576
577
...
581
582
583
 
584
585
586
587
 
588
589
590
591
 
592
593
594
595
596
597
 
598
599
600
601
602
 
603
604
605
606
...
640
641
642
 
643
644
645
646
...
651
652
653
 
654
655
656
657
658
659
 
660
661
662
663
 
664
665
666
667
 
668
669
670
671
 
672
673
674
675
...
681
682
683
 
684
685
686
687
 
688
689
690
691
692
 
693
694
695
696
...
741
742
743
 
744
745
746
747
...
749
750
751
 
752
753
754
755
...
761
762
763
 
764
765
766
767
 
768
769
770
771
 
772
773
774
775
...
777
778
779
 
780
781
782
783
...
785
786
787
 
788
789
790
791
792
 
793
794
795
796
797
 
798
799
800
801
...
813
814
815
 
816
817
818
819
...
829
830
831
 
832
833
834
835
...
847
848
849
 
850
851
852
853
0
@@ -4,7 +4,7 @@ module Platform::POSIX
0
   class TimeVal < FFI::Struct
0
     config 'rbx.platform.timeval', :tv_sec, :tv_usec
0
   end
0
-end
0
+end
0
 
0
 class File < IO
0
 
0
@@ -61,7 +61,7 @@ class File < IO
0
 
0
   def self.after_loaded
0
     private_class_method :dirsep?, :next_path, :range, :name_match
0
-
0
+
0
     # these will be necessary when we run on Windows
0
     const_set :DOSISH, RUBY_PLATFORM.match("mswin")
0
     const_set :CASEFOLD_FILESYSTEM, DOSISH
0
@@ -96,7 +96,7 @@ class File < IO
0
     end
0
     paths.size
0
   end
0
-
0
+
0
   def self.lchmod(mode, *paths)
0
     mode = Type.coerce_to(mode, Integer, :to_int) unless mode.is_a? Integer
0
     paths.each do |path|
0
@@ -224,14 +224,14 @@ class File < IO
0
     pathname = (flags & FNM_PATHNAME) != 0
0
     period = (flags & FNM_DOTMATCH) == 0
0
     nocase = (flags & FNM_CASEFOLD) != 0
0
-
0
+
0
     while pstart < patend do
0
       char = pattern[pstart]
0
       pstart += 1
0
       case char
0
       when ??
0
- if (index >= strend || (pathname && dirsep?(str[index])) ||
0
- (period && str[index] == ?. && (index == 0 ||
0
+ if (index >= strend || (pathname && dirsep?(str[index])) ||
0
+ (period && str[index] == ?. && (index == 0 ||
0
             (pathname && dirsep?(str[index-1])))))
0
           return false
0
         end
0
@@ -242,7 +242,7 @@ class File < IO
0
           pstart += 1
0
           break unless char == ?*
0
         end
0
- if (index < strend && (period && str[index] == ?. &&
0
+ if (index < strend && (period && str[index] == ?. &&
0
             (index == 0 || (pathname && dirsep?(str[index-1])))))
0
           return false
0
         end
0
@@ -274,7 +274,7 @@ class File < IO
0
           return false
0
         end
0
       when ?[
0
- if (index >= strend || (pathname && dirsep?(str[index]) ||
0
+ if (index >= strend || (pathname && dirsep?(str[index]) ||
0
             (period && str[index] == ?. && (index == 0 || (pathname && dirsep?(str[index-1]))))))
0
           return false
0
         end
0
@@ -289,7 +289,7 @@ class File < IO
0
           end
0
         end
0
         return false if index >= strend
0
-
0
+
0
         if DOSISH && (pathname && isdirsep?(char) && dirsep?(str[index]))
0
           # TODO: invert this boolean expression
0
         else
0
@@ -302,10 +302,10 @@ class File < IO
0
         index += 1
0
       end
0
     end
0
-
0
+
0
     index >= strend ? true : false
0
   end
0
-
0
+
0
   def self.fnmatch(pattern, path, flags=0)
0
     pattern = StringValue(pattern).dup
0
     path = StringValue(path).dup
0
@@ -318,7 +318,7 @@ class File < IO
0
   end
0
 
0
   def self.grpowned?(path)
0
- begin
0
+ begin
0
       lstat(path).grpowned?
0
     rescue
0
       false
0
@@ -344,13 +344,13 @@ class File < IO
0
   def self.join(*parts)
0
     parts.map! do |part|
0
       if part.kind_of? Array
0
-
0
+
0
         cur_part = part.send(:remove_outer_arrays)
0
-
0
+
0
         if cur_part.any?{ |e| e.__id__ == cur_part.__id__ }
0
           cur_part = cur_part.dup
0
- end
0
-
0
+ end
0
+
0
         clean_part = []
0
         cur_part.send(:recursively_flatten,cur_part,clean_part,'[...]')
0
         clean_part
0
@@ -484,11 +484,11 @@ class File < IO
0
     unless self.exist?(path)
0
       raise Errno::ENOENT, path
0
     end
0
-
0
+
0
     unless length.respond_to?(:to_int)
0
       raise TypeError, "can't convert #{length.class} into Integer"
0
     end
0
-
0
+
0
     n = POSIX.truncate(path, length)
0
     Errno.handle if n == -1
0
     n
0
@@ -563,7 +563,7 @@ class File < IO
0
     mode = Type.coerce_to(mode, Integer, :to_int) unless mode.is_a? Integer
0
     POSIX.fchmod(@descriptor, mode)
0
   end
0
-
0
+
0
   def chown(owner_int, group_int)
0
     POSIX.fchown(@descriptor, owner_int || -1, group_int || -1)
0
   end
0
@@ -571,7 +571,7 @@ class File < IO
0
   def ctime
0
     Stat.new(@path).ctime
0
   end
0
-
0
+
0
   def flock(locking_constant)
0
     result = POSIX.flock(@descriptor, locking_constant)
0
     return false if result == -1
0
@@ -581,26 +581,26 @@ class File < IO
0
   def lstat
0
     Stat.new @path, false
0
   end
0
-
0
+
0
   def mtime
0
     Stat.new(@path).mtime
0
   end
0
-
0
+
0
   def stat
0
     Stat.new @path
0
   end
0
-
0
+
0
   def truncate(length)
0
     length = Type.coerce_to(length, Integer, :to_int)
0
 
0
     raise Errno::EINVAL, "Can't truncate a file to a negative length" if length < 0
0
     raise IOError, "File is closed" if closed?
0
-
0
+
0
     n = POSIX.ftruncate(@descriptor, length)
0
     Errno.handle if n == -1
0
     n
0
   end
0
-
0
+
0
   def inspect
0
     return_string = "#<#{self.class}:0x#{object_id.to_s(16)} path=#{@path}"
0
     return_string << " (closed)" if closed?
0
@@ -640,7 +640,7 @@ class File::Stat
0
   S_ISGID = Rubinius::RUBY_CONFIG['rbx.platform.file.S_ISGID']
0
 
0
   POSIX = Platform::POSIX
0
-
0
+
0
   def initialize(path, follow_links=true)
0
     @path = StringValue path
0
     @stat = Struct.new
0
@@ -651,25 +651,25 @@ class File::Stat
0
     end
0
     Errno.handle @path unless result == 0
0
   end
0
-
0
+
0
   def self.stat?(path, follow_links=true)
0
     new path, follow_links
0
   rescue Errno::ENOENT, Errno::ENOTDIR
0
     nil
0
   end
0
-
0
+
0
   def atime
0
     Time.at @stat[:st_atime]
0
   end
0
-
0
+
0
   def blksize
0
     @stat[:st_blksize]
0
   end
0
-
0
+
0
   def blocks
0
     @stat[:st_blocks]
0
   end
0
-
0
+
0
   def blockdev?
0
     @stat[:st_mode] & S_IFMT == S_IFBLK
0
   end
0
@@ -681,16 +681,16 @@ class File::Stat
0
   def ctime
0
     Time.at @stat[:st_ctime]
0
   end
0
-
0
+
0
   def dev
0
     @stat[:st_dev]
0
   end
0
-
0
+
0
   def dev_major
0
     major = POSIX.major @stat[:st_dev]
0
     major < 0 ? nil : major
0
   end
0
-
0
+
0
   def dev_minor
0
     minor = POSIX.major @stat[:st_dev]
0
     minor < 0 ? nil : minor
0
@@ -741,7 +741,7 @@ class File::Stat
0
   def gid
0
     @stat[:st_gid]
0
   end
0
-
0
+
0
   def grpowned?
0
     @stat[:st_gid] == POSIX.getegid
0
   end
0
@@ -749,7 +749,7 @@ class File::Stat
0
   def ino
0
     @stat[:st_ino]
0
   end
0
-
0
+
0
   def inspect
0
     "#<File::Stat dev=0x#{self.dev.to_s(16)}, ino=#{self.ino}, " \
0
     "mode=#{sprintf("%07d", self.mode.to_s(8).to_i)}, nlink=#{self.nlink}, " \
0
@@ -761,15 +761,15 @@ class File::Stat
0
   def nlink
0
     @stat[:st_nlink]
0
   end
0
-
0
+
0
   def mtime
0
     Time.at @stat[:st_mtime]
0
   end
0
-
0
+
0
   def mode
0
     @stat[:st_mode]
0
   end
0
-
0
+
0
   def owned?
0
     @stat[:st_uid] == POSIX.geteuid
0
   end
0
@@ -777,7 +777,7 @@ class File::Stat
0
   def path
0
     @path
0
   end
0
-
0
+
0
   def pipe?
0
     @stat[:st_mode] & S_IFMT == S_IFIFO
0
   end
0
@@ -785,17 +785,17 @@ class File::Stat
0
   def rdev
0
     @stat[:st_rdev]
0
   end
0
-
0
+
0
   def rdev_major
0
     major = POSIX.major @stat[:st_rdev]
0
     major < 0 ? nil : major
0
   end
0
-
0
+
0
   def rdev_minor
0
     minor = POSIX.minor @stat[:st_rdev]
0
     minor < 0 ? nil : minor
0
   end
0
-
0
+
0
   def readable?
0
     return true if superuser?
0
     return @stat[:st_mode] & S_IRUSR != 0 if owned?
0
@@ -813,7 +813,7 @@ class File::Stat
0
   def size
0
     @stat[:st_size]
0
   end
0
-
0
+
0
   def size?
0
     size == 0 ? nil : size
0
   end
0
@@ -829,7 +829,7 @@ class File::Stat
0
   def uid
0
     @stat[:st_uid]
0
   end
0
-
0
+
0
   def writable?
0
     return true if superuser?
0
     return @stat[:st_mode] & S_IWUSR != 0 if owned?
0
@@ -847,7 +847,7 @@ class File::Stat
0
   def zero?
0
     @stat[:st_size] == 0
0
   end
0
-
0
+
0
   def <=> (other)
0
     return nil unless other.is_a?(File::Stat)
0
     self.mtime <=> other.mtime

Comments

    No one has commented yet.