* [ruby-core:72367] [Ruby trunk - Bug #11841] [Open] StringIO with read and `nil, ''` arguments broken with enabled frozen string literal
[not found] <redmine.issue-11841.20151218163328@ruby-lang.org>
@ 2015-12-18 16:33 ` deepjungle.maca
2015-12-18 16:34 ` [ruby-core:72368] [Ruby trunk - Bug #11841] " deepjungle.maca
` (2 subsequent siblings)
3 siblings, 0 replies; 4+ messages in thread
From: deepjungle.maca @ 2015-12-18 16:33 UTC (permalink / raw)
To: ruby-core
Issue #11841 has been reported by deepj #.
----------------------------------------
Bug #11841: StringIO with read and `nil, ''` arguments broken with enabled frozen string literal
https://bugs.ruby-lang.org/issues/11841
* Author: deepj #
* Status: Open
* Priority: Normal
* Assignee:
* ruby -v:
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
I'm not sure what behavior is expected here. But the following use case is used in rack (https://github.com/rack/rack/blob/master/test/spec_lint.rb#L496). If frozen string literal is enabled it throws `read': can't modify frozen String (RuntimeError), otherwise nothing.
~~~
# frozen_string_literal: true
io = StringIO.new('')
io.read(*[nil, ''])
~~~
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ruby-core:72368] [Ruby trunk - Bug #11841] StringIO with read and `nil, ''` arguments broken with enabled frozen string literal
[not found] <redmine.issue-11841.20151218163328@ruby-lang.org>
2015-12-18 16:33 ` [ruby-core:72367] [Ruby trunk - Bug #11841] [Open] StringIO with read and `nil, ''` arguments broken with enabled frozen string literal deepjungle.maca
@ 2015-12-18 16:34 ` deepjungle.maca
2015-12-18 23:52 ` [ruby-core:72370] [Ruby trunk - Bug #11841] [Rejected] " shugo
2015-12-21 23:55 ` [ruby-core:72424] [Ruby trunk - Bug #11841] " deepjungle.maca
3 siblings, 0 replies; 4+ messages in thread
From: deepjungle.maca @ 2015-12-18 16:34 UTC (permalink / raw)
To: ruby-core
Issue #11841 has been updated by deepj #.
ruby -v set to ruby 2.3.0dev (2015-12-19 trunk 53195) [x86_64-darwin15]
----------------------------------------
Bug #11841: StringIO with read and `nil, ''` arguments broken with enabled frozen string literal
https://bugs.ruby-lang.org/issues/11841#change-55659
* Author: deepj #
* Status: Open
* Priority: Normal
* Assignee:
* ruby -v: ruby 2.3.0dev (2015-12-19 trunk 53195) [x86_64-darwin15]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
I'm not sure what behavior is expected here. But the following use case is used in rack (https://github.com/rack/rack/blob/master/test/spec_lint.rb#L496). If frozen string literal is enabled it throws `read': can't modify frozen String (RuntimeError), otherwise nothing.
~~~
# frozen_string_literal: true
io = StringIO.new('')
io.read(*[nil, ''])
~~~
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ruby-core:72370] [Ruby trunk - Bug #11841] [Rejected] StringIO with read and `nil, ''` arguments broken with enabled frozen string literal
[not found] <redmine.issue-11841.20151218163328@ruby-lang.org>
2015-12-18 16:33 ` [ruby-core:72367] [Ruby trunk - Bug #11841] [Open] StringIO with read and `nil, ''` arguments broken with enabled frozen string literal deepjungle.maca
2015-12-18 16:34 ` [ruby-core:72368] [Ruby trunk - Bug #11841] " deepjungle.maca
@ 2015-12-18 23:52 ` shugo
2015-12-21 23:55 ` [ruby-core:72424] [Ruby trunk - Bug #11841] " deepjungle.maca
3 siblings, 0 replies; 4+ messages in thread
From: shugo @ 2015-12-18 23:52 UTC (permalink / raw)
To: ruby-core
Issue #11841 has been updated by Shugo Maeda.
Status changed from Open to Rejected
deepj # wrote:
> ~~~
> # frozen_string_literal: true
>
> io = StringIO.new('')
>
> io.read(*[nil, ''])
> ~~~
The second argument of StringIO#read is a buffer to read, so it shouldn't be frozen.
```
io.read(*[nil, String.new])
```
----------------------------------------
Bug #11841: StringIO with read and `nil, ''` arguments broken with enabled frozen string literal
https://bugs.ruby-lang.org/issues/11841#change-55661
* Author: deepj #
* Status: Rejected
* Priority: Normal
* Assignee:
* ruby -v: ruby 2.3.0dev (2015-12-19 trunk 53195) [x86_64-darwin15]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
I'm not sure what behavior is expected here. But the following use case is used in rack (https://github.com/rack/rack/blob/master/test/spec_lint.rb#L496). If frozen string literal is enabled it throws `read': can't modify frozen String (RuntimeError), otherwise nothing.
~~~
# frozen_string_literal: true
io = StringIO.new('')
io.read(*[nil, ''])
~~~
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ruby-core:72424] [Ruby trunk - Bug #11841] StringIO with read and `nil, ''` arguments broken with enabled frozen string literal
[not found] <redmine.issue-11841.20151218163328@ruby-lang.org>
` (2 preceding siblings ...)
2015-12-18 23:52 ` [ruby-core:72370] [Ruby trunk - Bug #11841] [Rejected] " shugo
@ 2015-12-21 23:55 ` deepjungle.maca
3 siblings, 0 replies; 4+ messages in thread
From: deepjungle.maca @ 2015-12-21 23:55 UTC (permalink / raw)
To: ruby-core
Issue #11841 has been updated by deepj #.
Thanks. In fact, I didn't realized the second argument is actually a buffer. My mistake
----------------------------------------
Bug #11841: StringIO with read and `nil, ''` arguments broken with enabled frozen string literal
https://bugs.ruby-lang.org/issues/11841#change-55717
* Author: deepj #
* Status: Rejected
* Priority: Normal
* Assignee:
* ruby -v: ruby 2.3.0dev (2015-12-19 trunk 53195) [x86_64-darwin15]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
I'm not sure what behavior is expected here. But the following use case is used in rack (https://github.com/rack/rack/blob/master/test/spec_lint.rb#L496). If frozen string literal is enabled it throws `read': can't modify frozen String (RuntimeError), otherwise nothing.
~~~
# frozen_string_literal: true
io = StringIO.new('')
io.read(*[nil, ''])
~~~
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-12-21 23:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <redmine.issue-11841.20151218163328@ruby-lang.org>
2015-12-18 16:33 ` [ruby-core:72367] [Ruby trunk - Bug #11841] [Open] StringIO with read and `nil, ''` arguments broken with enabled frozen string literal deepjungle.maca
2015-12-18 16:34 ` [ruby-core:72368] [Ruby trunk - Bug #11841] " deepjungle.maca
2015-12-18 23:52 ` [ruby-core:72370] [Ruby trunk - Bug #11841] [Rejected] " shugo
2015-12-21 23:55 ` [ruby-core:72424] [Ruby trunk - Bug #11841] " deepjungle.maca
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).