[#81999] [Ruby trunk Bug#13737] "can't modify frozen String" when installing bundled gems — ko1@...
Issue #13737 has been updated by ko1 (Koichi Sasada).
4 messages
2017/07/11
[#82005] [Ruby trunk Bug#13737] "can't modify frozen String" when installing bundled gems — nobu@...
Issue #13737 has been updated by nobu (Nobuyoshi Nakada).
3 messages
2017/07/12
[#82102] Re: register_fstring_tainted:FL_TEST_RAW(str, RSTRING_FSTR) — Eric Wong <normalperson@...>
Koichi Sasada <ko1@atdot.net> wrote:
4 messages
2017/07/18
[#82151] [Ruby trunk Feature#13637] [PATCH] tool/runruby.rb: test with smallest possible machine stack — Rei.Odaira@...
Issue #13637 has been updated by ReiOdaira (Rei Odaira).
3 messages
2017/07/24
[ruby-core:81989] [Ruby trunk Bug#13736][Assigned] ruby -00 should be the same as setting $/=""
From:
nobu@...
Date:
2017-07-10 06:29:41 UTC
List:
ruby-core #81989
Issue #13736 has been updated by nobu (Nobuyoshi Nakada).
Description updated
Status changed from Open to Assigned
Assignee set to matz (Yukihiro Matsumoto)
I agree that it's a bug because ruby.1 states `-00 turns Ruby into paragraph mode.`
I'm uncertain the reason though, this behavior has been there since 0.95 at least, but 0.49 behaved same as perl.
----------------------------------------
Bug #13736: ruby -00 should be the same as setting $/=""
https://bugs.ruby-lang.org/issues/13736#change-65719
* Author: dawg (Andrew Dumke)
* Status: Assigned
* Priority: Normal
* Assignee: matz (Yukihiro Matsumoto)
* Target version:
* ruby -v: 2.4.1p111
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
Suppose you have blocks of text separated by 2 or more \n. A typical text file with records defined by a black line.
Given:
```
$ cat lines
f1, r1
f2, r1 then 2 \n:
f1, r2 then 3 \n:
f1,r3
f2,r3 then 4 \n:
f1, r4
f2,r4 then 6 \n:
f1,r5
```
The script `$ ruby -00 -F"\n" -lane 'END{p $.}' lines` SHOULD have the same number of records as `$ ruby -F"\n" -lane 'BEGIN{$/=""}; END{p $.}' lines`. It does not not.
The script `$ ruby -00 -F"\n" -lane 'END{p $.}' lines` SHOULD have the same number of record as `$ perl -00 -F"\n" -lane 'END{print $.}' lines` Again, it does not.
The script `$ ruby -00 -F"\n" -lane 'END{p $.}' lines` shows 8. The other scripts here show 5 -- the correct number.
The behavior of the `-00` command switch is not the same as perl's `-00` command switch. It is also not the same as setting `$/=""` in either ruby or perl.
The `\n\n` pattern between blocks should be a single record separator even if you have `\n\n\n\n\n` That is true in perl, awk, gawk, and ruby with `$/=""`. It is not true with `ruby -00`. This is a bug.
---Files--------------------------------
ruby_bug.sh (1.39 KB)
--
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>