power_enum 2.0.0 → 2.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.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YjczOWI2OTAxNmMxMmVmY2Q1ZjI5ZjAyZTFhMmUyNjllNDc2NzVlMw==
4
+ ZmRmODNmZTcwMzc5MTQxMTc0OTQ1MDUzMmUxMzYwOWFjYzZkMWU4Zg==
5
5
  data.tar.gz: !binary |-
6
- ZjNlM2IxMjNlZjBmZGE0YjZlMTA3ZDZjZWM3NzYzNjdlMTY5MGFkMg==
6
+ ODBjYjg2NTNlMmRkMDI4ODg3NTk5YTE3MjkzZjFhYTQ5ZDQzMDA5ZA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- OWJiOWExODIxNWU4MDVmYTA3NTRiMmE0NjlmMTRiMGNlMmE3Y2QzMWNhMTFj
10
- OGM1N2RkNWMxNzdlMDY5M2ExOGFjYzJhNzkzMDMxMGU3ODUyODNmYTJhZjkz
11
- MTdiNDZlZWE1YjQ5NmFiOTNlZWYwZWJlZjg0NTNlY2ViNzNhNzc=
9
+ YzQ1ZWY3ZjRmZWI0OWQ3NTAxNThhOWQ2Mjg0NjQ5NjRhZmMzOTg5YmY5ZTBh
10
+ MTFkYzI3NDMyZDhhMDU2M2Y0MmZhZTQzZmFlMDhhZDEyYzFkYzAwZGFmY2Qw
11
+ ZmRlN2NmYmMwZWQ1NTUwNDIyY2U1Njg3NzM0YzI5MDYxNjJjNDM=
12
12
  data.tar.gz: !binary |-
13
- NGE0MGYzM2RmMTQyNTU1OTBkZjlhOGFjMDRjZTczYjQ1ZGJlY2QxMWUzOGY1
14
- NTNmNjViMzk4YmFlZDMxNDFkYjZmODAxNWM2ZTUzNzlmYmUwNDA4YjQyOWY0
15
- YmNmZWEwMzM0ZDhhNzI3YjFiNzM2M2QxNWE3NmY0MTlmZWRiNGM=
13
+ NWVjYWM5ZDg5YzNkOGIzNGRlNzI5NzMwNGNhMjIyNDk3ZWI2ZWIwNmJiM2Zj
14
+ MzVlOThlZDIwYTExNWJjMDNhZWI4YjIwYTY0MGUxYmMyMzg0ODE3ODZlYWM3
15
+ OTMxMjM4ZjQyMzU2YjVlNTgwNTJhOTQ5ZWM1MTg2NDM2ZDQyYmY=
checksums.yaml.gz.sig CHANGED
Binary file
@@ -92,7 +92,14 @@ module PowerEnum::Enumerated
92
92
  # the need to re-alias the query methods.
93
93
  def preserve_query_aliases
94
94
  class << self
95
- alias_method :__all, :all
95
+ # I have to do the interesting hack below instead of using alias_method
96
+ # because there's some sort of weirdness going on with how __all binds
97
+ # to all in Ruby 2.0.
98
+ __all = self.instance_method(:all)
99
+
100
+ define_method(:__all) do
101
+ __all.bind(self).call
102
+ end
96
103
 
97
104
  # From ActiveRecord::Querying
98
105
  delegate :find, :take, :take!, :first, :first!, :last, :last!, :exists?, :any?, :many?, :to => :__all
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: power_enum
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Trevor Squires
metadata.gz.sig CHANGED
Binary file