Skip to content

Loading…

doesn't work with rubinius #8782

Merged
merged 1 commit into from

2 participants

@tank-bohr

Rubinius returns a boolean after such assingment
response = (_, headers, body = @app.call(env))

see rubinius/rubinius#2117

@rafaelfranca rafaelfranca commented on an outdated diff
...ck/lib/action_dispatch/middleware/debug_exceptions.rb
@@ -15,7 +15,8 @@ def initialize(app, routes_app = nil)
def call(env)
begin
- response = (_, headers, body = @app.call(env))
+ status, headers, body = @app.call(env)
+ response = [status, headers, body]
@rafaelfranca Ruby on Rails member

I think is better to build the response only where it is used, so we will don't need the local variable.

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@rafaelfranca
Ruby on Rails member

Could you squash your commits?

@tank-bohr

yep. one minute

@tank-bohr tank-bohr fix for rbx
Rubinius returns a boolean after such assingment
response = (_, headers, body = @app.call(env))

see rubinius/rubinius#2117

get rid of a local variable
8f18550
@tank-bohr tank-bohr closed this
@tank-bohr

oops. issue has closed
but i've squashed commits :)

@rafaelfranca rafaelfranca reopened this
@rafaelfranca rafaelfranca merged commit 699bae6 into rails:master
@rafaelfranca
Ruby on Rails member

Thank you

@tank-bohr

Brian Ford has noticed interesting thing

rubinius/rubinius#2117 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 6, 2013
  1. @tank-bohr

    fix for rbx

    tank-bohr committed with Alexey Nikitin
    Rubinius returns a boolean after such assingment
    response = (_, headers, body = @app.call(env))
    
    see rubinius/rubinius#2117
    
    get rid of a local variable
Showing with 2 additions and 2 deletions.
  1. +2 −2 actionpack/lib/action_dispatch/middleware/debug_exceptions.rb
View
4 actionpack/lib/action_dispatch/middleware/debug_exceptions.rb
@@ -15,7 +15,7 @@ def initialize(app, routes_app = nil)
def call(env)
begin
- response = (_, headers, body = @app.call(env))
+ status, headers, body = @app.call(env)
if headers['X-Cascade'] == 'pass'
body.close if body.respond_to?(:close)
@@ -25,7 +25,7 @@ def call(env)
raise exception if env['action_dispatch.show_exceptions'] == false
end
- exception ? render_exception(env, exception) : response
+ exception ? render_exception(env, exception) : [status, headers, body]
end
private
Something went wrong with that request. Please try again.