Skip to content

Apparent regression with NameError in 9.1.0.0 #3934

@aviflax

Description

@aviflax

Environment

Darwin Avis-Prudence.local 15.4.0 Darwin Kernel Version 15.4.0: Fri Feb 26 22:08:05 PST 2016; root:xnu-3248.40.184~3/RELEASE_X86_64 x86_64

Expected Behavior

The 9.0.5.0 behavior when referencing an undefined name:

$ ruby -v -e 'puts FooBar'
jruby 9.0.5.0 (2.2.3) 2016-01-26 7bee00d Java HotSpot(TM) 64-Bit Server VM 25.77-b03 on 1.8.0_77-b03 +jit [darwin-x86_64]
NameError: uninitialized constant FooBar
  const_missing at org/jruby/RubyModule.java:3212
          <top> at -e:1

I can see that a NameError occurs, which symbol is uninitialized, and the specific location where it was referenced.

Actual Behavior

$ ruby -v -e 'puts FooBar'
jruby 9.1.0.0 (2.3.0) 2016-05-02 a633c63 Java HotSpot(TM) 64-Bit Server VM 25.77-b03 on 1.8.0_77-b03 +jit [darwin-x86_64]
ArgumentError: too many arguments for format string
   to_str at org/jruby/RubyNameError.java:130
     to_s at org/jruby/RubyNameError.java:224
  message at org/jruby/RubyException.java:149

The actual problem has been masked by this ArgumentError.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions