You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe I'm not looking in the right places but I can't find any documentation online on the differences between the C Ruby irb and JRuby's jirb. I'm completely new to Ruby and I'm trying to follow a tutorial in which I enter a multi-line function definition into irb but on JRuby (rubotu) I just get a complaint about an unexpected EOF after the first line. Please could someone write an introduction doc to using jirb and put it on the wiki? Thank you
The text was updated successfully, but these errors were encountered:
When you mention a "multi-line function definition", what do you mean exactly? Could you provide an example? Like, the function you want to create @stellarpower
I would type the following, for example, including newlines:
def hello
puts "Hello, world!"
end
I used this first on rubotu and it spat out an error, I seem to recall trying it with regular jruby on a desktop and having the same problem but I've just installed jirb on my laptop and it seems to work fine so maybe it was a problem with ruboto or an old version of jruby, but I do recall eliminating the former from my mind for some reason. In any case, at the time I couldn't find any docs on jirb and how to use it, in particular if anything is different from the C Ruby irb.
So it was probably an outdated version's error? In any case, try any function you would like to see if the problem is still there or if it's a problem about usage.
About the documentation: any point you would like to be explicitly addressed aside from "JRuby and CRuby differences"?
Maybe I'm not looking in the right places but I can't find any documentation online on the differences between the C Ruby irb and JRuby's jirb. I'm completely new to Ruby and I'm trying to follow a tutorial in which I enter a multi-line function definition into irb but on JRuby (rubotu) I just get a complaint about an unexpected EOF after the first line. Please could someone write an introduction doc to using jirb and put it on the wiki? Thank you
The text was updated successfully, but these errors were encountered: