Make MRuby::Gems::List#{each,<<} method return self

Returning internal objects is undesirable.
This commit is contained in:
dearblue
2024-01-20 22:49:31 +09:00
parent f13101124c
commit 464ac4581e
+2
View File
@@ -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?