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

Commit ab85f75

Browse files
author
Brian Durand
committed
rvm compatible
1 parent 5e925a4 commit ab85f75

File tree

5 files changed

+4
-1
lines changed

5 files changed

+4
-1
lines changed

Rakefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ require File.expand_path('../lib/references', __FILE__)
77
desc 'Default: run unit tests.'
88
task :default => :test
99

10+
desc 'RVM like to call it tests'
11+
task :tests => :test
12+
1013
Rake::TestTask.new do |t|
1114
t.libs << 'test'
1215
t.pattern = 'test/**/*_test.rb'

test/soft_reference_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def test_get_the_correct_object
3636

3737
def test_references_are_not_collected_immediately
3838
ref = References::SoftReference.new(Object.new)
39-
9.times{%w(allocate some memory on the heap) * 100; GC.start}
39+
9.times{arr = %w(allocate some memory on the heap); arr *= 100; GC.start}
4040
assert ref.object
4141
end
4242

0 commit comments

Comments
 (0)