-
-
Notifications
You must be signed in to change notification settings - Fork 925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example #4 of ScriptingContainer documentation doesn't work #3043
Comments
also added a test to double-check its working as expected (due #3043)
improved |
@kares, thank you. RVM's latest jruby is 1.7.19, not 1.7.20 |
@abonas simply do not assume RVM to know better than us :) |
I'm not sure what you meant by "did not miss 'message'" - but it still doesn't work with 1.7.20. |
... I meant (last line) but you mentioned you double checked your ✂️ :
hmm, that makes no sense ... works just fine as the suite runs, you mentioned RVM - could we know details about your environment and how you run these - any system properties set ? |
sure. OS is rhel 6.5. jruby 1.7.20, jruby installed with rvm. |
@abonas What's happening here is the rendered JavaDocs are missing some of the necessary Ruby code, which is hopefully fixed by @kares change. In the meantime, use https://github.com/jruby/jruby/blob/jruby-1_7/core/src/main/java/org/jruby/embed/ScriptingContainer.java#L156-L171 as your source for copy & pasting the code. |
@bbrowning you are 100% right! copy pasting from that source did the work. thanks a lot! |
source:
http://jruby.org/apidocs/org/jruby/embed/ScriptingContainer.html
This example:
first of all, the script variable needs a type (String)
But even after adding it, the script outputs the following:
message: #
message: #
message: #
same result also when initializing the scripting container with
LocalVariableBehavior.PERSISTENT
tested with jruby 1.7.18
The text was updated successfully, but these errors were encountered: