I'm on my phone now but if I remember correctly you should give 'a string'.chars (or mb_chars) a try using plain Ruby API. Em 07/01/2013 20:03, "Carl Bourne" <carl.bou...@me.com> escreveu:
> Hi, > > I may be misunderstanding something here, but Is there an easy way in > JRuby/Ruby to convert a string such as "lexicon" into a character array? > > The only way I've been able to achieve this so far is like this: - > > > String.new("lexicon").toCharArray) > > > Which requires me to: - > > > java_import java.lang.String > > > Which then creates warnings like this when I run my code: - > > > warning: already initialized constant String > > > I was assuming there would a more Ruby like way to achieve this without > having to use java.lang.String. > > My objective is to open a Java Keystore file which requires a password. > e.g. > > kstore.load(FileInputStream.new("example.jks"), > String.new("lexicon").toCharArray) > > Best Regards, > > Carl > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > >