Forum: JRuby Using java's implementation of MessageDigest on JRuby but it

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
My N. (Guest)
on 2009-01-28 00:35
So I was just testing out JRuby seeing how well you can call java code
into it, and i wanted to use java's implementation of MessageDigest
instead ruby's. I ran this code.

require 'java'
include_class ''

puts MessageDigest.get_instance('MD5').digest('My Text Here')

and it returns this:

no digest with arguments matching [class org.jruby.RubyString]

Looks like I can't use a RubyString as an argument for it to hash? Do I
have to call a String from java? that doesn;t make much sense.
This topic is locked and can not be replied to.