This project is archived and is in readonly mode.

#6322 new
Betelgeuse

activesupport/lib/active_support/core_ext/time/calculations.rb does not declare dependencies for at_beginning_of_week

Reported by Betelgeuse | January 21st, 2011 @ 08:08 PM

Testing against master

$ bundle console
ree-1.8.7-2010.02 > require 'active_support/core_ext/time/calculations'
 => true 
ree-1.8.7-2010.02 > Time.now.at_beginning_of_week
NoMethodError: undefined method `days' for 4:Fixnum
    from /Users/betelgeuse/.rvm/gems/ree-1.8.7-2010.02/bundler/gems/rails-8491f16e128d/activesupport/lib/active_support/core_ext/time/calculations.rb:168:in `at_beginning_of_week'
    from (irb):2

Comments and changes to this ticket

  • hundredwatt

    hundredwatt March 20th, 2011 @ 05:30 AM

    at_beginning_of_week also needs: 'active_support/core_ext/object/conversions'

    Not sure if it is assumed that, as a component of core_ext, it should be assumed that at_beginning_of_week would require all of active_support/core_ext.

    I attached a trivial patch

  • jz

    jz March 23rd, 2011 @ 11:07 PM

    Similarly, on ruby-1.9.2-p136

    require 'active_support/json'
    puts({ :hi => 'there' }.to_json)
    

    will give

    uninitialized constant ActiveSupport::OrderedHash (NameError)
    
  • jz

    jz March 23rd, 2011 @ 11:10 PM

    for activesupport 3.0.5

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Attachments

Pages