Title: [653] trunk/rails-integration/src/main/java/org/jruby/webapp/RailsServlet.java: This needs to be reworked
Revision
653
Author
olabini
Date
2007-06-22 10:26:11 -0400 (Fri, 22 Jun 2007)

Log Message

This needs  to be reworked

Modified Paths


Diff

Modified: trunk/rails-integration/src/main/java/org/jruby/webapp/RailsServlet.java (652 => 653)


--- trunk/rails-integration/src/main/java/org/jruby/webapp/RailsServlet.java	2007-06-22 14:19:17 UTC (rev 652)
+++ trunk/rails-integration/src/main/java/org/jruby/webapp/RailsServlet.java	2007-06-22 14:26:11 UTC (rev 653)
@@ -75,18 +75,10 @@
 		RubyIO stdin = new RubyIO(runtime, request.getInputStream());
 		RubyIO stdout = new RubyIO(runtime, new HttpOutput(response));
 
-        IRubyObject v1 = runtime.getGlobalVariables().get("$stdin");
-        if(v1 instanceof RubyIO) {
-            ((RubyIO)v1).reopen(new IRubyObject[]{stdin});
-        } else {
-            runtime.defineVariable(new org.jruby.runtime.GlobalVariable(runtime, "$stdin", stdin));
-        }
-        v1 = runtime.getGlobalVariables().get("$stdout");
-        if(v1 instanceof RubyIO) {
-            ((RubyIO)v1).reopen(new IRubyObject[]{stdout});
-        } else {
-            runtime.defineVariable(new org.jruby.runtime.GlobalVariable(runtime, "$stdout", stdout));
-        }
+        runtime.defineVariable(new org.jruby.runtime.GlobalVariable(runtime, "$stdin", stdin));
+        runtime.defineVariable(new org.jruby.runtime.GlobalVariable(runtime, "$stdout", stdout));
+        runtime.defineVariable(new org.jruby.runtime.GlobalVariable(runtime, "$>", stdout));
+        runtime.defineVariable(new org.jruby.runtime.GlobalVariable(runtime, "$defout", stdout));
 
 		// setup the environment
 		setupEnvironment(runtime, request);
_______________________________________________
Jruby-extras-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/jruby-extras-devel

Reply via email to