Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Suma
- private
- @poop = 5
- public
- def initialize(param=0)
- @valor = param
- @val = 10
- end
- def ver
- tmp
- end
- protected
- def tmp
- puts @valor + @val + @poop # error here
- # nil can't be coerced into Fixnum (TypeError)
- end
- end
- sum = Suma.new(20)
- sum.ver
Add Comment
Please, Sign In to add comment