diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-08-08 03:41:30 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-08-08 03:41:30 +0000 |
commit | aac4f022e2b4bb601f5068bfc7e25de49493563f (patch) | |
tree | 67412a235ea79a68a8b8daea03a127c274f48208 /test/ruby | |
parent | 98c8e1cd91819042b13eb5aa69d86cb813a9bcaa (diff) | |
download | ruby-aac4f022e2b4bb601f5068bfc7e25de49493563f.tar.gz |
* parse.y (parser_tokadd_escape): no similar messages twice.
[ruby-core:31048]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_regexp.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_regexp.rb b/test/ruby/test_regexp.rb index 35162310db..874b1873e7 100644 --- a/test/ruby/test_regexp.rb +++ b/test/ruby/test_regexp.rb @@ -834,4 +834,11 @@ class TestRegexp < Test::Unit::TestCase def test_property_warn assert_in_out_err('-w', 'x=/\p%s/', [], %r"warning: invalid Unicode Property \\p: /\\p%s/") end + + def test_invalid_escape_error + bug3539 = '[ruby-core:31048]' + error = assert_raise(SyntaxError) {eval('/\x/', nil, bug3539)} + assert_match(/invalid hex escape/, error.message) + assert_equal(1, error.message.scan(/.*invalid .*escape.*/i).size, bug3539) + end end |