Created
July 13, 2011 03:52
-
-
Save chuckremes/1079682 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Charles-Remess-MacBook-Pro:~ cremes$ ruby -v | |
ruby 1.9.2p136 (2010-12-25 revision 30365) [x86_64-darwin10.6.0] | |
Charles-Remess-MacBook-Pro:~ cremes$ ruby -S gem install classy_struct | |
Successfully installed classy_struct-0.3.2 | |
1 gem installed | |
Installing ri documentation for classy_struct-0.3.2... | |
Installing RDoc documentation for classy_struct-0.3.2... | |
Charles-Remess-MacBook-Pro:~ cremes$ irb | |
ruby-1.9.2-p136 :001 > require 'classy_struct' | |
=> true | |
ruby-1.9.2-p136 :002 > A = ClassyStruct.new | |
=> A | |
ruby-1.9.2-p136 :003 > a = A.new :a => 'b' | |
=> {:a=>"b"} | |
ruby-1.9.2-p136 :004 > class B < A | |
ruby-1.9.2-p136 :005?> end | |
=> nil | |
ruby-1.9.2-p136 :006 > b = B.new :b => 3 | |
NoMethodError: undefined method `<<' for nil:NilClass | |
from /Users/cremes/.rvm/gems/ruby-1.9.2-p136/gems/classy_struct-0.3.2/lib/classy_struct.rb:82:in `method_missing' | |
from /Users/cremes/.rvm/gems/ruby-1.9.2-p136/gems/classy_struct-0.3.2/lib/classy_struct.rb:21:in `block in initialize' | |
from /Users/cremes/.rvm/gems/ruby-1.9.2-p136/gems/classy_struct-0.3.2/lib/classy_struct.rb:12:in `each_pair' | |
from /Users/cremes/.rvm/gems/ruby-1.9.2-p136/gems/classy_struct-0.3.2/lib/classy_struct.rb:12:in `initialize' | |
from (irb):6:in `new' | |
from (irb):6 | |
from /Users/cremes/.rvm/rubies/ruby-1.9.2-p136/bin/irb:16:in `<main>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Charles-Remess-MacBook-Pro:~ cremes$ ruby -S gem install classy_struct | |
Fetching: classy_struct-0.3.2.gem (100%) | |
Successfully installed classy_struct-0.3.2 | |
1 gem installed | |
Installing ri documentation for classy_struct-0.3.2... | |
Installing RDoc documentation for classy_struct-0.3.2... | |
Charles-Remess-MacBook-Pro:~ cremes$ irb | |
irb(main):001:0> require 'rubygems' | |
=> true | |
irb(main):002:0> require 'classy_struct' | |
=> true | |
irb(main):003:0> A = ClassyStruct.new | |
=> A | |
irb(main):004:0> a = A.new :woo => 'woot' | |
=> {:woo=>"woot"} | |
irb(main):005:0> class B < A | |
irb(main):006:1> end | |
=> nil | |
irb(main):007:0> b = B.new :really => 'yes' | |
NoMethodError: undefined method `<<' on nil:NilClass. | |
from Kernel(NilClass)#<< (method_missing) at kernel/delta/kernel.rb:79 | |
from ClassyStruct::ClassyStructClass(B)#really= (method_missing) at /Volumes/spiff/cremes/dev/ruby/rubinius.master/gems/1.8/gems/classy_struct-0.3.2/lib/classy_struct.rb:82 | |
from { } in ClassyStruct::ClassyStructClass(B)#initialize at /Volumes/spiff/cremes/dev/ruby/rubinius.master/gems/1.8/gems/classy_struct-0.3.2/lib/classy_struct.rb:21 | |
from { } in Hash#each_pair at kernel/common/hash.rb:348 | |
from Hash#each_entry at kernel/common/hash.rb:309 | |
from Hash#each_pair at kernel/common/hash.rb:347 | |
from ClassyStruct::ClassyStructClass(B)#initialize at /Volumes/spiff/cremes/dev/ruby/rubinius.master/gems/1.8/gems/classy_struct-0.3.2/lib/classy_struct.rb:12 | |
from { } in Object#irb_binding at (irb):7 | |
from Rubinius::BlockEnvironment#call_on_instance at kernel/common/block_environment.rb:72 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment