diff options
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/cgi_process.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/cgi_process.rb b/actionpack/lib/action_controller/cgi_process.rb index 49c5680f3f..8d24f8dd94 100644 --- a/actionpack/lib/action_controller/cgi_process.rb +++ b/actionpack/lib/action_controller/cgi_process.rb @@ -153,9 +153,10 @@ module ActionController #:nodoc: def stale_session_check! yield rescue ArgumentError => argument_error - if argument_error.message =~ %r{undefined class/module ([\w:]+)} + if argument_error.message =~ %r{undefined class/module ([\w:]*\w)} begin - Module.const_missing($1) + # Note that the regexp does not allow $1 to end with a ':' + $1.constantize rescue LoadError, NameError => const_error raise ActionController::SessionRestoreError, <<-end_msg Session contains objects whose class definition isn\'t available. |