Bug #7574
closed名前についてのエラーメッセージが正しくない事がある
Description
名前についてのエラーメッセージが正しくない事がある。
$ ruby -v -e 'instance_variable_get("@foo\000")'
ruby 2.0.0dev (2012-12-16 trunk 38415) [i686-linux]
-e:1:in instance_variable_get':
@foo' is not allowed as an instance variable name (NameError)
$ ruby -v -e 'Object.class_variable_get("@@foo\000")'
ruby 2.0.0dev (2012-12-16 trunk 38415) [i686-linux]
-e:1:in class_variable_get':
@@foo' is not allowed as a class variable name (NameError)
$ ruby -v -e 'Object.const_set("FOO\000", 9)'
ruby 2.0.0dev (2012-12-16 trunk 38415) [i686-linux]
-e:1:in `const_set': wrong constant name FOO (NameError)
$ ruby -v -e 'Object.const_get("FOO\000")'
ruby 2.0.0dev (2012-12-16 trunk 38415) [i686-linux]
-e:1:in `const_get': uninitialized constant FOO (NameError)
$ ruby -v -e 'send("foo\000")'
ruby 2.0.0dev (2012-12-16 trunk 38415) [i686-linux]
-e:1:in <main>': undefined method
foo' for main:Object (NoMethodError)
Updated by ko1 (Koichi Sasada) about 12 years ago
- Assignee set to nobu (Nobuyoshi Nakada)
Updated by usa (Usaku NAKAMURA) about 12 years ago
- Status changed from Open to Assigned
Updated by nobu (Nobuyoshi Nakada) almost 12 years ago
- Status changed from Assigned to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r38558.
tadayoshi, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
internal.h: quote unprintable
- internal.h (QUOTE, QUOTE_ID): quote unprintable chars in strings and
IDs. [Bug #7574] [ruby-dev:46749] - string.c (rb_str_quote_unprintable): ditto.