From ce75f62a7c11b6f8c57baae8650f36322920f9d6 Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Fri, 16 Mar 2012 19:05:34 +0100 Subject: Remove passing arguments in #satisfy, simplify argument parsing This feature was never used and triggers a JRuby bug: http://jira.codehaus.org/browse/JRUBY-6550 Proposed by Gabriel Horner . --- lib/bacon.rb | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/bacon.rb b/lib/bacon.rb index abd52c1..2275047 100644 --- a/lib/bacon.rb +++ b/lib/bacon.rb @@ -319,14 +319,8 @@ class Should alias a be alias an be - def satisfy(*args, &block) - if args.size == 1 && String === args.first - description = args.shift - else - description = "" - end - - r = yield(@object, *args) + def satisfy(description="", &block) + r = yield(@object) if Bacon::Counter[:depth] > 0 Bacon::Counter[:requirements] += 1 raise Bacon::Error.new(:failed, description) unless @negated ^ r -- cgit 1.4.1