[#83096] File.setuid? on IO (Re: [ruby-cvs:67289] normal:r60108 (trunk): file.c: release GVL in File.{setuid?, setgid?, sticky?}) — Nobuyoshi Nakada <nobu@...>
On 2017/10/04 8:47, normal@ruby-lang.org wrote:
5 messages
2017/10/04
[#83100] Re: File.setuid? on IO (Re: [ruby-cvs:67289] normal:r60108 (trunk): file.c: release GVL in File.{setuid?, setgid?, sticky?})
— Eric Wong <normalperson@...>
2017/10/04
Nobuyoshi Nakada <nobu@ruby-lang.org> wrote:
[#83105] Re: File.setuid? on IO (Re: [ruby-cvs:67289] normal:r60108 (trunk): file.c: release GVL in File.{setuid?, setgid?, sticky?})
— Nobuyoshi Nakada <nobu@...>
2017/10/04
On 2017/10/04 15:55, Eric Wong wrote:
[#83107] Alias Enumerable#include? to Enumerable#includes? — Alberto Almagro <albertoalmagro@...>
Hello,
9 messages
2017/10/04
[#83113] Re: Alias Enumerable#include? to Enumerable#includes?
— "Urabe, Shyouhei" <shyouhei@...>
2017/10/05
This has been requested countless times, then rejected each and every time.
[#83129] Re: Alias Enumerable#include? to Enumerable#includes?
— Alberto Almagro <albertoalmagro@...>
2017/10/05
Sorry I didn't found it on the core mail list's archive.
[#83138] Re: Alias Enumerable#include? to Enumerable#includes?
— "Urabe, Shyouhei" <shyouhei@...>
2017/10/06
Ruby has not been made of popular votes so far. You have to show us
[#83149] Re: Alias Enumerable#include? to Enumerable#includes?
— Eric Wong <normalperson@...>
2017/10/06
Alberto Almagro <albertoalmagro@gmail.com> wrote:
[#83200] [Ruby trunk Feature#13996] [PATCH] file.c: apply2files releases GVL — normalperson@...
Issue #13996 has been reported by normalperson (Eric Wong).
4 messages
2017/10/10
[ruby-core:83429] [Ruby trunk Feature#13532][Closed] Enable :encoding key or open-uri (open()) similar as to how File.read() and File.readlines() already allow for
From:
akr@...
Date:
2017-10-21 06:25:43 UTC
List:
ruby-core #83429
Issue #13532 has been updated by akr (Akira Tanaka).
Status changed from Assigned to Closed
:encoding option is implemented at r60232.
Note that encoding in mode string is already possible as open(filename, "r:enc").
----------------------------------------
Feature #13532: Enable :encoding key or open-uri (open()) similar as to how File.read() and File.readlines() already allow for
https://bugs.ruby-lang.org/issues/13532#change-67395
* Author: shevegen (Robert A. Heiler)
* Status: Closed
* Priority: Normal
* Assignee: akr (Akira Tanaka)
* Target version:
----------------------------------------
Hello ruby core team and everyone else.
I lately had some odd behaviour and mixing of Encodings in my
scripts.
I had a better look and realized that open-uri would return
UTF-8 whereas my other scripts would use another encoding. So
far so good, no big deal, I can just change the encoding. But
I was not aware of this.
I then looked at the documentation and found it to be lacking:
https://ruby-doc.org/stdlib-2.4.1/libdoc/open-uri/rdoc/OpenURI.html
Compare this to File.readlines():
https://ruby-doc.org/core-2.4.1/IO.html#method-c-readlines
File.readlines() also tells you how many arguments can be
passed.
(1) So my first suggestion is - could some kind soul please also
enable this for open-uri?
The major reason for me filing this feature request, is about
encoding support though, via open-uri.
File.open() and File.readlines() both allow an :encoding key
to be passed. This is very nifty, I use it a lot and it works
very well.
open-uri or rather its open() functionality, allows you to
pass in a Hash but this Hash has no :encoding key.
Example:
open("http://www.ruby-lang.org/", encoding: 'ISO-8859-1')
Error:
ArgumentError: unrecognized option: encoding
Could this perhaps be added for symmetry and consistency,
so that open() from open-uri will behave like File.read()
and File.readlines() would? E. g. an example for the latter
would be.
File.readlines('foobar.rb', :encoding => 'ISO-8859-1')
The very same syntax could also be used for open() of
open-uri.
Thanks for reading!
--
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>