Permalink
Browse files

make max java int size a constant

  • Loading branch information...
1 parent 73374dd commit e24976c968a63316a5894252660dbd2fbe8fcee1 Marcus Peterson committed Sep 21, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/main/ruby/jruby/rack/response.rb
@@ -9,6 +9,8 @@ class JRuby::Rack::Response
include Java::org.jruby.rack.RackResponse
java_import java.nio.channels.Channels
+ MAX_JAVA_INT_BYTES = 2147483647
+
@@object_polluted = begin
# Fixnum should not have this method, and it
# shouldn't be on Object
@@ -34,7 +36,7 @@ def chunked?
end
def too_big_for_java_int?(size)
- size > 2147483647
+ size > MAX_JAVA_INT_BYTES
end
def getBody

0 comments on commit e24976c

Please sign in to comment.