mirror of
https://github.com/ruby/ruby.git
synced 2025-09-24 04:54:01 +02:00
* string.c (rb_str_inspect): refix r40413, on Ruby 1.9 usual character
escape uses hex/Unicode escapes, so fix to use Unicode escape on Unicode strings and hex on others. [ruby-core:54458] [Bug #8290] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
bac8fa5f9d
commit
a5fadaadd3
4 changed files with 12 additions and 9 deletions
|
@ -609,7 +609,7 @@ class TestModule < Test::Unit::TestCase
|
|||
assert_raise(TypeError, bug5084) { c1.const_get(1) }
|
||||
bug7574 = '[ruby-dev:46749]'
|
||||
e = assert_raise(NameError) { Object.const_get("String\0") }
|
||||
assert_equal("wrong constant name \"String\\000\"", e.message, bug7574)
|
||||
assert_equal("wrong constant name \"String\\u0000\"", e.message, bug7574)
|
||||
end
|
||||
|
||||
def test_const_defined_invalid_name
|
||||
|
@ -619,7 +619,7 @@ class TestModule < Test::Unit::TestCase
|
|||
assert_raise(TypeError, bug5084) { c1.const_defined?(1) }
|
||||
bug7574 = '[ruby-dev:46749]'
|
||||
e = assert_raise(NameError) { Object.const_defined?("String\0") }
|
||||
assert_equal("wrong constant name \"String\\000\"", e.message, bug7574)
|
||||
assert_equal("wrong constant name \"String\\u0000\"", e.message, bug7574)
|
||||
end
|
||||
|
||||
def test_const_get_no_inherited
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue