Set __LINE__ correctly for rackup files. #397

Merged
merged 1 commit into from Aug 26, 2012

Conversation

Projects
None yet
3 participants
Contributor

ConradIrwin commented Jun 4, 2012

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

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

@raggi raggi added a commit that referenced this pull request Aug 26, 2012

@raggi raggi Merge pull request #397 from ConradIrwin/line-in-rackup
Set __LINE__ correctly for rackup files.
279e6d2

@raggi raggi merged commit 279e6d2 into rack:master Aug 26, 2012

Owner

raggi commented Aug 26, 2012

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 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