fork download
  1. #!/usr/bin/ruby -w
  2. # answer: http://o...content-available-to-author-only...e.jp/qa/q7095511.html
  3.  
  4. class Test
  5. def initialize(size)
  6. @ary = Array.new(size){false}
  7. end
  8.  
  9. def print
  10. super @ary
  11. end
  12. end
  13.  
  14. test = Test.new(5)
  15. test.print
Success #stdin #stdout 0s 4760KB
stdin
Standard input is empty
stdout
[false, false, false, false, false]