Skip to content

Instantly share code, notes, and snippets.

@cowboyd
Created June 15, 2010 06:06
Show Gist options
  • Save cowboyd/438756 to your computer and use it in GitHub Desktop.
Save cowboyd/438756 to your computer and use it in GitHub Desktop.
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