Problem with Time.iso8601

C

Chris Morris

I'm assuming Time.now.iso8601 should work? Do I have a muffed
installation maybe? Do I have a muffed brain? :) Any other ideas?

C:\TEMP>ruby -v
ruby 1.8.2 (2004-12-25) [i386-mswin32]

C:\TEMP>ri Time.iso8601
----------------------------------------------------------- Time#iso8601
iso8601(fraction_digits=3D0)
------------------------------------------------------------------------
Alias for #xmlschema


C:\TEMP>irb
irb(main):001:0> Time.now.iso8601
NoMethodError: undefined method `iso8601' for Wed Aug 10 13:21:07 Central D=
aylig
ht Time 2005:Time
from (irb):1
irb(main):002:0> Time.now.xmlschema
NoMethodError: undefined method `xmlschema' for Wed Aug 10 13:21:12 Central=
Dayl
ight Time 2005:Time
from (irb):2
irb(main):003:0> exit

--=20
Chris
http://clabs.org
 
J

Jason Foreman

I'm assuming Time.now.iso8601 should work? Do I have a muffed
installation maybe? Do I have a muffed brain? :) Any other ideas?
=20

irb(main):001:0> Time.now.iso8601
NoMethodError: undefined method `iso8601' for Wed Aug 10 13:29:36 GMT-6:00 =
2005:
Time
from (irb):1

irb(main):002:0> require 'time'
=3D> true

irb(main):003:0> Time.now.iso8601
=3D> "2005-08-10T13:29:39-05:00"
 
K

Kevin Olbrich

I've been mucking about with regular expressions and have not managed to =
get
the POSIX style character classes (i.e., [:alnum:]) to work for me. Is =
this
a limitation of the platform I'm using, or am I missing some setting
somewhere?

Ruby 1.8.2 on WinXP (used the one-click installer).

-Kevin
 
N

nobuyoshi nakada

Hi,

At Thu, 11 Aug 2005 05:28:37 +0900,
Kevin Olbrich wrote in [ruby-talk:151590]:
I've been mucking about with regular expressions and have not managed to get
the POSIX style character classes (i.e., [:alnum:]) to work for me. Is this
a limitation of the platform I'm using, or am I missing some setting
somewhere?

$ ruby -e 'p /[[:alnum:]]+/ =~ ":ab0d,fd"; p $&'
1
"ab0d"

$ ruby -e 'p /[[:alnum:],]+/ =~ ":ab0d,fd"; p $&'
1
"ab0d,fd"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,999
Messages
2,570,245
Members
46,839
Latest member
MartinaBur

Latest Threads

Top