Skip to content

support for easy (Ruby) String to (Java) char conversion#2549

Merged
enebo merged 2 commits intojruby:jruby-1_7from
kares:test-string-to-char
Feb 5, 2015
Merged

support for easy (Ruby) String to (Java) char conversion#2549
enebo merged 2 commits intojruby:jruby-1_7from
kares:test-string-to-char

Conversation

@kares
Copy link
Member

@kares kares commented Feb 2, 2015

currently one can 42.to_java(:char) to get a char (java.lang.Character) instance put it's certainly not the most obvious way to do it.

this PR adds support for converting strings of length 1 to (native) char objects e.g. 'A'.to_java(:char)

@enebo enebo added this to the JRuby 1.7.20 milestone Feb 5, 2015
enebo added a commit that referenced this pull request Feb 5, 2015
support for easy (Ruby) String to (Java) char conversion.  Don't see how this can break anyone realistically as a new feature.
@enebo enebo merged commit d827ef2 into jruby:jruby-1_7 Feb 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants