# File lib/main/program/instance_methods.rb, line 102 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.send(:remove_const, 'STDIN') ::Object.send(:const_set, 'STDIN', @stdin) end end end