Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem of chinese method name #3819

Closed
catfishuang opened this issue Apr 21, 2016 · 1 comment
Closed

problem of chinese method name #3819

catfishuang opened this issue Apr 21, 2016 · 1 comment

Comments

@catfishuang
Copy link

Environment

jruby 9.0.5.0 (2.2.3) 2016-01-26 7bee00d Java HotSpot(TM) 64-Bit Server VM 24.79-b02 on 1.7.0_79-b15 +jit [Windows 7-amd64]

Expected Behavior

def 牛逼
puts '111'
end

牛逼 # It's OK

@name = "中文"
send :define_method,:"#{@name}" do
puts "中文test"
end

中文 # Error occur but it run well in cruby

Actual Behavior

NameError: undefined local variable or method `??' for main:Object

@catfishuang catfishuang changed the title chinese method problem problem of chinese method name Apr 21, 2016
@enebo enebo added this to the Invalid or Duplicate milestone Apr 21, 2016
@enebo
Copy link
Member

enebo commented Apr 21, 2016

This symbol issue with define_method was fixed a couple of weeks ago. Works on master. 9.1.0.0 will work for you.

@enebo enebo closed this as completed Apr 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants