aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-19 02:49:21 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-19 02:49:21 +0000
commit22198f9d3c384dbc3e95b953d71a07de12da652b (patch)
treee1bb86e51a4e0b699fda7b0b32129d143a44691c /test
parent4eb908d21a64bf147f4e5a891a7f10cf963c46b6 (diff)
downloadruby-22198f9d3c384dbc3e95b953d71a07de12da652b.tar.gz
test_iseq.rb: shorten
* test/ruby/test_iseq.rb (TestISeq): use the utility method to get rid of warnings and the alias to shorten. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_iseq.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/ruby/test_iseq.rb b/test/ruby/test_iseq.rb
index 501043eab2..f9123109f7 100644
--- a/test/ruby/test_iseq.rb
+++ b/test/ruby/test_iseq.rb
@@ -10,7 +10,7 @@ class TestISeq < Test::Unit::TestCase
def compile(src, line = nil, opt = nil)
EnvUtil.suppress_warning do
- RubyVM::InstructionSequence.new(src, __FILE__, __FILE__, line, opt)
+ ISeq.new(src, __FILE__, __FILE__, line, opt)
end
end
@@ -52,9 +52,9 @@ class TestISeq < Test::Unit::TestCase
end
def test_unsupport_type
- ary = RubyVM::InstructionSequence.compile("p").to_a
+ ary = compile("p").to_a
ary[9] = :foobar
- assert_raise_with_message(TypeError, /:foobar/) {RubyVM::InstructionSequence.load(ary)}
+ assert_raise_with_message(TypeError, /:foobar/) {ISeq.load(ary)}
end if defined?(RubyVM::InstructionSequence.load)
def test_loaded_cdhash_mark
@@ -98,7 +98,7 @@ class TestISeq < Test::Unit::TestCase
end
def test_line_trace
- iseq = ISeq.compile \
+ iseq = compile \
%q{ a = 1
b = 2
c = 3
@@ -163,9 +163,9 @@ class TestISeq < Test::Unit::TestCase
def test_invalid_source
bug11159 = '[ruby-core:69219] [Bug #11159]'
- assert_raise(TypeError, bug11159) {ISeq.compile(nil)}
- assert_raise(TypeError, bug11159) {ISeq.compile(:foo)}
- assert_raise(TypeError, bug11159) {ISeq.compile(1)}
+ assert_raise(TypeError, bug11159) {compile(nil)}
+ assert_raise(TypeError, bug11159) {compile(:foo)}
+ assert_raise(TypeError, bug11159) {compile(1)}
end
def test_frozen_string_literal_compile_option