aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/CHANGELOG.md9
-rw-r--r--actionpack/lib/action_dispatch/request/session.rb4
-rw-r--r--actionpack/test/dispatch/request/session_test.rb10
3 files changed, 2 insertions, 21 deletions
diff --git a/actionpack/CHANGELOG.md b/actionpack/CHANGELOG.md
index 5b762a8f17..6b73b29ace 100644
--- a/actionpack/CHANGELOG.md
+++ b/actionpack/CHANGELOG.md
@@ -29,15 +29,6 @@
## Rails 5.0.0.beta3 (February 24, 2016) ##
-* Update session to have indifferent access across multiple requests.
-
- session[:deep][:hash] = "Magic"
-
- session[:deep][:hash] == "Magic"
- session[:deep]["hash"] == "Magic"
-
- *Tom Prats*
-
* Add application/gzip as a default mime type.
*Mehmet Emin İNAÇ*
diff --git a/actionpack/lib/action_dispatch/request/session.rb b/actionpack/lib/action_dispatch/request/session.rb
index f6428af636..42890225fa 100644
--- a/actionpack/lib/action_dispatch/request/session.rb
+++ b/actionpack/lib/action_dispatch/request/session.rb
@@ -9,7 +9,7 @@ module ActionDispatch
# Singleton object used to determine if an optional param wasn't specified
Unspecified = Object.new
-
+
# Creates a session hash, merging the properties of the previous session if any
def self.create(store, req, default_options)
session_was = find req
@@ -61,7 +61,7 @@ module ActionDispatch
def initialize(by, req)
@by = by
@req = req
- @delegate = {}.with_indifferent_access
+ @delegate = {}
@loaded = false
@exists = nil # we haven't checked yet
end
diff --git a/actionpack/test/dispatch/request/session_test.rb b/actionpack/test/dispatch/request/session_test.rb
index 3fc4ffd71c..7dcbcc5c21 100644
--- a/actionpack/test/dispatch/request/session_test.rb
+++ b/actionpack/test/dispatch/request/session_test.rb
@@ -105,16 +105,6 @@ module ActionDispatch
end
end
- def test_with_indifferent_access
- s = Session.create(store, req, {})
-
- s[:one] = { test: "deep" }
- s[:two] = { "test" => "deep" }
-
- assert_equal 'deep', s[:one]["test"]
- assert_equal 'deep', s[:two][:test]
- end
-
private
def store
Class.new {