[#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:83483] [Ruby trunk Feature#2149][Feedback] Pathname#include?
From:
mame@...
Date:
2017-10-22 00:47:28 UTC
List:
ruby-core #83483
Issue #2149 has been updated by mame (Yusuke Endoh).
Status changed from Assigned to Feedback
I asked akr's opinion.
He looks neutral to this proposal, but we need to work out details. The current PoC implementation wrongly allows `/foo/bar` to match with `/fo`. Also, we need a better name than `include?`, which should be more suitable to the detailed spec of the method.
----------------------------------------
Feature #2149: Pathname#include?
https://bugs.ruby-lang.org/issues/2149#change-67490
* Author: erikh (Erik Hollensbe)
* Status: Feedback
* Priority: Normal
* Assignee: akr (Akira Tanaka)
* Target version: next minor
----------------------------------------
=begin
pre-cleaning the paths of both side of this call and seeing if the RHS exists in the LHS would be a very useful feature for Pathname users; especially those who are trying to evaluate whether or not a path (after cleanup) is a child of another.
I wrote up a basic implementation, and would be happy to bulletproof it (it doesn't handle relative paths right now, for instance) and write a more formal patch if this is an acceptable addition.
<pre>
class Pathname
def include?(other_path)
case other_path
when String
other_path = Pathname.new(other_path)
when Pathname
else
raise "#{other_path.inspect}: Not a Pathname"
end
!!(self.cleanpath.to_s.index(other_path.cleanpath.to_s, 0) == 0)
end
end
</pre>
=end
--
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>