From: matt@... (Matt Neuburg) Date: 2012-09-14T02:20:02+09:00 Subject: Re: Pathname#to_str withdrawn in 1.9? Avdi Grimm wrote: > I'd hazard a guess that the reasoning is because the '+' behavior was > confusing and potentially surprising. Pathname defines '+' as a filename > join, so Pathname('/foo') + Pathname('bar') == Pathname('/foo/bar'). But > '/foo' + Pathname('bar') == '/foobar'. This is surprising and bug-prone if > you have code that mixes pathnames and strings. Interesting point. The amazing thing is how fast I'd internalized this, almost subconsciously. Indeed, I was doing all sorts of tricky things, like saying /myregex/ =~ mypathname (note the unusual order) in order to get the implicit coercion. We are curious animals! Thx - m. -- matt neuburg, phd = matt@tidbits.com A fool + a tool + an autorelease pool = cool! AppleScript: the Definitive Guide - Second Edition! http://www.tidbits.com/matt/default.html#applescriptthings