Guest User

Untitled

a guest
May 19th, 2018
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Suma
  2.     private
  3.         @poop = 5
  4.     public
  5.         def initialize(param=0)
  6.             @valor = param
  7.             @val = 10
  8.         end
  9.         def ver
  10.             tmp
  11.         end
  12.     protected
  13.         def tmp
  14.             puts @valor + @val + @poop # error here
  15.             # nil can't be coerced into Fixnum (TypeError)
  16.         end
  17. end
  18.  
  19. sum = Suma.new(20)
  20. sum.ver
Add Comment
Please, Sign In to add comment