[#4834] Fwd: Re: Whats so different about a Hash? — Andrew Walrond <andrew@...>
>>>>> "A" == Andrew Walrond <andrew@walrond.org> writes:
On Thursday 05 May 2005 13:48, ts wrote:
>>>>> "A" == Andrew Walrond <andrew@walrond.org> writes:
On Thursday 05 May 2005 13:57, ts wrote:
[#4844] Getting rid of Object#equal?()? — =?ISO-8859-15?Q?Florian_Gro=DF?= <florgro@...>
Moin.
[#4848] No way to change socket timeout on opened URI — noreply@...
Bugs item #1878, was opened at 2005-05-05 17:55
[#4855] Method hooks in singleton classes — Pit Capitain <pit@...>
Hello Ruby-maintainers,
[#4858] Build fails on OSX Tiger 10.4 — noreply@...
Bugs item #1883, was opened at 2005-05-06 14:55
Hi,
Hi,
Hi,
On 5/19/05, Shugo Maeda <shugo@ruby-lang.org> wrote:
Hi,
Hi,
[#4869] Infinite loop on YAML.dump (Re: ruby-list:40801) — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
Hello.
[#4874] - Need to reduce Ruby Sources to the Minimal — Ilias Lazaridis <ilias@...>
Hello all,
Ilias Lazaridis schrieb:
Pit Capitain wrote:
Ryan Davis wrote:
ES wrote:
On May 12, 2005, at 3:13 PM, Ilias Lazaridis wrote:
Mathieu Bouchard wrote:
On Thursday 12 May 2005 22:09, Ilias Lazaridis wrote:
Francois GORET wrote:
Hi,
nobu.nokada@softhome.net wrote:
Hi,
nobu.nokada@softhome.net wrote:
[#4881] Encoding Pragma — Bertram Scharpf <lists@...>
Hi,
[#4886] ruby 1.8.3 preview1 — Yukihiro Matsumoto <matz@...>
Hi,
Yukihiro Matsumoto <matz@ruby-lang.org> [2005-05-12 17:49]:
>What about [ruby-core:4296]?
[#4911] Pointless argc check in Array#select — noreply@...
Patches item #1900, was opened at 2005-05-12 09:33
noreply@rubyforge.org wrote:
>>>>> "D" == Daniel Berger <djberge@qwest.com> writes:
ts wrote:
>>>>> "D" == Daniel Berger <djberge@qwest.com> writes:
On 5/12/05, ts <decoux@moulon.inra.fr> wrote:
Austin Ziegler wrote:
[#4919] - Hierarchical/Modular Directory Structure — Ilias Lazaridis <ilias@...>
The source-code structure should be simplified, lowering barriers for
Hi,
Nakada, Nobuyoshi wrote:
Ilias Lazaridis wrote:
On 5/14/05, Ilias Lazaridis <ilias@lazaridis.com> wrote:
Austin Ziegler wrote:
Hi,
nobu.nokada@softhome.net wrote:
[#4932] ruby-1.8.3 preview1 - failure: cygwin. — Hugh Sasse <hgs@...>
I've just tried to build the preview and got:
[#4992] Pathname#unlink fails on a symlink which points to a directory. — noreply@...
Bugs item #1917, was opened at 2005-05-14 21:33
In article <200505142133.j4ELXEaM011256@rubyforge.org>,
Hello.
In article <20050515153530.0D9F30E0.ocean@m2.ccsnet.ne.jp>,
[#5006] Suggestion for avoiding incivilities — Gavin Sinclair <gsinclair@...>
Hi all,
[#5010] - Function Argument Conventions — Ilias Lazaridis <ilias@...>
As a general rule, the first argument to a function should be the
[#5020] Problems with the "outer scope" operator — Lothar Scholz <mailinglists@...>
Hello,
[#5039] CGI::escapeHTML escapes the ampersand in an existing escape command — noreply@...
Bugs item #1930, was opened at 2005-05-19 11:45
Hi,
Thu, 19 May 2005 13:09:45 +0900, nobuyoshi nakada
Hi,
[#5040] Suggestion to add alias for underscore style method names to camel case named class methods in CGI — noreply@...
Bugs item #1931, was opened at 2005-05-19 11:46
On Thu, 19 May 2005 noreply@rubyforge.org wrote:
On Thu, 19 May 2005 21:22:46 +0900, David A. Black <dblack@wobblini.net>
[#5068] Re: [ ruby-Patches-1939 ] Pathname, totally revamped — Daniel Berger <djberg96@...>
--- nobu.nokada@softhome.net wrote:
Hi,
On 5/22/05, nobu.nokada@softhome.net <nobu.nokada@softhome.net>
Hi,
[#5070] Re: [ ruby-Patches-1939 ] Pathname, totally revamped — Daniel Berger <djberg96@...>
--- daz <dooby@d10.karoo.co.uk> wrote:
[#5075] Re: [ ruby-Patches-1939 ] Pathname, totally revamped — "Berger, Daniel" <Daniel.Berger@...>
> -----Original Message-----
Quoting Daniel.Berger@qwest.com, on Mon, May 23, 2005 at 11:06:58PM +0900:
[#5107] Re: will callable objects be more general in Ruby 1.9? — Eric Mahurin <eric_mahurin@...>
Re: [ ruby-Patches-1939 ] Pathname, totally revamped
> -----Original Message-----
> From: Tanaka Akira [mailto:akr@m17n.org]
> Sent: Monday, May 23, 2005 4:53 AM
> To: ruby-core@ruby-lang.org
> Subject: Re: [ ruby-Patches-1939 ] Pathname, totally revamped
>
>
> In article <200505211934.j4LJYaJt003878@rubyforge.org>,
> noreply@rubyforge.org writes:
>
> > * The cleanpath method works differently.
>
> How different?
One test in particular stood out when I reimplemented cleanpath:
assert_equal('../../d',
Pathname.new('a/b/../../../../c/../d').cleanpath.to_s)
The current definition of cleanpath says, "Returns clean pathname of
+self+ with consecutive slashes and useless dots removed.". For the
above test I would have expected "d" as the result. In my
implementation, that is what is returned.
The other difference is that my implementation removes trailing '/'
characters and unnecessary '.' characters. Here's a test from the
current implementation:
assert_equal('/a/.', Pathname.new('/a/.').cleanpath(true).to_s)
My implementation simply returns "/a".
> > The 'facade' requirement can be removed and that module can
> be inlined
> > if you don't like the dependency. It's only about 20 lines of code.
>
> Is it possible to document the methods defined by facade using RDoc?
Yes, I merely removed the rdoc comments for the sake of brevity. If you
download the 'facade' package from the RAA you will see the comments in
facade.rb.
> > # Convert forward slashes to backslashes on Win32
> > path.tr!("/",@sep) if File::ALT_SEPARATOR
>
> I think it's not Rubyish.
> See [ruby-talk:52429].
Ok, I took Mark's suggestion (and changed the reliance on
File::ALT_SEPARATOR) and changed that to:
@win32 = PLATFORM.match("mswin32")
path = path.tr("/",@sep) if @win32
> > # Returns the root directory of the path, or '.' if
> there is no root
> > # directory.
> > #
> > # On Unix, this means the '/' character. On Win32
> systems, this can
> > # refer to the drive letter, or the server and share
> path if the path
> > # is a UNC path.
> > def root
> > dir = "."
> > if File::ALT_SEPARATOR
> > # We only want the portion up to the first '\0'
> > if @@PathStripToRoot.call(self) > 0
> > dir = self.split(0.chr).first
> > end
> > else
> > dir = File.dirname(self)
> > while dir != "/" && dir != "."
> > dir = File.dirname(dir)
> > end
> > end
> > dir = "." if dir.empty?
> > dir
> > end
>
> The root method returns a string (not pathname). Is it intentional?
Yes, but if folks think it's better to have it return Pathname.new(dir),
that's fine with me.
> In article <20050522135045.25083.qmail@web50301.mail.yahoo.com>,
> Daniel Berger <djberg96@yahoo.com> writes:
>
> > First, "+" works as you would expect.
> > Pathname.new("a") + Pathname.new("b") results in
> > "a/b".
>
> If Pathname inherits String, Pathname is-a String.
> So some people (in some context) that Pathname.new("a") +
> Pathname.new("b") results in "ab" as String.
I have explicitly decreed that the behavior of '+' is different. It's
documented - people will just have to accept it. Otherwise, we should
never override any method in a subclass, because hey, people might not
expect different behavior.
BTW, if people want "ab" then they can still use "<<", e.g.
Pathname.new("a") << Pathname.new("b"). So yes, it's possible to have
both behaviors. :)
Regards,
Dan