Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

chain list assignment returns boolean #2117

Closed
tank-bohr opened this Issue · 3 comments

2 participants

@tank-bohr

mri behaviour:

1.9.3p362 :001 > def fake_rack
1.9.3p362 :002?> [:status, :headers, :body]
1.9.3p362 :003?> end
=> nil
1.9.3p362 :004 > response = (s, h, b = fake_rack)
=> [:status, :headers, :body]
1.9.3p362 :005 >

rbx behaviour:

rubinius-2.0.0.rc1 :001 > def fake_rack
rubinius-2.0.0.rc1 :002?> [:status, :headers, :body]
rubinius-2.0.0.rc1 :003?> end
=> #<Rubinius::CompiledCode fake_rake file=(irb)>
rubinius-2.0.0.rc1 :004 > response = (s, h, b = fake_rack)
=> true # OMG!!!

Edge rails doesn't work:
https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb#L18

@tank-bohr tank-bohr referenced this issue in rails/rails
Merged

doesn't work with rubinius #8782

@brixen
Owner

This duplicates #1765.

@brixen brixen closed this
@brixen
Owner

Also, note:

sasha:rubinius brian$ rbx
irb(main):001:0> def fake_rack
irb(main):002:1> [:status, :headers, :body]
irb(main):003:1> end
=> #
irb(main):004:0> s, h, b = response = fake_rack
=> true
irb(main):005:0> s
=> :status
irb(main):006:0> h
=> :headers
irb(main):007:0> b
=> :body
irb(main):008:0> 
@tank-bohr

thnx!

@sgerrand sgerrand referenced this issue from a commit in sgerrand/rails
@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.