[#109207] [Ruby master Feature#18915] New error class: NotImplementedYetError or scope change for NotImplementedYet — Quintasan <noreply@...>
Issue #18915 has been reported by Quintasan (Michał Zając).
18 messages
2022/07/14
[ruby-core:109142] [Ruby master Bug#18896] Shellwords.escape(nil) returns "empty" string
From:
"hspem (Per-Erik Martin)" <noreply@...>
Date:
2022-07-05 12:31:42 UTC
List:
ruby-core #109142
Issue #18896 has been reported by hspem (Per-Erik Martin). ---------------------------------------- Bug #18896: Shellwords.escape(nil) returns "empty" string https://bugs.ruby-lang.org/issues/18896 * Author: hspem (Per-Erik Martin) * Status: Open * Priority: Normal * ruby -v: ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [powerpc-aix7.1.0] * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN ---------------------------------------- Mistakenly calling Shellwords.escape with nil as parameter had this result: ``` ruby irb(main):002:0> Shellwords.escape(nil) => "''" ``` This is not helpful and resulted a hard-to-find bug when a script proceeded to use an empty string where it shouldn't be possible. nil is not a string and escape should raise an exception instead. Shellwords version: ``` shell # gem list shellwords *** LOCAL GEMS *** shellwords (default: 0.1.0) # ``` -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>