[jruby-dev] [jira] (JRUBY-6945) append_features called with non-class

2012-10-17 Thread Vladimir Golyakov (JIRA)
Vladimir

[jruby-dev] TypeError: no public constructors for #

2012-10-17 Thread Carl Bourne
Hi, I'm trying to use the java.security.KeyPairGenerator via JRuby 1.7 RC2 as per the following code: require 'java' kp = java.security.KeyPairGenerator.getInstance("RSA") puts kp #java.security.KeyPairGenerator$Delegate@45f177b However, when I try to call initialize i.e. kp.initialize(2048) I

Re: [jruby-dev] TypeError: no public constructors for #

2012-10-17 Thread Lars Westergren
I think you hit this namespace conflict problem: http://jira.codehaus.org/browse/JRUBY-45 so it seems you need to use kp.java_send :initialize, 2048 instead. On Wed, Oct 17, 2012 at 3:56 PM, Carl Bourne wrote: > Hi, > > I'm trying to use the java.security.KeyPairGenerator via JRuby 1.7 RC2 as >

Re: [jruby-dev] TypeError: no public constructors for #

2012-10-17 Thread Charles Oliver Nutter
There should also be an initialize__method you can call for the same effect. Any methods we don't directly map (usually due to naming conflict) we will add a __method alias for. - Charlie On Wed, Oct 17, 2012 at 9:04 AM, Lars Westergren wrote: > I think you hit this namespace conflict problem: >

Re: [jruby-dev] TypeError: no public constructors for #

2012-10-17 Thread Carl Bourne
Thanks for this! So when I tried: > kp.java_send :initialize, 2048 I got the following error:- TypeError: can't convert Fixnum into Array However, as per Charles suggestion, this worked:- > kp.initialize__method(2048) Regards, Carl On 17 Oct 2012, at 15:10, Charles Oliver Nutter wrote:

[jruby-dev] [jira] (JRUBY-6946) Object.id still exists in 1.7.0.RC2

2012-10-17 Thread Garrett Heaver (JIRA)
Garrett H

[jruby-dev] java.util.Calendar date methods

2012-10-17 Thread Carl Bourne
Hi, I'm trying to do the equivalent of this in JRuby. Calendar cal = Calendar.getInstance(); cal.add(Calendar.DATE, -1); Date notBefore = cal.getTime(); cal.add(Calendar.DATE, 2); Date notAfter = cal.getTime(); This is my JRuby code: r

Re: [jruby-dev] java.util.Calendar date methods

2012-10-17 Thread Anthony Juckel
You should use Calendar::DATE instead, since the value is an exposed constant rather than method. On Oct 17, 2012 10:19 AM, "Carl Bourne" wrote: > Hi, > > I'm trying to do the equivalent of this in JRuby. > > Calendar cal = Calendar.getInstance(); > cal.add(Calendar.DATE,

Re: [jruby-dev] java.util.Calendar date methods

2012-10-17 Thread Carl Bourne
Thanks very much - that did the trick. On 17 Oct 2012, at 16:33, Anthony Juckel wrote: > You should use Calendar::DATE instead, since the value is an exposed constant > rather than method. > > On Oct 17, 2012 10:19 AM, "Carl Bourne" wrote: > Hi, > > I'm trying to do the equivalent of this i

Re: [jruby-dev] TypeError: no public constructors for #

2012-10-17 Thread Charles Oliver Nutter
On Wed, Oct 17, 2012 at 9:21 AM, Carl Bourne wrote: > So when I tried: > >> kp.java_send :initialize, 2048 > > I got the following error:- > > TypeError: can't convert Fixnum into Array java_send takes the following params: * name of the target Java method * an array of Java types for the target

Re: [jruby-dev] TypeError: no public constructors for #

2012-10-17 Thread Hirotsugu Asari
On Oct 17, 2012, at 12:59 PM, Charles Oliver Nutter wrote: > On Wed, Oct 17, 2012 at 9:21 AM, Carl Bourne wrote: >> So when I tried: >> >>> kp.java_send :initialize, 2048 >> >> I got the following error:- >> >> TypeError: can't convert Fixnum into Array > > java_send takes the following par

[jruby-dev] Casting to different types in JRuby

2012-10-17 Thread Carl Bourne
Hi, I need to do the equivalent of this in JRuby:-- PKCS10CertificationRequest csr = csrBuilder.build(signer); Which equates to what I think is casting a "org.bouncycastle.pkcs.PKCS10CertificationRequestHolder" object to a "org.bouncycastle.pkcs.PKCS10CertificationRequest" object. Is this po

[jruby-dev] [jira] (JRUBY-6947) Call to "free" wrapped up via FFI causes JVM to exit with a malloc error.

2012-10-17 Thread Chuck Remes (JIRA)
Chuck Rem

Re: [jruby-dev] Casting to different types in JRuby

2012-10-17 Thread Charles Oliver Nutter
There's no casting (in the usual Java sense) required in JRuby; if the methods exist, they'll be callable. Just go with it :) - Charlie On Wed, Oct 17, 2012 at 1:08 PM, Carl Bourne wrote: > Hi, > > I need to do the equivalent of this in JRuby:-- > > PKCS10CertificationRequest csr = csrBuilder.bu

Re: [jruby-dev] Casting to different types in JRuby

2012-10-17 Thread Carl Bourne
Charles, Maybe I'm getting my terminology mixed up here. I basically have two different types of object . >> PKCS10CertificationRequestHolder and a >> PKCS10CertificationRequest In order for me to pass the holder object to another class the holder object needs to be just a request object

Re: [jruby-dev] Casting to different types in JRuby

2012-10-17 Thread Charles Oliver Nutter
Yes, I think I was confused by your terminology. Assuming the original Java code is right, here's the Ruby code: csr = csrBuilder.build(signer) - Charlie On Wed, Oct 17, 2012 at 2:03 PM, Carl Bourne wrote: > Charles, > > Maybe I'm getting my terminology mixed up here. > > I basically have two

[jruby-dev] [jira] (JRUBY-6948) gem install bundler immediately crashes from a stack overflow

2012-10-17 Thread Theo Hultberg (JIRA)
Theo Hult

[jruby-dev] [jira] (JRUBY-6949) system() silently fails when options are passed

2012-10-17 Thread Theo Hultberg (JIRA)
Theo Hult

[jruby-dev] [jira] (JRUBY-6950) Can't access methods on Scala companion object scala.reflect.ClassManifest

2012-10-17 Thread Leif Warner (JIRA)
Leif Warn

[jruby-dev] [jira] (JRUBY-6951) Unable to encrypt data and then decrypt it in MRI Ruby

2012-10-17 Thread Tim Olsen (JIRA)
Tim Olsen

Re: [jruby-dev] Casting to different types in JRuby

2012-10-17 Thread Carl Bourne
Oliver yes I did try that but it still doesn't seem to work as I would expect. Heres a bit more background to the problem. Using this Java code: // Generate the certificate signing request PKCS10CertificationRequestBuilder csrBuilder = new PKCS10CertificationRequestBuilder(entityN

Re: [jruby-dev] Casting to different types in JRuby

2012-10-17 Thread Charles Oliver Nutter
On Wed, Oct 17, 2012 at 6:44 PM, Carl Bourne wrote: > Using this Java code: > > // Generate the certificate signing request > PKCS10CertificationRequestBuilder csrBuilder = new > PKCS10CertificationRequestBuilder(entityName, publicKeyInfo); > > csrBuilder.addAttribute(PKC

[jruby-dev] [jira] (JRUBY-6952) Time#+ gives off-by-one error with fractional microseconds

2012-10-17 Thread Joshua Ballanco (JIRA)
Joshua Ba