mruby-dir/dir.rb: make `each_child` as an alias to `each`
MODIFY
mrbgems/mruby-dir/mrblib/dir.rb
mrbgems/mruby-dir/mrblib/dir.rb
class Dir
- def each_child(&block)
+ def each(&block)
while s = self.read
block.call(s)
end
self
end
+ alias each_child each
alias pos tell
alias pos= seek
@@ -22,7 +23,7 @@ class Dir
alias children entries
def foreach(path, &block)
- self.open(path).each_child(&block)
+ self.open(path).each(&block)
end
def open(path, &block)

mruby-dir/dir.rb: make `each_child` as an alias to `each`