Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
String range object incorrectly tries to convert to int #4021
jruby 1.7.25 (1.9.3p551) 2016-04-13 867cb81 on Java HotSpot(TM) 64-Bit Server VM 1.7.0_79-b15 +jit [Windows 7-amd64]
Consider the following programs:
These are string ranges, and it works in MRI Ruby (the first example should return true, and the second one should returne a one-element array). In JRuby, I get an error:
It seems that JRuby tries to convert the range bounds into Java int values!
On Tue, Jul 19, 2016, at 13:33, Karol Bucek wrote:
I don't think so, for two reason: First, the array would contain only 1
I didn't look at the Ruby code, but from the behaviour, a wild guess
Ranges of strings are defined (according to the docs) in terms of the
On Tue, Jul 19, 2016, at 17:53, Karol Bucek wrote:
Thank you for fixing this so quickly. Just a personal question: Why is
causes a conversion to int, while the seemingly similar
works fine. Why is it that not all strings are treated equal in a Range?