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:
parent
160d02d830
commit
bfdccf09c7
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue