Skip to content

Commit

Permalink
Avoid anonymous eval
Browse files Browse the repository at this point in the history
It makes it hard to locate code when profiling etc.
  • Loading branch information
byroot committed Jan 11, 2023
1 parent e4907fd commit 7eb6f37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/thor/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ def start(given_args = ARGV, config = {})
#
def public_command(*names)
names.each do |name|
class_eval "def #{name}(*); super end"
class_eval "def #{name}(*); super end", __LINE__, __FILE__
end
end
alias_method :public_task, :public_command
Expand Down

0 comments on commit 7eb6f37

Please sign in to comment.