On Jun 5, 2014, at 14:07, Roelof Wobben <r.wobben / home.nl> wrote:

> #!/usr/local/bin/ruby -w
>=20
> date =3D "2013 12 25"
>=20
> year =3D /\d{4}/.match(date)
> date2 =3D Date.new(year,12,24)

Looks like you got a bad error message. I get:

?> year =3D /\d{4}/.match(date)
=3D> #<MatchData "2013">
>> date2 =3D Date.new(year,12,24)
NoMethodError: undefined method `<' for #<MatchData "2013">
	from (irb):5:in `new'
	from (irb):5
	from /usr/bin/irb:12:in `<main>'

and that should hint better at what is going wrong. I'm using ruby 2.0 =
for the above.

P.S. I think you should read doco more before you go to the mailing list =
for help.=