@@ -8,8 +8,8 @@ module BuiltIn
8
8
#
9
9
# ### Warning:
10
10
#
11
- # This class is for internal use, and subject to change without notice. We
12
- # strongly recommend that you do not base your custom matchers on this
11
+ # This class is for internal use, and subject to change without notice.
12
+ # We strongly recommend that you do not base your custom matchers on this
13
13
# class. If/when this changes, we will announce it and remove this warning.
14
14
class BaseMatcher
15
15
include RSpec ::Matchers ::Composable
@@ -92,7 +92,7 @@ def actual_formatted
92
92
93
93
# @private
94
94
def self . matcher_name
95
- @matcher_name ||= underscore ( name . split ( "::" ) . last )
95
+ @matcher_name ||= underscore ( name . split ( '::' ) . last )
96
96
end
97
97
98
98
# @private
@@ -101,7 +101,7 @@ def self.underscore(camel_cased_word)
101
101
word = camel_cased_word . to_s . dup
102
102
word . gsub! ( /([A-Z]+)([A-Z][a-z])/ , '\1_\2' )
103
103
word . gsub! ( /([a-z\d ])([A-Z])/ , '\1_\2' )
104
- word . tr! ( "-" , "_" )
104
+ word . tr! ( '-' , '_' )
105
105
word . downcase!
106
106
word
107
107
end
@@ -118,7 +118,7 @@ def assert_ivars(*expected_ivars)
118
118
if RUBY_VERSION . to_f < 1.9
119
119
# :nocov:
120
120
def present_ivars
121
- instance_variables . map { | v | v . to_sym }
121
+ instance_variables . map ( & : to_sym)
122
122
end
123
123
# :nocov:
124
124
else
@@ -168,7 +168,7 @@ def failure_message_when_negated
168
168
# @private
169
169
def self . has_default_failure_messages? ( matcher )
170
170
matcher . method ( :failure_message ) . owner == self &&
171
- matcher . method ( :failure_message_when_negated ) . owner == self
171
+ matcher . method ( :failure_message_when_negated ) . owner == self
172
172
rescue NameError
173
173
false
174
174
end
0 commit comments