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

Commit e8e0670

Browse files
committed
Merge pull request #18 from ruby-concurrency/removes-iron-ruby
Removes IronRuby support
2 parents 6d4d69c + afb06d1 commit e8e0670

File tree

4 files changed

+4
-21
lines changed

4 files changed

+4
-21
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ This library also includes tools for some common uses of weak and soft reference
3333

3434
## Problems with WeakRef
3535

36-
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, Rubinius, and IronRuby.
36+
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

3838
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.
3939
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.

lib/ref.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@ module Ref
1616
end
1717
else
1818
require 'ref/soft_reference'
19-
if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'ironruby'
20-
# IronRuby has it's own implementation of weak references.
21-
require 'ref/weak_reference/iron_ruby'
22-
elsif defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx'
19+
if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx'
2320
# If using Rubinius set the implementation to use WeakRef since it is very efficient and using finalizers is not.
2421
require 'ref/weak_reference/weak_ref'
2522
elsif defined?(::ObjectSpace::WeakMap)

lib/ref/weak_reference/iron_ruby.rb

Lines changed: 0 additions & 14 deletions
This file was deleted.

ref.gemspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
99
s.email = ['[email protected]']
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, Rubinius, and IronRuby). 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, REE, YARV, 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

@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
1919
s.files += Dir['test/**/*.*']
2020

2121
s.require_paths = ['lib']
22-
22+
2323
s.has_rdoc = true
2424
s.rdoc_options = ["--charset=UTF-8", "--main", "README.md"]
2525
s.extra_rdoc_files = ["README.md"]

0 commit comments

Comments
 (0)