summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-12-25 17:25:02 +0000
committerkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-12-25 17:25:02 +0000
commit085e40d45b94285415e4a9909a32fc0532a210c3 (patch)
tree8d692fb76f7dadf26797a968c22e14b4de1663ec /test
parent6bd4afaab89b7542eac3273fce55e02e61edb828 (diff)
* io.c (advice_arg_check): Change argument check.
Now, an unsupported advice makes NotImplementedError. [ruby-dev:42887] [Ruby 1.9-Feature#4204] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_io.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb
index b3d543fc2f..6cc2897f5f 100644
--- a/test/ruby/test_io.rb
+++ b/test/ruby/test_io.rb
@@ -1763,10 +1763,15 @@ End
end
end
end
+ end
+
+ def test_invalid_advise
+ feature4204 = '[ruby-dev:42887]'
+ t = make_tempfile
%w{Normal rand glark will_need zzzzzzzzzzzz \u2609}.map(&:to_sym).each do |adv|
[[0,0], [0, 20], [400, 2]].each do |offset, len|
open(make_tempfile.path) do |t|
- assert_equal(t.advise(adv, offset, len), nil)
+ assert_raise(NotImplementedError, feature4204) { t.advise(adv, offset, len) }
end
end
end