[#82706] [Ruby trunk Bug#13851] getting "can't modify string; temporarily locked" on non-frozen instances — cardoso_tiago@...
Issue #13851 has been updated by chucke (Tiago Cardoso).
3 messages
2017/09/07
[#82853] [Ruby trunk Bug#13916] Race condition when sending a signal to a new fork — russell.davis@...
Issue #13916 has been reported by russelldavis (Russell Davis).
3 messages
2017/09/19
[#82892] [Ruby trunk Bug#13921] buffered read_nonblock doesn't work as expected using SSLSocket — cardoso_tiago@...
Issue #13921 has been updated by chucke (Tiago Cardoso).
3 messages
2017/09/20
[ruby-core:82627] [Ruby trunk Bug#13858] getoptlong cannot process multiple line argument with equal sign (=) version
From:
mwang@...
Date:
2017-09-01 16:51:02 UTC
List:
ruby-core #82627
Issue #13858 has been reported by iefoaix (Michael Wang).
----------------------------------------
Bug #13858: getoptlong cannot process multiple line argument with equal sign (=) version
https://bugs.ruby-lang.org/issues/13858
* Author: iefoaix (Michael Wang)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
* ruby -v: ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
Here is the test case:
# more getopt.rb
require 'getoptlong'
a=GetoptLong.new(
[ '--user', '-u', GetoptLong::REQUIRED_ARGUMENT ],
[ '--statement', '-s', GetoptLong::REQUIRED_ARGUMENT ],
)
a.each { |x, y|
p x
p y
}
Here is the problem:
# ruby getopt.rb --user me --statement="
> select now() from dual
> "
"--user"
"me"
"--statement"
""
Please note the statement is empty while it is not. On contrary, without "=" sign it works fine:
# ruby getopt.rb --user me --statement "
select now() from dual
"
"--user"
"me"
"--statement"
"\nselect now() from dual\n"
It is believed this bug is due to the regex that `GetoptLong` uses to parse the argument for long opts. Please investigate and fix, thanks!
--
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>