jeremyevans has quit [Read error: Connection reset by peer]
jeremyevans has joined #jruby
lucasb has quit [Quit: Connection closed for inactivity]
_whitelogger has joined #jruby
_whitelogger has joined #jruby
snake_pliskin has joined #jruby
<snake_pliskin>
hey quick question for embedding JRuby into a Java application. I create a new Ruby and then parse a script with the runtime adapter. I'm trying to pass in "this" to the runtime, but am not sure how to do it.
<snake_pliskin>
I tried embedding it in a JavaObject, but that doesn't seem to work
<snake_pliskin>
...but in the ruby script, $this doesn't have any of the methods of my real "this"
<snake_pliskin>
it's like a wrapper...so how do I unwrap and use the real Java object underneath?
<snake_pliskin>
thanks in advance
<snake_pliskin>
oh, I figured out if I do $this.to_java I can then call methods on my java object. seems like too much indirection, I ought to be able to just set the global to the "this" directly