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 CHANGED
@@ -1 +1 @@
1
- 1.6.0
1
+ 1.6.1
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "hash_dealer"
8
- s.version = "1.6.0"
8
+ s.version = "1.6.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Dan Langevin"]
@@ -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 "==_with_path_string" do |other|
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("==_without_path_string", other)
106
+ return self.send("without_path_string_eql", other)
107
107
  end
108
- alias_method "==_without_path_string", :==
109
- alias_method :==, "==_with_path_string"
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 "==_with_variable_array" do |other|
177
+ define_method "with_variable_array_eql" do |other|
178
178
  return other == self if other.is_a?(VariableArray)
179
- self.send("==_without_variable_array",other)
179
+ self.send("without_variable_array_eql",other)
180
180
  end
181
- # Equivalent to:
182
- # alias_method_chain "==", "variable_array"
183
- alias_method "==_without_variable_array", :==
184
- alias_method :==, "==_with_variable_array"
181
+
182
+ alias_method 'without_variable_array_eql', :==
183
+ alias_method :==, 'with_variable_array_eql'
185
184
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hash_dealer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.6.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: