summaryrefslogtreecommitdiff
path: root/spec/ruby/core/proc/source_location_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/proc/source_location_spec.rb')
-rw-r--r--spec/ruby/core/proc/source_location_spec.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/ruby/core/proc/source_location_spec.rb b/spec/ruby/core/proc/source_location_spec.rb
index f268499b82..a5895a7fcb 100644
--- a/spec/ruby/core/proc/source_location_spec.rb
+++ b/spec/ruby/core/proc/source_location_spec.rb
@@ -83,4 +83,9 @@ describe "Proc#source_location" do
proc.source_location.should == nil
end
+
+ it "works for eval with a given line" do
+ proc = eval('-> {}', nil, "foo", 100)
+ proc.source_location.should == ["foo", 100]
+ end
end