diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-09-06 04:15:49 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-09-06 04:15:49 +0000 |
commit | 3a6c3a672feeafb46f682b68295dd9a13f5b4725 (patch) | |
tree | 4018cd9e01beb8a98a4b16475266decaeac2236b /test | |
parent | a1c5ebe7875cd1b59865fe6c2b88c7981a25939d (diff) | |
download | ruby-3a6c3a672feeafb46f682b68295dd9a13f5b4725.tar.gz |
* encoding.c (load_encoding): predefined encoding names are safe.
[ruby-dev:44469] [Bug #5279]
* transcode.c (load_transcoder_entry): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_encoding.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_encoding.rb b/test/ruby/test_encoding.rb index 6a406ae237..3e2ad5d0d2 100644 --- a/test/ruby/test_encoding.rb +++ b/test/ruby/test_encoding.rb @@ -99,4 +99,9 @@ class TestEncoding < Test::Unit::TestCase str2 = Marshal.load(Marshal.dump(str2)) assert_equal(str, str2, '[ruby-dev:38596]') end + + def test_unsafe + bug5279 = '[ruby-dev:44469]' + assert_ruby_status([], '$SAFE=3; "a".encode("utf-16be")', bug5279) + end end |