mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test/ruby/test_refinement.rb: prevent "assigned but unused variable"
This commit is contained in:
parent
f691c15792
commit
702961a88b
1 changed files with 1 additions and 1 deletions
|
@ -2490,7 +2490,7 @@ class TestRefinement < Test::Unit::TestCase
|
|||
|
||||
def test_defining_after_cached
|
||||
klass = Class.new
|
||||
refinement = Module.new { refine(klass) { def foo; end } }
|
||||
_refinement = Module.new { refine(klass) { def foo; end } }
|
||||
klass.new.foo rescue nil # cache the refinement method entry
|
||||
klass.define_method(:foo) { 42 }
|
||||
assert_equal(42, klass.new.foo)
|
||||
|
|
Loading…
Reference in a new issue