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

Multi-byte method name is not compatible with CRuby #4668

Closed
jakago opened this issue Jun 14, 2017 · 1 comment
Closed

Multi-byte method name is not compatible with CRuby #4668

jakago opened this issue Jun 14, 2017 · 1 comment
Milestone

Comments

@jakago
Copy link

jakago commented Jun 14, 2017

blah.rb

# coding: utf-8

# 'α'.bytes => [206, 177]
class Blah
  def α
    p __method__
    p __method__.to_s
    p :α
    p 'α'
    p __method__ == :α
    p __method__.to_s == 'α'
  end
end

Blah.new.α

Environment

ruby 2.3.4p301 (2017-03-30 revision 58214) [x86_64-darwin15]

jruby 9.1.9.0 (2.3.3) 2017-05-15 28aa830 Java HotSpot(TM) 64-Bit Server VM 25.121-b13 on 1.8.0_121-b13 +jit [darwin-x86_64]

Darwin mac-mini.local 15.6.0 Darwin Kernel Version 15.6.0: Mon Jan 9 23:07:29 PST 2017; root:xnu-3248.60.11.2.1~1/RELEASE_X86_64 x86_64

Expected Behavior

$ ruby -v
ruby 2.3.4p301 (2017-03-30 revision 58214) [x86_64-darwin15]
$ ruby blah.rb
:α
"α"
:α
"α"
true
true

Actual Behavior

$ jruby -v
jruby 9.1.9.0 (2.3.3) 2017-05-15 28aa830 Java HotSpot(TM) 64-Bit Server VM 25.121-b13 on 1.8.0_121-b13 +jit [darwin-x86_64]
$ jruby blah.rb
:?
"?"
:α
"α"
false
false
@kares
Copy link
Member

kares commented Jun 20, 2018

has been resolved in JRuby 9.2 ... won't be back-ported in 9.1 since its a massive change

jruby 9.2.1.0-SNAPSHOT (2.5.0) 2018-06-19 0303b01 Java HotSpot(TM) 64-Bit Server VM 25.171-b11 on 1.8.0_171-b11 +jit [linux-x86_64]
:α
"α"
:α
"α"
true
true

@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