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

JRuby 9.1.8.0: Kernel#sprintf() reference-by-name throws ArgumentError. #4524

Closed
clonezone opened this issue Mar 7, 2017 · 3 comments
Closed

Comments

@clonezone
Copy link

Environment

jruby 9.1.8.0 (2.3.1) 2017-03-06 90fc7ab Java HotSpot(TM) 64-Bit Server VM 25.121-b13 on 1.8.0_121-b13 +jit [linux-x86_64]

Ubuntu 14.04: Linux hostname 3.13.0-110-generic #157-Ubuntu SMP Mon Feb 20 11:54:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Expected Behavior

Expect the example from the bottom of the MRI Kernel#sprintf() docs for reference-by name to work: http://ruby-doc.org/core-2.3.1/Kernel.html#method-i-sprintf

Actual Behavior

> jruby -e 'sprintf("%<foo>d : %<bar>f", { :foo => 1, :bar => 2 })'
ArgumentError: name<bar> after <foo>
        % at org/jruby/RubyString.java:1191
  sprintf at org/jruby/RubyKernel.java:811
   <main> at -e:1
@enebo
Copy link
Member

enebo commented Mar 7, 2017

This was just fixed this morning in #4523

@enebo enebo closed this as completed Mar 7, 2017
@enebo
Copy link
Member

enebo commented Mar 7, 2017

@clonezone hey is this occurring as part of a gem? two people reporting it in one day makes me wonder...

@clonezone
Copy link
Author

Nope. I'm running into it as part of my server startup processing its configuration.

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