hash_dealer 1.6.0 → 1.6.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/hash_dealer.gemspec +1 -1
- data/lib/core_extensions.rb +9 -10
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.6.
|
1
|
+
1.6.1
|
data/hash_dealer.gemspec
CHANGED
data/lib/core_extensions.rb
CHANGED
@@ -98,15 +98,15 @@ class String
|
|
98
98
|
# if we have a leading : or a /:xyz - a matcher is already defined
|
99
99
|
self =~ /(^:|\/:)/ ? PathString.new(self) : PathString.new(":#{self}")
|
100
100
|
end
|
101
|
-
define_method "
|
101
|
+
define_method "with_path_string_eql" do |other|
|
102
102
|
if other.is_a?(PathString)
|
103
103
|
return true if self.is_a?(PathString)
|
104
104
|
return other == self
|
105
105
|
end
|
106
|
-
return self.send("
|
106
|
+
return self.send("without_path_string_eql", other)
|
107
107
|
end
|
108
|
-
alias_method "
|
109
|
-
alias_method :==, "
|
108
|
+
alias_method "without_path_string_eql", :==
|
109
|
+
alias_method :==, "with_path_string_eql"
|
110
110
|
alias_method :eql?, :==
|
111
111
|
# make a string bold
|
112
112
|
def bold
|
@@ -174,12 +174,11 @@ class Array
|
|
174
174
|
# we want this to apply to both :eql? and ==
|
175
175
|
alias_method :eql?, :==
|
176
176
|
# we want this to add decorator behavior to ==, proxying to VariableArray if possible
|
177
|
-
define_method "
|
177
|
+
define_method "with_variable_array_eql" do |other|
|
178
178
|
return other == self if other.is_a?(VariableArray)
|
179
|
-
self.send("
|
179
|
+
self.send("without_variable_array_eql",other)
|
180
180
|
end
|
181
|
-
|
182
|
-
|
183
|
-
alias_method
|
184
|
-
alias_method :==, "==_with_variable_array"
|
181
|
+
|
182
|
+
alias_method 'without_variable_array_eql', :==
|
183
|
+
alias_method :==, 'with_variable_array_eql'
|
185
184
|
end
|