Skip to content

Commit c52749e

Browse files
committed
[chore] Reinstate accidentally removed type
This type is deprecated but unintentionally removed via 9ff4142 to 1.2 branch.
1 parent b395fd0 commit c52749e

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

src/main/java/org/jruby/rack/RackEnvironment.java

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
package org.jruby.rack;
99

10+
import org.jruby.rack.ext.Input;
11+
1012
import java.io.IOException;
1113
import java.io.InputStream;
1214
import java.util.Enumeration;
@@ -157,4 +159,36 @@ public interface RackEnvironment {
157159
* @return the remote user
158160
*/
159161
String getRemoteUser();
162+
163+
/**
164+
* {@link RackEnvironment} extension to obtain a rack.input IO.
165+
* <p>
166+
* NOTE: This interface will most likely get moved onto the (parent)
167+
* environment interface directly once the deprecated way of maintaining
168+
* backwards compatibility (using jruby/rack/environment.rb) is removed.
169+
*
170+
* @deprecated Was an internal interface and is no longer used.
171+
* @author kares
172+
*/
173+
@Deprecated
174+
interface ToIO {
175+
176+
// TODO move to RackEnvironment once jruby/rack/environment.rb removed
177+
178+
/**
179+
* Convert this environment into a "rack.input" IO.
180+
* Replaces the <code>to_io</code> monkey-patch ...
181+
* @return rack.input
182+
*/
183+
public Input toIO();
184+
185+
/**
186+
* Set the rack.input, this is an optional operation and implementers
187+
* might ignore this call silently if they're capable of constructing
188+
* the rack.input themselves.
189+
* @param io the rack.input instance
190+
*/
191+
void setIO(Input io) ;
192+
193+
}
160194
}

0 commit comments

Comments
 (0)