summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-29 03:51:39 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-29 03:51:39 +0000
commitb9432e7630f3a85944730b3ba1b1aa4a8a753612 (patch)
tree3c1ce159a05496750bd33ecda07dc34aa3757c15 /test
parent7e53b3b6bab79ee56de54b8ad62d7026f9a1f603 (diff)
* load.c (rb_provide_feature): clarify error message for frozen
$LOADED_FEATURES. based on a patch from Run Paint Run Run at [ruby-core:31913]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_require.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_require.rb b/test/ruby/test_require.rb
index 6de5659e54..f87de90ab9 100644
--- a/test/ruby/test_require.rb
+++ b/test/ruby/test_require.rb
@@ -310,4 +310,11 @@ class TestRequire < Test::Unit::TestCase
}
}
end
+
+ def test_frozen_loaded_features
+ bug3756 = '[ruby-core:31913]'
+ assert_in_out_err(['-e', '$LOADED_FEATURES.freeze; require "ostruct"'], "",
+ [], /\$LOADED_FEATURES is frozen; cannot append feature \(RuntimeError\)$/,
+ bug3756)
+ end
end