On Dec 31 2009, 4:52=A0pm, Cris Shupp <cshu... / yahoo.com> wrote:
> All,
>
> I am trying to open the Time class to add the following method.
> I am always getting this error:
> NameError: uninitialized constant Time::ZoneOffset
>
> when referencing ZoneOffset. =A0What am I doing wrong?
>
> class Time
> =A0 def self.offset_to_zone(offset)
> =A0 =A0 offset =3D offset.to_i
> =A0 =A0 ZoneOffset.each_pair do |time_zone, zone_offset| #ERROR OCCURS
> HERE!!!
> =A0 =A0 =A0 return time_zone if (zone_offset =3D=3D offset)
> =A0 =A0 end
> =A0 =A0 raise ArgumentError, "Illegal arguments! =A0The offset " <<
> offset.to_s << " is unknown."
> =A0 end
> end
> --
> Posted viahttp://www.ruby-forum.com/.

As the error status, there is no Time::ZoneOffset constant....

Are you copying/pasting random code from somewhere?
If not, what is ZoneOffset even supposed to be?