rubinius/rubinius — pull request #1271 by frasca (2011-10-17 03:09:28+00:00)
Title: [1.9] Patch for DateTime#strftime, DateTime#second, DateTime#minute

Fixes the following spec failures for 1.9

1)
DateTime.minute returns 0 if no argument is passed ERROR
NoMethodError: undefined method `minute' on an instance of DateTime.

2)
DateTime.minute returns the minute passed as argument ERROR
NoMethodError: undefined method `minute' on an instance of DateTime.

3)
DateTime.minute adds 60 to negative minutes ERROR
NoMethodError: undefined method `minute' on an instance of DateTime.

4)
DateTime.minute returns the absolute value of a Rational ERROR
NoMethodError: undefined method `minute' on an instance of DateTime.

5)
DateTime.minute returns the absolute value of a Float ERROR
NoMethodError: undefined method `minute' on an instance of DateTime.

6)
DateTime.minute returns a fraction of an hour ERROR
NoMethodError: undefined method `minute' on an instance of DateTime.

7)
DateTime.minute takes a minute fraction near 60 ERROR
NoMethodError: undefined method `minute' on an instance of DateTime.

8)
DateTime#second returns 0 seconds if passed no arguments ERROR
NoMethodError: undefined method `second' on an instance of DateTime.

9)
DateTime#second returns the seconds passed in the arguments ERROR
NoMethodError: undefined method `second' on an instance of DateTime.

10)
DateTime#second adds 60 to negative values ERROR
NoMethodError: undefined method `second' on an instance of DateTime.

11)
DateTime#second returns the absolute value of a Rational ERROR
NoMethodError: undefined method `second' on an instance of DateTime.

12)
DateTime#second returns the absolute value of a float ERROR
NoMethodError: undefined method `second' on an instance of DateTime.

13)
DateTime#second displays the fraction of a minute ERROR
NoMethodError: undefined method `second' on an instance of DateTime.

14)
DateTime#second takes a second fraction near 60 ERROR
NoMethodError: undefined method `second' on an instance of DateTime.

15)
DateTime#strftime shows the number of fractional seconds with leading zeroes to two decimal places FAILED
Expected "000000000"
to equal "00"

16)
DateTime#strftime shows the number of fractional milliseconds with leading zeroes FAILED
Expected "000000000"
to equal "000"

17)
DateTime#strftime shows the number of fractional microseconds with leading zeroes FAILED
Expected "000000000"
to equal "000000"