fork(1) download
  1. class C
  2. #attr_reader :value
  3. #attr_writer :value
  4. attr_accessor :value
  5. def initialize(v)
  6. @value = v
  7. end
  8. def show()
  9. p @value
  10. end
  11. end
  12. c1 = C.new(10)
  13. p c1.value
  14. c1.value = 20
  15. p c1.value
Success #stdin #stdout 0.01s 7452KB
stdin
Standard input is empty
stdout
10
20