[#104169] [Ruby master Feature#17938] Keyword alternative for boolean positional arguments — matheusrichardt@...

Issue #17938 has been reported by matheusrich (Matheus Richard).

12 messages 2021/06/04

[#104213] [Ruby master Feature#17942] Add a `initialize(public @a, private @b)` shortcut syntax for defining public/private accessors for instance vars — tyler@...

Issue #17942 has been reported by TylerRick (Tyler Rick).

6 messages 2021/06/09

[#104288] [Ruby master Bug#17992] Upstreaming the htmlentities gem into CGI#.(un)escape_html — alexandermomchilov@...

Issue #17992 has been reported by AMomchilov (Alexander Momchilov).

9 messages 2021/06/15

[#104338] [Ruby master Misc#17997] DevelopersMeeting20210715Japan — mame@...

Issue #17997 has been reported by mame (Yusuke Endoh).

10 messages 2021/06/17

[#104361] [Ruby master Bug#18000] have_library doesn't work when ruby is compiled with --disable-shared --disable-install-static-library — jean.boussier@...

Issue #18000 has been reported by byroot (Jean Boussier).

9 messages 2021/06/18

[#104401] [Ruby master Feature#18007] Help developers of C extensions meet requirements in "doc/extension.rdoc" — mike.dalessio@...

Issue #18007 has been reported by mdalessio (Mike Dalessio).

16 messages 2021/06/25

[#104430] [Ruby master Bug#18011] `Method#parameters` is incorrect for forwarded arguments — josh.cheek@...

Issue #18011 has been reported by josh.cheek (Josh Cheek).

12 messages 2021/06/29

[ruby-core:104397] [Ruby master Bug#12261] Windows: File.dirname with 2+ / or 2+ \\ will return // or \\\\

From: merch-redmine@...
Date: 2021-06-24 20:19:36 UTC
List: ruby-core #104397
Issue #12261 has been updated by jeremyevans0 (Jeremy Evans).

Assignee set to usa (Usaku NAKAMURA)
Status changed from Open to Assigned

I'm not sure whether this behavior was originally expected, but I think changing it at this point isn't worth the backwards compatibility breakage.  For example, consider the following:

```ruby
dir = File.dirname(string) # string could be '/////'
File.read(File.join(dir, 'server', 'share'))
```

If you change the behavior of `File.dirname` from returning `//` to returning `/`, you change which file is read. In general, that's probably going to result an an Errno::ENOENT exception, but in the pathological case, it results in an unintended file being read.

@usa Can you please determine whether this is a bug?

----------------------------------------
Bug #12261: Windows: File.dirname with 2+ / or 2+ \\ will return // or \\\\
https://bugs.ruby-lang.org/issues/12261#change-92638

* Author: enebo (Thomas Enebo)
* Status: Assigned
* Priority: Normal
* Assignee: usa (Usaku NAKAMURA)
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
I am working through some File.dirname issues on JRuby and I saw a ruby/spec covering this behavior on windows:

`File.dirname('/////').should == '//'`

Same result if backslashes are used.  Is there a reason for this result?  It does not seem useful to me but I am not much of a windows user.  I would think in this case it would be '/' since I don't see how this is useful for UNC paths in Ruby?  If someone could explain it then I will document this at least in JRuby source code :)

So far all versions of MRI seem to have this behavior.





-- 
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>

In This Thread

Prev Next