
dm-rails benchmarking fails on Ruby 1.9.x
Reported by siplux | March 30th, 2010 @ 03:59 PM | in 1.0.0
Implicit argument passing of super from method defined by define_method(). Simple fix:
diff --git a/lib/dm-rails/railties/benchmarking_mixin.rb b/lib/dm-rails/railties/benchmarking_mixin.rb
index 498f3a3..0842a57 100644
--- a/lib/dm-rails/railties/benchmarking_mixin.rb
+++ b/lib/dm-rails/railties/benchmarking_mixin.rb
@@ -7,7 +7,7 @@ module DataMapper
define_method method do |*args, &block|
result = nil
@runtime ||= 0
- @runtime += Benchmark.ms { result = super }
+ @runtime += Benchmark.ms { result = super(*args,&block) }
result
end
end
Comments and changes to this ticket
-
Martin Gamsjaeger (snusnu) March 30th, 2010 @ 05:07 PM
- State changed from new to accepted
- Milestone set to 1.0.0
-
Martin Gamsjaeger (snusnu) March 30th, 2010 @ 05:21 PM
- State changed from accepted to resolved
Thx for reporting! Actually this was partly a regression too. Fixed in
http://github.com/datamapper/dm-rails/commit/e56dbcc3187a71133c46df...
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »