実行結果
Exception in thread "main" org.jruby.embed.ParseFailedException: java.lang.ClassCastException: class java.io.FileReader cannot be cast to class java.io.InputStream (java.io.FileReader and java.io.InputStream are in module java.base of loader 'bootstrap')
at org.jruby.dist/org.jruby.embed.internal.EmbedRubyRuntimeAdapterImpl.runParser(EmbedRubyRuntimeAdapterImpl.java:207)
at org.jruby.dist/org.jruby.embed.internal.EmbedRubyRuntimeAdapterImpl.parse(EmbedRubyRuntimeAdapterImpl.java:94)
at org.jruby.dist/org.jruby.embed.ScriptingContainer.parse(ScriptingContainer.java:1227)
at org.jruby.dist/org.jruby.embed.jsr223.JRubyCompiledScript.(JRubyCompiledScript.java:59)
at org.jruby.dist/org.jruby.embed.jsr223.JRubyEngine.compile(JRubyEngine.java:69)
Caused by: java.lang.ClassCastException: class java.io.FileReader cannot be cast to class java.io.InputStream (java.io.FileReader and java.io.InputStream are in module java.base of loader 'bootstrap')
at org.jruby.dist/org.jruby.embed.internal.EmbedRubyRuntimeAdapterImpl.runParser(EmbedRubyRuntimeAdapterImpl.java:190)
... 4 more
jniscrteng: CScriptEngine.c:151: CScriptEngine_doEval: アサーション `NULL != _compiledScript' に失敗しました。
make: *** [test] 中止
[sira@localhost test]$
Expected behavior
上記のExceptionが、無くなること
Desktop (please complete the following information):
OS: Linux
Browser
Version 6.5
Smartphone (please complete the following information):
name: Bug report about: バグを知らせてね title: '' labels: '' assignees: ''
Describe the bug javascriptファイル以外の動的プログラムファイルの解析できず
To Reproduce
テストデータ [sira@localhost test]$ cat test.rb def test_paramX() print "test_paramX\n" end def test_paramN(iv, lv, fv, dv) printf "test_paramN in\n" printf "iv:%d\n", iv printf "lv:%d\n", lv printf "fv:%f\n", fv printf "dv:%f\n", dv end
実行 [sira@localhost test]$ make test
LD_LIBRARY_PATH=../lib jniscrteng sample2.js
LD_LIBRARY_PATH=../lib jniscrteng testruby.rb /opt/jruby/jruby-9.2.11.0/lib
LD_LIBRARY_PATH=../lib jniscrteng test.rb /opt/jruby/jruby-9.2.11.0/lib
実行結果 Exception in thread "main" org.jruby.embed.ParseFailedException: java.lang.ClassCastException: class java.io.FileReader cannot be cast to class java.io.InputStream (java.io.FileReader and java.io.InputStream are in module java.base of loader 'bootstrap') at org.jruby.dist/org.jruby.embed.internal.EmbedRubyRuntimeAdapterImpl.runParser(EmbedRubyRuntimeAdapterImpl.java:207) at org.jruby.dist/org.jruby.embed.internal.EmbedRubyRuntimeAdapterImpl.parse(EmbedRubyRuntimeAdapterImpl.java:94) at org.jruby.dist/org.jruby.embed.ScriptingContainer.parse(ScriptingContainer.java:1227) at org.jruby.dist/org.jruby.embed.jsr223.JRubyCompiledScript.(JRubyCompiledScript.java:59)
at org.jruby.dist/org.jruby.embed.jsr223.JRubyEngine.compile(JRubyEngine.java:69)
Caused by: java.lang.ClassCastException: class java.io.FileReader cannot be cast to class java.io.InputStream (java.io.FileReader and java.io.InputStream are in module java.base of loader 'bootstrap')
at org.jruby.dist/org.jruby.embed.internal.EmbedRubyRuntimeAdapterImpl.runParser(EmbedRubyRuntimeAdapterImpl.java:190)
... 4 more
jniscrteng: CScriptEngine.c:151: CScriptEngine_doEval: アサーション `NULL != _compiledScript' に失敗しました。
make: *** [test] 中止
[sira@localhost test]$
Expected behavior 上記のExceptionが、無くなること
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context 特になし