[#18121] [Ruby 1.8.7 - Bug #405] (Open) ssl.rb:31: [BUG] Bus Error — Anonymous <redmine@...>

Issue #405 has been reported by Anonymous.

14 messages 2008/08/04

[#18130] Re: New array methods cycle, choice, shuffle (plus bug in cycle) — Brian Candler <B.Candler@...>

> Seriously though... Array.first is a noun.

10 messages 2008/08/05

[#18319] NEW Command: absolute_path() -- — "C.E. Thornton" <admin@...>

Core,

14 messages 2008/08/16
[#18321] Re: NEW Command: absolute_path() -- — Yukihiro Matsumoto <matz@...> 2008/08/18

Hi,

[#18381] [Bug #496] DRb.start_service(nil) is very slow — Hongli Lai <redmine@...>

Bug #496: DRb.start_service(nil) is very slow

11 messages 2008/08/25

[ruby-core:18332] Re: NEW Command: absolute_path() --

From: "C.E. Thornton" <admin@...>
Date: 2008-08-19 06:48:22 UTC
List: ruby-core #18332
Trans wrote:
> On Aug 17, 10:03 pm, Yukihiro Matsumoto <m...@ruby-lang.org> wrote:
>   
>> Hi,
>>
>> In message "Re: [ruby-core:18319] NEW Command:  absolute_path() --"
>>     on Sun, 17 Aug 2008 06:01:52 +0900, "C.E. Thornton" <ad...@hawthorne-press.com> writes:
>>
>> |I have created patches for both 1.8.7 and 1.9.0 trunk
>> |to implement the command 'absolute_path()'.
>>
>> |If there is anything else required for inclusion approval,
>> |please let me know.
>>
>> I am still thinking to decide if this is a creeping feature, or useful
>> addition (since it's VERY similar to a existing method).  I just want
>> to tell you you're not ignored at all.
>>     
>
> Why does the ~ prevent the expansion in File.expand_path?
>
>   File.expand_path('~oracle/bin')  #=> '~oracle/bin'
>
> Never noticed this before.
>
>                                                              7rans.
>
>
>   
Yeah, that got me too!

When expand_path() expands a path containing a leading tilde(~)
AND the directory name associated with it is a USER NAME in
the system it ASSUMES you specifying the home area of that user!

For example,  if I am in '/home/thornton/test' and it contains a dir
'~thornton' expand_path() returns '/home/thornton' NOT
'/home/thornton/test/~thornton'

I ran into fhis head first while writing a program to scan all
directories.

absolute_path() would ignore this wonderful feature and return
'/home/thornton/test/~thornton'.

Chuck T.

-- 
Competency and chastity have much in common,
they both encompass their own punishment! 
 
-- C.E. Thornton -- Hawthorne Press --


In This Thread