Skip to content

time-lord screws up active_support #16

@dmacvicar

Description

@dmacvicar

I had the problem that I could not get Date#end_of_week to work on my program, but it did work on irb:

from my program:

(Date.today.beginning_of_week..Date.today.end_of_week)
=>  Mon, 22 Jul 2013..Sat, 13 Oct 2959

irb:

(Date.today.beginning_of_week..Date.today.end_of_week)
=> Mon, 22 Jul 2013..Sun, 28 Jul 2013

Then I realized:

(rdb:1) 1.method(:days).source_location
 ["/space/rbenv/versions/1.9.3-p194/lib64/ruby/gems/1.9.1/gems/time-lord-1.0.1/lib/time-lord/extensions/integer.rb", 3]

 [3] pry(main)> 1.method(:days).source_location 
 => ["/space/rbenv/versions/1.9.3-p194/lib64/ruby/gems/1.9.1/gems/activesupport-3.2.12/lib/active_support/core_ext/numeric/time.rb",

I can then reproduce the wrong range by just loading time-lord.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions