diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-04-04 06:46:53 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-04-04 06:46:53 +0000 |
commit | 9f87297c21e2e375990166214327634b212e50fb (patch) | |
tree | ea6a848e51d294fe2f43fc99566a4a8217a7945f /test/-ext- | |
parent | 80748440654f93d40a97d0f4fb287f5d268c7cfd (diff) | |
download | ruby-9f87297c21e2e375990166214327634b212e50fb.tar.gz |
enum.c: avoid inadvertent symbol creation
* enum.c (enum_inject): avoid inadvertent symbol creation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/-ext-')
-rw-r--r-- | test/-ext-/symbol/test_inadvertent_creation.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/-ext-/symbol/test_inadvertent_creation.rb b/test/-ext-/symbol/test_inadvertent_creation.rb index 96a0dafc4b..247a42cab3 100644 --- a/test/-ext-/symbol/test_inadvertent_creation.rb +++ b/test/-ext-/symbol/test_inadvertent_creation.rb @@ -187,5 +187,11 @@ module Test_Symbol assert_not_send([Thread.current, :thread_variable?, name]) assert_not_send([Bug::Symbol, :interned?, name]) end + + def test_enumerable_inject_op + name = noninterned_name + assert_raise(NoMethodError) {[1, 2].inject(name)} + assert_not_send([Bug::Symbol, :interned?, name]) + end end end |