summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-05 11:32:05 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-05 11:32:05 +0000
commit3a80743ccf57259ada074c1861592fe552c96459 (patch)
tree5ebdfc6cd69dddbfefb1988aa37a63538982e9f4 /test
parent0d49737b4f8fed8bd5224eda57382891c4492f46 (diff)
* re.c (rb_reg_expr_str): ASCII incompatible strings
must always escape or converted. * re.c (rb_reg_expr_str): use rb_str_buf_cat_escaped_char when resenc is given: for Regexp#inspect or error message. * re.c (rb_reg_desc): add 'n' for ENCODING_NONE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_regexp.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ruby/test_regexp.rb b/test/ruby/test_regexp.rb
index 12a2fa96fc..3324a9e8d9 100644
--- a/test/ruby/test_regexp.rb
+++ b/test/ruby/test_regexp.rb
@@ -151,7 +151,7 @@ class TestRegexp < Test::Unit::TestCase
assert_equal('/\x00/i', /#{"\0"}/i.inspect)
assert_equal("/\n/i", /#{"\n"}/i.inspect)
s = [0xff].pack("C")
- assert_equal('/\/'+s+'/i', /\/#{s}/i.inspect)
+ assert_equal('/\/\xFF/i', /\/#{s}/i.inspect)
end
def test_char_to_option