Hide Forgot
Description of problem: in /usr/lib/ruby/1.8/date/format.rb the function self.__strptime(str, fmt, elem) (line 87) when reading the month data skips the third entry (%d). looks like it's eaten by %m. Version-Release number of selected component (if applicable): ruby 1.8.5 How reproducible: 100% Steps to Reproduce: # ruby require 'date' d=Date.strptime("20110103", "%Y%m%d") p d Actual results: /usr/lib/ruby/1.8/date.rb:650:in `new_with_hash': 3 elements of civil date are necessary (ArgumentError) from /usr/lib/ruby/1.8/date.rb:675:in `strptime' from -:2 Expected results: #<Date: 2011-01-03 (4911129/2,0,2299161)> Additional info: this bug is no longer present in ruby 1.8.7 so it is just a matter of updating the rpm for ruby
Hello Giovanni, Rebase of Ruby to 1.8.7 version is not possible for RHEL-5. So this is not solution. Do you have by a chance patch which is fixing this issue? Nevertheless I am afraid that RHEL-5 is at end of cycle, so only bugs with huge impact are approved to be fixed. I am not sure this bug is one of them.
At the end, it is not bug according to Matz: http://rubyforge.org/tracker/?func=detail&atid=1698&aid=5263&group_id=426