equivalence 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/equivalence.rb CHANGED
@@ -20,7 +20,7 @@ module Equivalence
20
20
  name.start_with?('@') ? name : "self.#{name}"
21
21
  end
22
22
 
23
- class_eval <<-EVAL, __FILE__, __LINE__
23
+ class_eval <<-EVAL, __FILE__, __LINE__ + 1
24
24
  def hash
25
25
  [#{ivar_or_method_names.join(', ')}].hash
26
26
  end
@@ -30,7 +30,7 @@ module Equivalence
30
30
  def __define_equivalence_attribute_readers(method_names)
31
31
  method_names.each do |method|
32
32
  unless method_defined?(method)
33
- class_eval <<-EVAL, __FILE__, __LINE__
33
+ class_eval <<-EVAL, __FILE__, __LINE__ + 1
34
34
  attr_reader :#{method} unless private_method_defined?(:#{method})
35
35
  protected :#{method}
36
36
  EVAL
@@ -39,7 +39,7 @@ module Equivalence
39
39
  end
40
40
 
41
41
  def __define_equivalence_equality_methods(method_names)
42
- class_eval <<-EVAL, __FILE__, __LINE__
42
+ class_eval <<-EVAL, __FILE__, __LINE__ + 1
43
43
  def eql?(other)
44
44
  self.class == other.class &&
45
45
  #{method_names.map {|m| "self.#{m} == other.#{m}"}.join(" &&\n")}
@@ -1,3 +1,3 @@
1
1
  module Equivalence
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: equivalence
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-20 00:00:00.000000000 Z
12
+ date: 2012-08-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec