mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Make MRuby::Gems::List#{each,<<} method return self
Returning internal objects is undesirable.
This commit is contained in:
@@ -372,6 +372,7 @@ module MRuby
|
||||
|
||||
def each(&b)
|
||||
@ary.each(&b)
|
||||
self
|
||||
end
|
||||
|
||||
def [](name)
|
||||
@@ -384,6 +385,7 @@ module MRuby
|
||||
else
|
||||
# GEM was already added to this list
|
||||
end
|
||||
self
|
||||
end
|
||||
|
||||
def empty?
|
||||
|
||||
Reference in New Issue
Block a user