From f8ee7b2e91b02857b1aebc4a0e7edec50764306d Mon Sep 17 00:00:00 2001 From: Nigel Brookes-Thomas Date: Fri, 13 Mar 2020 11:33:40 +0000 Subject: [PATCH] conditional checking was arse backwards --- lib/roda/proxy.rb | 4 ++-- lib/roda/proxy/version.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/roda/proxy.rb b/lib/roda/proxy.rb index 4d5a43d..f5410b3 100644 --- a/lib/roda/proxy.rb +++ b/lib/roda/proxy.rb @@ -54,9 +54,9 @@ class Roda shall_proxy = Random.rand(0.0..1.0) <= probability if shall_proxy && ( condition.respond_to?(:call) ? condition.call : condition ) - yield(self) - else proxy + else + yield(self) end end diff --git a/lib/roda/proxy/version.rb b/lib/roda/proxy/version.rb index 7b64098..e134178 100644 --- a/lib/roda/proxy/version.rb +++ b/lib/roda/proxy/version.rb @@ -2,6 +2,6 @@ class Roda module Proxy - VERSION = '1.0.0' + VERSION = '1.0.1' end end