From b906f78855989a5907d49d317e8e586b41818eaa Mon Sep 17 00:00:00 2001 From: glass Date: Thu, 22 Jun 2017 10:56:49 +0000 Subject: Fix exception type in option type checker * lib/shell/system-command.rb (SystemCommand#initialize): `def_e2message` wraps error message, but does not define new exception * test/shell/test_command_processor.rb: add a test This patch is authored by Kenichi Kamiya close #1657 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/shell/system-command.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/shell') diff --git a/lib/shell/system-command.rb b/lib/shell/system-command.rb index 81456e7db3..af22ed90d7 100644 --- a/lib/shell/system-command.rb +++ b/lib/shell/system-command.rb @@ -16,7 +16,7 @@ class Shell class SystemCommand < Filter def initialize(sh, command, *opts) if t = opts.find{|opt| !opt.kind_of?(String) && opt.class} - Shell.Fail Error::TypeError, t.class, "String" + Shell.Fail TypeError, t.class, "String" end super(sh) @command = command -- cgit v1.2.3