summaryrefslogtreecommitdiff
path: root/spec/mspec/lib/mspec/guards/conflict.rb
diff options
context:
space:
mode:
authoreregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-06-15 12:48:26 +0000
committereregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-06-15 12:48:26 +0000
commit5ccf36c7ec8687199424d0966374343477ad55f8 (patch)
tree72a08e4b4634a0d1e1e33a02e61a07aa3c574a47 /spec/mspec/lib/mspec/guards/conflict.rb
parentbd8412b74f50d9ec7bee369970598532a828ed99 (diff)
Update to ruby/mspec@d900a49
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/mspec/lib/mspec/guards/conflict.rb')
-rw-r--r--spec/mspec/lib/mspec/guards/conflict.rb14
1 files changed, 6 insertions, 8 deletions
diff --git a/spec/mspec/lib/mspec/guards/conflict.rb b/spec/mspec/lib/mspec/guards/conflict.rb
index c1d33e3512..7a27671c1e 100644
--- a/spec/mspec/lib/mspec/guards/conflict.rb
+++ b/spec/mspec/lib/mspec/guards/conflict.rb
@@ -8,12 +8,10 @@ class ConflictsGuard < SpecGuard
end
end
-class Object
- # In some cases, libraries will modify another Ruby method's
- # behavior. The specs for the method's behavior will then fail
- # if that library is loaded. This guard will not run if any of
- # the specified constants exist in Object.constants.
- def conflicts_with(*modules, &block)
- ConflictsGuard.new(*modules).run_unless(:conflicts_with, &block)
- end
+# In some cases, libraries will modify another Ruby method's
+# behavior. The specs for the method's behavior will then fail
+# if that library is loaded. This guard will not run if any of
+# the specified constants exist in Object.constants.
+def conflicts_with(*modules, &block)
+ ConflictsGuard.new(*modules).run_unless(:conflicts_with, &block)
end