Permalink
Browse files

Make #tv_sec work

  • Loading branch information...
1 parent 0bd10b3 commit ac95af1ce14df82359cdf7f1283222f75aadad68 @alloy committed May 3, 2010
Showing with 2 additions and 1 deletion.
  1. +1 −0 mrtime.rb
  2. +1 −1 spec/time/{todo → }/tv_sec_spec.rb
View
1 mrtime.rb
@@ -211,6 +211,7 @@ def usec
def to_i
timeIntervalSince1970.round
end
+ alias_method :tv_sec, :to_i
def to_f
timeIntervalSince1970
View
2 spec/time/todo/tv_sec_spec.rb → spec/time/tv_sec_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../../spec_helper', __FILE__)
require File.expand_path('../fixtures/methods', __FILE__)
require File.expand_path('../shared/to_i', __FILE__)

0 comments on commit ac95af1

Please sign in to comment.