Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ruby-1.8.7-p174 > WeakRef
NameError: uninitialized constant WeakRef
from (irb):1
ruby-1.8.7-p174 > require 'weakref'
=> true
ruby-1.8.7-p174 > WeakRef
=> WeakRef
ruby-1.8.7-p174 >
rbx-1.0.1-20100603 > require 'weakref'
LoadError: no such file to load -- weakref
from Rubinius::CodeLoader#load_error at kernel/common/codeloader.rb:343
from Rubinius::CodeLoader#resolve_require_path at kernel/common/codeloader.rb:330
from Rubinius::CodeLoader#require at kernel/common/codeloader.rb:34
from Rubinius::CodeLoader.require at kernel/common/codeloader.rb:140
from Kernel(Object)#gem_original_require (require) at kernel/common/kernel.rb:693
from Kernel(Object)#require at /Users/cowboyd/.rvm/rubies/rbx-1.0.1-20100603/lib/rubygems/custom_require.rb:31
from Object#irb_binding {} at (irb):1
rbx-1.0.1-20100603 > WeakRef
=> WeakRef
rbx-1.0.1-20100603 > w = WeakRef.new(Object.new)
=> #<WeakRef:0x21c object=#<Object:0x21e>>
rbx-1.0.1-20100603 > w.weakref_alive?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.