Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoMethodError: undefined method `value' for nil:NilClass #4

Open
brundage opened this issue Jun 4, 2012 · 0 comments
Open

NoMethodError: undefined method `value' for nil:NilClass #4

brundage opened this issue Jun 4, 2012 · 0 comments

Comments

@brundage
Copy link

brundage commented Jun 4, 2012

0 HAL:0 work % irb
1.9.3p0 :001 > require 'quantity'
 => true 
1.9.3p0 :002 > q = Quantity.new(1, 'ml')
NoMethodError: undefined method `value' for nil:NilClass
    from /home/brundage/.rvm/gems/ruby-1.9.3-p0/gems/quantity-0.1.2/lib/quantity/unit.rb:297:in `block (2 levels) in calculate_value'
    from /home/brundage/.rvm/gems/ruby-1.9.3-p0/gems/quantity-0.1.2/lib/quantity/unit.rb:295:in `times'
    from /home/brundage/.rvm/gems/ruby-1.9.3-p0/gems/quantity-0.1.2/lib/quantity/unit.rb:295:in `block in calculate_value'
    from /home/brundage/.rvm/gems/ruby-1.9.3-p0/gems/quantity-0.1.2/lib/quantity/unit.rb:294:in `each'
    from /home/brundage/.rvm/gems/ruby-1.9.3-p0/gems/quantity-0.1.2/lib/quantity/unit.rb:294:in `calculate_value'
    from /home/brundage/.rvm/gems/ruby-1.9.3-p0/gems/quantity-0.1.2/lib/quantity/unit.rb:279:in `initialize'
    from /home/brundage/.rvm/gems/ruby-1.9.3-p0/gems/quantity-0.1.2/lib/quantity/unit.rb:256:in `new'
    from /home/brundage/.rvm/gems/ruby-1.9.3-p0/gems/quantity-0.1.2/lib/quantity/unit.rb:256:in `from_string_form'
    from /home/brundage/.rvm/gems/ruby-1.9.3-p0/gems/quantity-0.1.2/lib/quantity.rb:79:in `initialize'
    from (irb):2:in `new'
    from (irb):2
    from /home/brundage/.rvm/rubies/ruby-1.9.3-p0/bin/irb:16:in `<main>'
brundage added a commit to brundage/quantity that referenced this issue Jun 4, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant