[#92891] Question: ruby 2.7.0-preview1 also upgrades bundler to 2.1.0.pre.1? — Al Snow <jasnow@...>
Tried the new 2.7.0-preview1 upgrade to Ruby and see that bundler is also upgraded (to 2.1.0.pre.1).
5 messages
2019/05/30
[#92892] Re: Question: ruby 2.7.0-preview1 also upgrades bundler to 2.1.0.pre.1?
— SHIBATA Hiroshi <hsbt@...>
2019/05/30
Bundler 2.1.0.pree.1 is the expected version.
[ruby-core:92824] [Ruby trunk Bug#15873] FrozenError when using OpenURI.open
From:
nobu@...
Date:
2019-05-24 13:05:17 UTC
List:
ruby-core #92824
Issue #15873 has been updated by nobu (Nobuyoshi Nakada).
Status changed from Open to Closed
Probably you are using `frozen-string-literal` pragma.
Since 2.6, OpenURI clears the buffer from `Net::HTTPResponse#read_body` to reduce memory usage.
See [Feature #14320].
----------------------------------------
Bug #15873: FrozenError when using OpenURI.open
https://bugs.ruby-lang.org/issues/15873#change-78198
* Author: AlexGascon (Alex Gascon)
* Status: Closed
* Priority: Normal
* Assignee:
* Target version:
* ruby -v: ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-linux]
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
I just updated from Ruby 2.5.1 to 2.6.3 and I encountered a strange problem on a part that was working fine previously. It's on a Rails application, and on one of the tests I'm stubbing (using [webmock](https://github.com/bblimke/webmock)) an HTTP request that we perform to an external URL. However, when trying to access the information by using OpenURI I get a `FrozenError`.
The following block represents a minimal reproducible example of the problem that I'm experiencing
``` ruby
stub_request(:get, "https://files.lol/certificate_doc.pdf").to_return(status: 200, body: "Random information", headers: {})
file_content = open("https://files.lol/certificate_doc.pdf")
FrozenError: can't modify frozen String
from /home/alex/.rbenv/versions/2.6.3/lib/ruby/2.6.0/open-uri.rb:357:in `clear'
```
--
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>