summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2013-03-31 15:16:56 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2013-03-31 15:16:56 +0200
commit0432648df0f1ac5d01bb768033693abde071bd9e (patch)
tree42258cd418362d1d2c3fd2fbf0029e2158592dfe
parent07239053c6b72c073312cd281135c2744280c9f2 (diff)
downloadbacon-0432648df0f1ac5d01bb768033693abde071bd9e.tar.gz
bacon-0432648df0f1ac5d01bb768033693abde071bd9e.tar.xz
bacon-0432648df0f1ac5d01bb768033693abde071bd9e.zip
drop shadowing warning for Ruby 2.0
-rw-r--r--lib/bacon.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/bacon.rb b/lib/bacon.rb
index 213f1f0..771c6d6 100644
--- a/lib/bacon.rb
+++ b/lib/bacon.rb
@@ -218,7 +218,9 @@ module Bacon
     def describe(*args, &block)
       context = Bacon::Context.new(args.join(' '), &block)
       (parent_context = self).methods(false).each {|e|
-        class<<context; self end.send(:define_method, e) {|*args| parent_context.send(e, *args)}
+        (class << context; self; end).send(:define_method, e) { |*args2|
+          parent_context.send(e, *args2)
+        }
       }
       @before.each { |b| context.before(&b) }
       @after.each { |b| context.after(&b) }