# File lib/main/base.rb, line 355 def stdin= io unless(defined?(@stdin) and (@stdin == io)) @stdin = if io.respond_to? 'read' io else fd = open io.to_s, 'r+' @finalizers.push lambda{ fd.close } fd end begin STDIN.reopen @stdin rescue $stdin = @stdin ::Object.const_set 'STDIN', @stdin end end end