aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionpack/CHANGELOG.md7
-rw-r--r--actionpack/lib/action_dispatch/middleware/remote_ip.rb2
2 files changed, 8 insertions, 1 deletions
diff --git a/actionpack/CHANGELOG.md b/actionpack/CHANGELOG.md
index 4e8e0f41b4..e250450a76 100644
--- a/actionpack/CHANGELOG.md
+++ b/actionpack/CHANGELOG.md
@@ -1,3 +1,10 @@
+* Don't rescue `IPAddr::InvalidAddressError`.
+
+ `IPAddr::InvalidAddressError` does not exist in Ruby 1.9.3
+ and fails for JRuby in 1.9 mode.
+
+ *Peter Suschlik*
+
* Fix bug where the router would ignore any constraints added to redirect
routes.
diff --git a/actionpack/lib/action_dispatch/middleware/remote_ip.rb b/actionpack/lib/action_dispatch/middleware/remote_ip.rb
index b022fea001..7c4236518d 100644
--- a/actionpack/lib/action_dispatch/middleware/remote_ip.rb
+++ b/actionpack/lib/action_dispatch/middleware/remote_ip.rb
@@ -155,7 +155,7 @@ module ActionDispatch
range = IPAddr.new(ip).to_range
# we want to make sure nobody is sneaking a netmask in
range.begin == range.end
- rescue ArgumentError, IPAddr::InvalidAddressError
+ rescue ArgumentError
nil
end
end