JRuby fails to find Time.parse

With version:

D:\temp>jruby -v
jruby 1.1.4 (ruby 1.8.6 patchlevel 114) (2008-08-28 rev 7570) [x86-java]

When calling the parse method of the Time class, I get a NoMethodError
(see jirb session)

D:\temp>jirb
irb(main):001:0> Time.parse(‘1/1/2000’)
NoMethodError: undefined method parse' for Time:Class from (irb):2:inbinding’
from C:/java/jruby/lib/ruby/1.8/irb.rb:150:in eval_input' from C:/java/jruby/lib/ruby/1.8/irb.rb:259:insignal_status’
from C:/java/jruby/lib/ruby/1.8/irb.rb:147:in eval_input' from C:/java/jruby/lib/ruby/1.8/irb.rb:146:ineval_input’
from C:/java/jruby/lib/ruby/1.8/irb.rb:70:in start' from C:/java/jruby/lib/ruby/1.8/irb.rb:69:incatch’
from C:/java/jruby/lib/ruby/1.8/irb.rb:69:in `start’
from C:\java\jruby\bin\jirb:19
irb(main):002:0>

Any idea?

Jean


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

You are missing ‘require “time”’. You should see the same problem
using C impl of Ruby too.

-Tom

On Mon, Jan 5, 2009 at 5:55 PM, Jean L. [email protected]
wrote:

   from (irb):2:in `binding'

Any idea?
http://xircles.codehaus.org/manage_email


Blog: http://www.bloglines.com/blog/ThomasEEnebo
Email: [email protected] , [email protected]


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

:wink:

----- Original Message ----
From: Thomas E Enebo [email protected]
To: [email protected]
Sent: Tuesday, January 6, 2009 1:54:29 AM
Subject: Re: [jruby-user] JRuby fails to find Time.parse

You are missing ‘require “time”’. You should see the same problem
using C impl of Ruby too.

-Tom

On Mon, Jan 5, 2009 at 5:55 PM, Jean L. [email protected]
wrote:

   from (irb):2:in `binding'

Any idea?
http://xircles.codehaus.org/manage_email


Blog: http://www.bloglines.com/blog/ThomasEEnebo
Email: [email protected] , [email protected]


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email