refr 0.0.3.1 → 0.0.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/refr.rb +6 -2
  2. metadata +1 -1
data/lib/refr.rb CHANGED
@@ -16,7 +16,11 @@ class Reference < BasicObject
16
16
  end
17
17
 
18
18
  def self.[] (value, force=false)
19
- value.respond_to?(:___is_a_reference___) and not force ? value : self.local { :value }
19
+ if value.respond_to?(:___is_a_reference___) && !force
20
+ value
21
+ else
22
+ self.local { :value }
23
+ end
20
24
  end
21
25
 
22
26
  BasicObject.instance_methods.each {|meth|
@@ -43,7 +47,7 @@ class Reference < BasicObject
43
47
  end; alias =~ __set_referenced__
44
48
 
45
49
  def method_missing (id, *args, &block)
46
- __get__.__send__(id, *args, &block)
50
+ __get_referenced__.__send__(id, *args, &block)
47
51
  end
48
52
 
49
53
  def ___is_a_reference___; end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: refr
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.3.1
5
+ version: 0.0.3.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - meh.