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

Define method with GBK name by using 'def' has wrong symbol name #4580

Closed
pbl-pw opened this issue Apr 29, 2017 · 1 comment
Closed

Define method with GBK name by using 'def' has wrong symbol name #4580

pbl-pw opened this issue Apr 29, 2017 · 1 comment
Milestone

Comments

@pbl-pw
Copy link

pbl-pw commented Apr 29, 2017

Refer to #3347 GBK symbol is now ok. But define method by 'def' still has problem.
For exsample:

# encoding : GBK
# frozen_string_literal: true

class CTT
	def 测试
		puts "#{__callee__} : first"
	end
	define_method(:测试){
		puts "#{__callee__} : second"
	}
end

obj = CTT.new
obj.测试
obj.send :测试

jruby 9.1.9.0-SNAPSHOT (2.3.3) 2017-04-28 ee137a8 Java HotSpot(TM) Client VM 25.131-b11 on 1.8.0_131-b11 +jit [mswin32-x86] output:

?? : first
测试 : second

MRI output:

测试 : second
测试 : second
@kares
Copy link
Member

kares commented Jun 20, 2018

resolved in JRuby 9.2 with reworded (byte-list) identifiers

测试 : second
测试 : second

@kares kares closed this as completed Jun 20, 2018
@kares kares added this to the JRuby 9.2.0.0 milestone Jun 20, 2018
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