Skip to content
This repository was archived by the owner on Mar 15, 2022. It is now read-only.

Commit 9f8b831

Browse files
committed
Updates Readme
1 parent d9a820f commit 9f8b831

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

README.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,6 @@ This library also includes tools for some common uses of weak and soft reference
3535

3636
Ruby does come with the `WeakRef` class in the standard library. However, there are [issues with this class](https://bugs.ruby-lang.org/issues/4168) across several different Ruby runtimes. This gem provides a common interface to weak references that works across MRI, Ruby Enterprise Edition, YARV, JRuby and Rubinius.
3737

38-
1. MRI and REE 1.8 - `WeakRef` extends from Delegator which is a very heavy weight class under Ruby 1.8. Creating a `WeakRef` object will allocate thousands of other objects and use up hundreds of kilobytes of memory. This makes `WeakRef` all but unusable even if you only need several hundred of them.
39-
2. YARV 1.9 - `WeakRef` is unsafe to use because the garbage collector can run in a different system thread than a thread allocating memory. This exposes a bug where a `WeakRef` may end up pointing to a completely different object than it originally referenced.
40-
3. Jruby and IronRuby - Jruby and IronRuby using the Ruby 1.8 libraries suffers from the same performance issue with the Delegator class. Furthermore, these VM's don't implement the method used to load an object from the heap using an object id and so cannot use a pure Ruby method to implement weak references.
41-
4. Rubinius - Rubinius implements `WeakRef` with a lighter weight version of delegation and works very well.
42-
5. MRI Ruby 2.0 has a good implementation of `WeakRef`.
38+
1. Rubinius - Rubinius implements `WeakRef` with a lighter weight version of delegation and works very well.
39+
2. MRI Ruby 2.0+ has a good implementation of `WeakRef`.
4340

44-
## BasicObject
45-
46-
Note that weak references will not work with MRI 1.9 or earlier. References will be created, but the objects will never be stored so the reference object will always treat the object as if it is always garbage collected. BasicObject does not implement the necessary methods to maintain the reference.

ref.gemspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ require 'ref/version'
55
Gem::Specification.new do |s|
66
s.name = 'ref'
77
s.version = Ref::VERSION
8-
s.authors = ['Brian Durand']
9-
s.email = ['[email protected]']
8+
s.authors = ['Brian Durand', 'The Ruby Concurrency Team']
9+
1010
s.homepage = "http://github.com/ruby-concurrency/ref"
1111
s.summary = "Library that implements weak, soft, and strong references in Ruby."
12-
s.description = "Library that implements weak, soft, and strong references in Ruby that work across multiple runtimes (MRI, REE, YARV, Jruby and Rubinius). Also includes implementation of maps/hashes that use references and a reference queue."
12+
s.description = "Library that implements weak, soft, and strong references in Ruby that work across multiple runtimes (MRI,Jruby and Rubinius). Also includes implementation of maps/hashes that use references and a reference queue."
1313
s.license = "MIT"
1414
s.date = Time.now.strftime('%Y-%m-%d')
1515

0 commit comments

Comments
 (0)