Set __LINE__ correctly for rackup files. #397

Merged
merged 1 commit into from Aug 26, 2012

3 participants

@ConradIrwin

Before this change the line numbers were off by one, which broke
debugging tools like Pry in addition to causing a smidgen of user
confusion.

Reported-At: pry/pry#571

@ConradIrwin ConradIrwin Set __LINE__ correctly for rackup files.
Before this change the line numbers were off by one, which broke
debugging tools like Pry in addition to causing a smidgen of user
confusion.

Reported-At: pry/pry#571
2fbf04b
@travisbot

This pull request fails (merged 2fbf04b into edc8b92).

@raggi raggi merged commit 279e6d2 into rack:master Aug 26, 2012
@raggi
Official Rack repositories member

Thank you.

@ghost Unknown commented on the diff Aug 26, 2012
test/spec_builder.rb
@@ -197,5 +197,11 @@ def config_file(name)
Rack::MockRequest.new(app).get("/").body.to_s.should.equal 'OK'
$:.pop
end
+
+ it "sets __LINE__ correctly" do
+ app, options = Rack::Builder.parse_file config_file('line.ru')
@ghost
ghost added a line comment Aug 26, 2012

Why not app, _ = … ? You can avoid any warnings that way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment