You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class BetterArray < Array
def test
@count += 1
end
end
class WayBetterArray < BetterArray
attr_reader :count
def test
@count = 1
super
end
end
describe Array do
it "should call super" do
WayBetterArray.new.test.should == 2
end
end
Thanks
The text was updated successfully, but these errors were encountered:
opal:master ⤑ be bin/opal -e ' ~/C/opal
class BetterArray < Array
def test
@count += 1
end
end
class WayBetterArray < BetterArray
attr_reader :count
def test
@count = 1
super
end
end
p WayBetterArray.new.test
'
2
opal:master ⤑ ~/C/opal
Found an issue with super on arrays.
Thanks
The text was updated successfully, but these errors were encountered: