1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

use super in h.default

* test/ruby/test_hash.rb (TestHash#test_shift_none): super in
  singleton default method doesn't cause SystemStackError now.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2012-03-31 08:13:58 +00:00
parent 160d02d830
commit bfdccf09c7

View file

@ -742,7 +742,7 @@ class TestHash < Test::Unit::TestCase
def test_shift_none
h = Hash.new {|hh, k| "foo"}
def h.default(k = nil)
default_proc.call(k).upcase
super.upcase
end
assert_equal("FOO", h.shift)
end