Bugs item #25564, was opened at 2009-04-20 23:30 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=575&aid=25564&group_id=126
Category: other Group: v1.3.x Status: Open Resolution: None Priority: 3 Submitted By: Emanuele Vicentini (emanuelev) Assigned to: Nobody (None) Summary: Time.today not working with 1.3.2 Initial Comment: $ gem env RubyGems Environment: - RUBYGEMS VERSION: 1.3.2 - RUBY VERSION: 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0] - INSTALLATION DIRECTORY: /Library/Ruby/Gems/1.8 - RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby - EXECUTABLE DIRECTORY: /usr/bin - RUBYGEMS PLATFORMS: - ruby - universal-darwin-9 - GEM PATHS: - /Library/Ruby/Gems/1.8 - /Users/emanuele/.gem/ruby/1.8 - /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8 - GEM CONFIGURATION: - :update_sources => true - :verbose => true - :benchmark => false - :backtrace => false - :bulk_threshold => 1000 - REMOTE SOURCES: - http://gems.rubyforge.org/ Running the following gives problem: $ ruby -rubygems -e 'puts Time.today' /Library/Ruby/Site/1.8/rubygems/specification.rb:16:in `today': undefined local variable or method `location_of_caller' for Time:Class (NameError) from -e:1 Noted this even on an Ubuntu GNU/Linux box with Ruby 1.8.7. On both machines there are some gems (Rails, Rake, Rack and many others), but the load paths do not seem to be messed up: $ ruby -rubygems -e 'puts Time.today rescue nil; puts $:' /Library/Ruby/Site/1.8 /Library/Ruby/Site/1.8/powerpc-darwin9.0 /Library/Ruby/Site/1.8/universal-darwin9.0 /Library/Ruby/Site /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/powerpc-darwin9.0 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0 . ---------------------------------------------------------------------- Comment By: Luke Ivers (technodolt1) Date: 2009-04-27 11:52 Message: Hey, I fixed this on my local install by changing the line in specification.rb to use Gem.location_of_caller instead of just location_of_caller in the Time.today function. Given that I'm using MacOS and the default install of Ruby, and also that I'm using an application (Tracks, specifically) which uses this function, I figured it'd be better to fix the bug rubygems 1.3.2 for now. Also going to report this to Tracks so they know to take out the deprecated code if they want this to work with Rubygems on 1.8.* ---------------------------------------------------------------------- Comment By: Eric Hodel (drbrain) Date: 2009-04-24 17:51 Message: Since Gem::Specification is always loaded with RubyGems and Time.today is defined in it, Time.today isn't easily overrideable to avoid the warning (its check for definition is useless). I think I should remove it outright. ---------------------------------------------------------------------- Comment By: James Tucker (raggi) Date: 2009-04-24 07:32 Message: It's not been removed, but it's broken due to a missing method in Kernel. Possibly worth noting that Kernel#location_of_caller move to Gem was not in the ChangeLog afaics. Diff: http://pastie.textmate.org/private/w2qtrafnu6s3zizkoolba ---------------------------------------------------------------------- Comment By: Luis Lavena (luislavena) Date: 2009-04-22 04:47 Message: Was under deprecation warning between 1.x and 1.3, now it got removed. ---------------------------------------------------------------------- Comment By: Emanuele Vicentini (emanuelev) Date: 2009-04-21 23:03 Message: Right; that's why I expected it to show a warning, not to raise a NameError exception. Anyway, I agree with you that it is a no-priority issue. Have a nice day. ---------------------------------------------------------------------- Comment By: Luis Lavena (luislavena) Date: 2009-04-21 06:03 Message: Time.today has been deprecated. See the release notes. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=575&aid=25564&group_id=126 _______________________________________________ Rubygems-developers mailing list http://rubyforge.org/projects/rubygems Rubygems-developers@rubyforge.org http://rubyforge.org/mailman/listinfo/rubygems-developers