Project

General

Profile

Bug #12837 ยป test_on_non_module.patch

aycabta (aycabta .), 10/13/2016 02:38 PM

View differences:

test/test_forwardable.rb (working copy)
assert_equal(42, -obj)
end
def test_non_module
str = String.new
str.extend Forwardable
str.instance_variable_set("@h", 42)
str.def_delegator("@h", :to_s, :forty_two)
assert_equal("42", str.forty_two)
end
private
def forwardable_class(
    (1-1/1)