summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_iseq.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ruby/test_iseq.rb b/test/ruby/test_iseq.rb
index f05d067ac2..b0896511d8 100644
--- a/test/ruby/test_iseq.rb
+++ b/test/ruby/test_iseq.rb
@@ -798,4 +798,15 @@ class TestISeq < Test::Unit::TestCase
result = RubyVM::InstructionSequence.load_from_binary(iseq.to_binary).eval
assert_equal expected, result, proc {sprintf("expected: %x, result: %x", expected, result)}
end
+
+ def test_compile_prism_with_file
+ Tempfile.create(%w"test_iseq .rb") do |f|
+ f.puts "name = 'Prism'; puts 'hello"
+ f.close
+
+ assert_nothing_raised(SyntaxError) {
+ RubyVM::InstructionSequence.compile_prism(f.path)
+ }
+ end
+ end
end