Bug #12089
closed
Raise not stable NameError
Added by alpaca-tc (Hiroyuki Ishii) almost 9 years ago.
Updated over 8 years ago.
Description
Is this intentional?
irb(main):001:0> Object.const_get('A')
NameError: uninitialized constant Object::A
irb(main):002:0> :A
=> :A
irb(main):003:0> Object.const_get('A')
NameError: uninitialized constant A
- Status changed from Open to Closed
Applied in changeset r53875.
object.c: fix error message
- object.c (rb_mod_const_get): make error message at uninterned
string consistent with symbols. [ruby-dev:49498] [Bug #12089]
- Backport set to 2.3: REQUIRED
- Related to Bug #12121: 異なる名前空間にある同名の定数により Module.constans の結果の並びが変わる added
- Related to deleted (Bug #12121: 異なる名前空間にある同名の定数により Module.constans の結果の並びが変わる)
- Backport changed from 2.3: REQUIRED to 2.3: DONE
ruby_2_3 r54408 merged revision(s) 53875.
Also available in: Atom
PDF
Like0
Like0Like0Like0Like0Like0