Since the OP thoughtfully asks this question in the Ruby list and not the Rails list, s/he may not have/want ActiveSupport. If this is the only thing, pulling ActiveSupport in is certainly overkill.
Also, note that Time.parse isn't available unless you require 'time' (which ActiveSupport might do itself).
Of course if s/he doesn't want it then s/he won't use it. I didn't try
to force anyone to use anything or to cause any other harm, I were just
showing some more and fancy possibilities.
And you are correct, ActiveSupport indeed requires time automatically.
Also, I have to admit that I didn't know that "Ruby list" means that
it's denied to talk about anything more than Ruby core and stdlibs.
Best regards,
Jarmo
Rob Biedenharn wrote:
···
Since the OP thoughtfully asks this question in the Ruby list and not
the Rails list, s/he may not have/want ActiveSupport. If this is the
only thing, pulling ActiveSupport in is certainly overkill.
Also, note that Time.parse isn't available unless you require
'time' (which ActiveSupport might do itself).
You're not forbidden to talk about other libs. It's just that there
are separate lists for Ruby and Rails, and the general understanding
is that the questions posted here aren's Rails-specific.
So, the people who posted these questions probably aren't using Rails
libraries, and thus answers who recommend using them are less useful.
Rob was probably just pointing that out. No offense intended.
···
On Thu, Jan 8, 2009 at 3:18 PM, Jarmo Pertman <jarmo.p@gmail.com> wrote:
Also, I have to admit that I didn't know that "Ruby list" means that
it's denied to talk about anything more than Ruby core and stdlibs.
You're not forbidden to talk about other libs. It's just that there
are separate lists for Ruby and Rails, and the general understanding
is that the questions posted here aren's Rails-specific.
So, the people who posted these questions probably aren't using Rails
libraries, and thus answers who recommend using them are less useful.
Rob was probably just pointing that out. No offense intended.
It can be argued that ActiveSupport is not Rails. For example, I often
use ActiveRecord outside of Rails, and ActiveSupport is one of its
dependencies.
I was using activesupport jut to do some of the date calculations, but after
debugging all of the myriad examples in rfc2445, I spent the last day
refactoring to get rid of the dependency, since there is enough resistance
in the overall ruby community to activerecord dependencies.
At the same time, I'm writing the code to interact with the fairly new time
zone support in activesupport, since I suspect that much of the ultimate
usage for the gem will be for rails apps, and activesupport now has a fairly
nice api for dealing with times with time zones.
···
On Fri, Feb 6, 2009 at 7:54 AM, Mark Thomas <mark@thomaszone.com> wrote:
> You're not forbidden to talk about other libs. It's just that there
> are separate lists for Ruby and Rails, and the general understanding
> is that the questions posted here aren's Rails-specific.
>
> So, the people who posted these questions probably aren't using Rails
> libraries, and thus answers who recommend using them are less useful.
> Rob was probably just pointing that out. No offense intended.
It can be argued that ActiveSupport is not Rails. For example, I often
use ActiveRecord outside of Rails, and ActiveSupport is one of its
dependencies.