ref 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.3
1
+ 1.0.4
@@ -54,6 +54,8 @@ module Ref
54
54
 
55
55
  def supports_backreference?(obj)
56
56
  obj.respond_to?(:instance_variable_get) && obj.respond_to?(:instance_variable_defined?)
57
+ rescue NoMethodError
58
+ false
57
59
  end
58
60
  end
59
61
 
@@ -44,13 +44,11 @@ class TestWeakReference < Test::Unit::TestCase
44
44
  assert ref.inspect
45
45
  end
46
46
 
47
- class TestBasicObject < Object
48
- undef_method(:instance_variable_defined?)
49
- undef_method(:instance_variable_get)
50
- end
51
-
52
- def test_basic_object_does_not_throw_exception
53
- obj = TestBasicObject.new
54
- Ref::WeakReference.new(obj)
47
+ if defined?(BasicObject)
48
+ def test_basic_object_does_not_throw_exception
49
+ obj = BasicObject.new
50
+ ref = Ref::WeakReference.new(obj)
51
+ assert_nil ref.object
52
+ end
55
53
  end
56
54
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ref
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
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: 2013-03-18 00:00:00.000000000 Z
12
+ date: 2013-03-20 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Library that implements weak, soft, and strong references in Ruby that
15
15
  work across multiple runtimes (MRI, REE, YARV, Jruby, Rubinius, and IronRuby). Also