Actions
Bug #10299
closedalias_method :new_foo=, :"#{:foo}=" doesn't work properly on ruby 2.2.0preview1.
Description
Here is reproducible script.
class Test
class << self
def test
alias_method :new_foo=, :"#{:foo}="
end
end
attr_accessor :foo
test
end
It occurs following error.
NameError: undefined method `foo=' for class `Test'
from /Users/ando_norimasa/a.rb:4:in `alias_method'
I expect it works without error.
Actions
Like0
Like0Like0Like0