Skip to content

Commit

Permalink
Let's see if this gets rid of the too many open files problem. Reopen…
Browse files Browse the repository at this point in the history
… ticket if it doesn't [#666 state:resolved]
  • Loading branch information
aslakhellesoy committed Nov 6, 2010
1 parent d46a1d0 commit 91b8757
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions History.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
=== Bugfixes
* Superfluous space after step_keyword value in snippet_text message (#679 Aslak Hellesøy)
* Better Handling for "announce" in HTML formatter (#676 Stephen Kennedy)
* Too many open files - getcwd (#666 Aslak Hellesøy)

=== New Features
* Performance degradation when running feature files with over 1000 steps (#675 Dimitri Geshef)
Expand Down
3 changes: 2 additions & 1 deletion lib/cucumber/core_ext/proc.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Proc extension to get more location info out of a proc
class Proc #:nodoc:
PROC_PATTERN = /[\d\w]+@(.+):(\d+).*>/
PWD = Dir.pwd

def to_comment_line
"# #{file_colon_line}"
Expand All @@ -14,7 +15,7 @@ def backtrace_line(name)
def file_colon_line
path, line = *to_s.match(PROC_PATTERN)[1..2]
path = File.expand_path(path)
pwd = File.expand_path(Dir.pwd)
pwd = File.expand_path(PWD)
if path.index(pwd)
path = path[pwd.length+1..-1]
elsif path =~ /.*\/gems\/(.*\.rb)$/
Expand Down

0 comments on commit 91b8757

Please sign in to comment.