Skip to content

Commit 8cc8677

Browse files
committed
Avoid anonymous eval
It makes it hard to locate code when profiling etc.
1 parent e4907fd commit 8cc8677

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/thor/base.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ def start(given_args = ARGV, config = {})
506506
#
507507
def public_command(*names)
508508
names.each do |name|
509-
class_eval "def #{name}(*); super end"
509+
class_eval "def #{name}(*); super end", __FILE__, __LINE__
510510
end
511511
end
512512
alias_method :public_task, :public_command

0 commit comments

Comments
 (0)