Skip to content
Commits on Mar 19, 2013
Commits on Mar 1, 2013
Commits on Feb 28, 2013
Commits on Feb 17, 2013
Commits on Aug 8, 2012
  1. Make DateTime constructors handle fractional seconds in seconds argum…

    …ent, bump version to 1.0.7
    
    Apparently I didn't know this at the time, but the stdlib DateTime
    constructors support fractional seconds in the second argument.
    I must have learned that since writing this support, since I
    used it in Sequel only to see later that it wasn't supported
    by home_run.
    committed Aug 8, 2012
Commits on Feb 27, 2012
  1. Bump version to 1.0.6

    committed Feb 27, 2012
  2. Merge DateTime#<=> into Date#<=> to work around ActiveSupport bug

    ActiveSupport assumes that DateTime#<=> is implemented by Date#<=>
    when monkey patching it, which breaks home_run (see
    rails/rails#2797).  Since it's been over
    6 months since the issue was opened and the ActiveSupport maintainers
    haven't expressed an interest in fixing this issue, it's better to
    just modify home_run to work around the ActiveSupport bug.
    committed Feb 27, 2012
Commits on Feb 22, 2012
Commits on Feb 21, 2012
  1. Allow DateTime.jd to handle a single float argument

    Previously, home_run ignored the fractional part.  This commit makes
    home_run mirror the 1.9.3 behavior of raising an exception if a
    floating point argument is first and there is more than a single
    argument.
    committed Feb 21, 2012
Commits on Sep 2, 2011
  1. Bump version to 1.0.4

    committed Sep 2, 2011
Commits on Sep 1, 2011
Commits on Jul 5, 2011
  1. Work around segfault in rb_ary_store during extension initialization,…

    … bump version to 1.0.3
    
    I've only seen this segfault when running Sequel's default rake
    task with home_run loaded on OpenBSD amd64.  Even though rb_ary_push
    is given the correct arguments, a segfault still occurs in
    rb_ary_store.  Unfortunately, it doesn't happen if you build ruby in
    debug mode, so I can't tell why it occurs.  My best guess is it is
    due to an unforunate interaction between ruby and OpenBSD malloc
    which only happens on amd64 and only when memory happens to be laid
    out a certain way.
    
    This commit avoids the issue by using rb_ary_new4 and a temporary
    C array instead of using a blank ruby array and rb_ary_push to add
    items to it.  I also tried increasing the integer passed to
    rb_ary_new2 as well as using rb_ary_new instead of rb_ary_new2,
    which seemed to reduce the frequency of the error, but not
    eliminate it completely.
    committed Jul 5, 2011
Commits on Jun 28, 2011
Commits on Mar 18, 2011
  1. Bump version to 1.0.2

    committed Mar 18, 2011
  2. Only run .rb files in the specs

    This fixes issues if you run the specs under rubinius and then under
    MRI or jruby without cleaning.
    committed Mar 18, 2011
Commits on Mar 17, 2011
  1. @funny-falcon

    add specs for new formats

    funny-falcon committed Mar 17, 2011
  2. @funny-falcon

    add sec_fraction handling

    funny-falcon committed Mar 17, 2011
  3. @funny-falcon
Commits on Feb 28, 2011
  1. Bump version to 1.0.1

    committed Feb 28, 2011
  2. Enable allocate class method for Date and DateTime

    Also, change dup and clone to call super instead of using
    DUPSETUP and CLONESETUP.  This makes dup and clone work
    correctly on rubinius.  It also makes dup and clone work
    correctly for Date on jruby, but not for DateTime due to
    a bug in JRuby.
    
    allocate is defined to use the julian day 0 for simplicity.
    committed Feb 28, 2011
Commits on Feb 1, 2011
  1. Define Date::Format::ZONES in ruby instead of C, bump version to 1.0.0

    For some unknown reason, defining Date::Format::ZONES in C was
    causing the occassional segfault when loading home_run, either
    in an rb_hash_aset call or when freezing the hash in format.rb.
    
    The reason it was defined in C originally was because it is used
    in the zone_to_diff method defined in C.  However, that can be
    worked around with some additionally checking in the method.
    
    Note that Date::ZONES is no longer defined, only Date::Format::ZONES.
    committed Feb 1, 2011
Commits on Nov 13, 2010
  1. Add Runt to the incompatibilities section of the README (Fixes #19)

    Thanks to clifton for reporting this issue.
    committed Nov 12, 2010
Commits on Oct 18, 2010
  1. Make DateTime methods return subclass instances

    Similar as previous changes for Date.  This requires an API change
    for rhrdt__from_jd_nanos to accept a ruby class as a first argument.
    committed Oct 18, 2010
  2. Add specs to make DateTime subclass methods return subclass instances

    Similar as previous change made for Date methods.
    committed Oct 18, 2010
  3. Fix extension to return subclass instances for subclass methods

    In most cases, this is solved by using rb_obj_class(self) instead
    of hard coding rhrd_class.  This does require an API change
    for rhrd__from_hash, which now takes the class as the first
    argument.
    committed Oct 18, 2010
  4. Add specs for subclass methods returning subclass instances

    Previously, Date was hard coded in a few places, so that if you
    did Class.new(Date).new + 1, you got an instance of Date back,
    instead of an instance of the subclass. This adds specs for many
    cases to ensure that the correct class is used.  In some cases,
    these specs pass without code changes, in others the following
    commit is required.
    
    Problem pointed out by aquasync (ruby-ole gem author) as a comment
    on issue #15.
    committed Oct 18, 2010
  5. Use INT2FIX instead of LONG2NUM where the argument is hard coded

    If it is hard coded, you know it will fit in a Fixnum, so INT2FIX
    is safe.  Many other places in the library LONG2NUM is used
    where INT2FIX may also work, but I'd have to check each case to be
    sure.
    committed Oct 18, 2010
Commits on Sep 20, 2010
Commits on Sep 12, 2010
  1. Bump version to 0.9.2

    committed Sep 12, 2010
Something went wrong with that request. Please try again.