<GitHub60>
[jruby] headius opened issue #4282: JSON::Parser does not expose #quirks_mode? https://git.io/vXP5E
<GitHub173>
[jruby] headius opened issue #4283: JSON::Parser does not reject inputs that it should https://git.io/vXP59
thedarkone2 has joined #jruby
dido has joined #jruby
<GitHub117>
[jruby] headius pushed 4 new commits to master: https://git.io/vXPdc
<GitHub117>
jruby/master d090840 Charles Oliver Nutter: Disallow kwargs in IO#readpartial. MRI bug 11885.
<GitHub117>
jruby/master c800c5c Charles Oliver Nutter: When cause kwarg is specified, force it to be set.
<GitHub117>
jruby/master 608c09d Charles Oliver Nutter: Update MRI tests for Ruby 2.3.1.
claudiuinberlin has quit [Remote host closed the connection]
<headius>
kares: I see you committed a change to pom.xml in 3d8babd9e that updates the polyglot plugin...but when I build locally it tries to revert back to 0.1.15
<headius>
sorry lib/pom.xml
<headius>
I'll ignore it for now but I'm confused why you get a newer version
claudiuinberlin has joined #jruby
<GitHub197>
[jruby] headius pushed 1 new commit to ruby-2.4: https://git.io/vXPdx
<GitHub197>
jruby/ruby-2.4 8aa6f68 Charles Oliver Nutter: Merge branch 'master' into ruby-2.4
<GitHub196>
[jruby] headius opened issue #4287: [ruby 2.4] Add support for @ and $ in regexp named groups https://git.io/vXXG6
olle has joined #jruby
sam2000_ has joined #jruby
<sam2000_>
Hi, Could anyone please let me know what would be the best way to pass a database connection from a jruby/rails app to a java libray? I am using some clojure code with rails and all workds fine but it would be great if I can query the Posgresql databse directly from Clojure (or Java) code please
<GitHub141>
[jruby] headius opened issue #4288: [ruby 2.4] Module#refine can now be given a Module https://git.io/vXXnJ
<GitHub161>
[jruby] headius opened issue #4290: [ruby 2.4] forwardable.rb is broken on non-MRI https://git.io/vXXW5
rcvalle has joined #jruby
camlow325 has quit [Quit: WeeChat 1.5]
dido has joined #jruby
dido has quit [Client Quit]
tcrawley-away is now known as tcrawley
tcrawley is now known as tcrawley-away
<GitHub25>
[jruby] cheister opened issue #4291: NotImplementedError: flock unsupported or native support failed to load when installing bundler https://git.io/vXXzP
claudiuinberlin has quit []
vifino has joined #jruby
<headius>
sam2000_: you should be able to get the connection out of the Rails connection object...but I don't remember exactly how in AR 1.x
<headius>
enebo might remember
<enebo>
sam2000: headius: I do not see @connection exposed from the adapter but maybe introspection can try and grab it…
<sam2000>
Thanks headius, I know how to get the connection within ruby, it is something like ActiveRecord::Base.connection.execute("SQL query") I think. But I am not sure how I can do the same within JAVA code though
<headius>
you mean get the connection you're already using in Ruby to pass to Java?
<headius>
or get the connection from ar-jdbc FROM java?
<sam2000>
Yes headiys!
<enebo>
sam2000: that connection has a @connection also within it. For us that is a RubyJdbcConnection instance
<enebo>
sam2000: not sure why but AR adapters are called connection at AR Base level but contain a variable called connection within them
<sam2000>
Or OK, so in ruby I can do ActiveRecord::Base.connection.@connection to get the connection instance?
<enebo>
sam2000: yeah I think so
<enebo>
sam2000: for AR-JDBC and AR I think that is fairly universal
<sam2000>
OK so this would translate to a java packagename.classname?
<enebo>
sam2000: we might be changing APIs for Rails5 support but this type will still exist and the APIs upto version 5 have not changed much over the years
lanceball is now known as lance|afk
<enebo>
sam2000: I guess once you start reflecting into our code you have to cope with us changing stuff internally but it won’t be radically different
<sam2000>
THanks very much enebo, So the class and package names could change in the future, although it hasn't changed odten in the past?
<enebo>
those will not change
<enebo>
the methods on them might shrink to a smaller set
<enebo>
the current ARJDBC supports several versions of AR at the same time and we are moving away from that
<sam2000>
Oh I see, I only need to execute some SQL directly using 'execute' and get result sets etc
<enebo>
sam2000: yeah execute and executePrepared should be fine
<enebo>
sam2000: but I will be starting our ar5 work on postgresql this week so :)
<sam2000>
What is the best way to figure out the java package and class name for any ruby stuff like this?
<enebo>
sam2000: well normally there won
<enebo>
t be any package and type that is useful from Java
vifino has quit [Quit: Who turned this off?! D:<]
<enebo>
sam2000: it just happens that our lower connection object is written in Java
<sam2000>
Oh OK I see
<enebo>
sam2000: but you can definitely include an interface into a Ruby type and java will see it as that interface
<sam2000>
Oh you mean I define an interface from the ruby side and then using the same interface in java?
<enebo>
sam2000: you make interface or use interface from java but then write your class which impls it in Ruby
<enebo>
sam2000: when you pass an instance of that to something else out in java land it will beable to interact as that interface
<sam2000>
Oh that is a lot cleaner isn't it?
<enebo>
sam2000: it will also do basic type coercion for simple types like String
vifino has joined #jruby
<enebo>
sam2000: yeah I think if you can make a clean interface it is always the way to go
<sam2000>
So the ruby should be able to read the interface definition that is done within java code right?
<sam2000>
Do you know where I can see a simple example code for this ?
<enebo>
sam2000: as long as it is in Java classpath sure (and you can require jars to get that in as well)
<sam2000>
Oh i guess
<sam2000>
I get it
<enebo>
Yeah I was just thinking that would be more effective than explaining it in IRC :)