<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -31,14 +31,16 @@ private
     if method.to_s =~ TwelveHour
       hour = ($1 == '12') ? 0 : $1.to_i
       hour += 12 if $2 == 'pm'
-      returning self.at_midnight + hour.hours do |result|
-        self.class.send(:define_method, method) { result } # short circuit future method_missing calls
-      end
+      # short circuit future method_missing calls by defining the method on the fly
+      self.class.send(:define_method, method) { self.at_midnight + hour.hours }
+      send(method)
+      
     elsif method.to_s =~ TwentyFourHour
       hour, min = $1.to_i, $2.to_i
-      returning self.at_midnight + hour.hours + min.minutes do |result|
-        self.class.send(:define_method, method) { result } # short circuit future method_missing calls
-      end
+      # short circuit future method_missing calls by defining the method on the fly
+      self.class.send(:define_method, method) { self.at_midnight + hour.hours + min.minutes }
+      send(method)
+      
     else
       method_missing_without_clock_time(method, *args, &amp;block)
     end</diff>
      <filename>lib/clock_time.rb</filename>
    </modified>
    <modified>
      <diff>@@ -19,6 +19,16 @@ describe 'Time with clock_time' do
       @time = Time.now
     end
     
+    describe &quot;just before midnight&quot; do
+      before do
+        @time = @time.at_midnight - 2.seconds
+      end
+      
+      it &quot;2am today should not be the same as 2am tomorrow&quot; do
+        @time.at_2am.should_not == (@time + 4.seconds).at_2am
+      end
+    end
+    
     it &quot;#at_12am should == time.at_beginning_of_day&quot; do
       @time.at_12am.should == @time.at_beginning_of_day
     end
@@ -78,5 +88,6 @@ describe 'Time with clock_time' do
     it &quot;should not respond to at_0060&quot; do
       @time.should_not respond_to(&quot;at_0060&quot;)
     end
+    
   end
 end
\ No newline at end of file</diff>
      <filename>spec/clock_time_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>89ba653da74dfd74eec20f86cbd210607cd924fd</id>
    </parent>
  </parents>
  <author>
    <name>Nicholas Rutherford</name>
    <email>nick.rutherford@ardes.com</email>
  </author>
  <url>http://github.com/ianwhite/clock_time/commit/fb42a3574beb3d9a3830c12ef89c095ca6de6d41</url>
  <id>fb42a3574beb3d9a3830c12ef89c095ca6de6d41</id>
  <committed-date>2009-02-11T07:23:15-08:00</committed-date>
  <authored-date>2009-02-11T07:07:10-08:00</authored-date>
  <message>add specs to test that the result is not cached.
fixed broken method_missing caching</message>
  <tree>2d779fa283cc0d14d162c2f3307480e5e9f25703</tree>
  <committer>
    <name>Nicholas Rutherford</name>
    <email>nick.rutherford@ardes.com</email>
  </committer>
</commit>
