[#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:18333] Re: NEW Command: absolute_path() --

From: "C.E. Thornton" <admin@...>
Date: 2008-08-19 06:57:37 UTC
List: ruby-core #18333
Nobuyoshi Nakada wrote:
> Hi,
>
> At Mon, 18 Aug 2008 23:36:27 +0900,
> Luis Lavena wrote in [ruby-core:18324]:
>   
>> irb(main):012:0> File.expand_path("~oracle")
>> => "~oracle"
>>
>> In the last line you can see the problem... it doesn't expand the path
>> if ~ is found in as part of the path to expand.
>>     
>
> It should raise an exception, and this is the point of OP.
>
> $ ruby18 -v -e 'p File.expand_path("~oracle")'
> ruby 1.8.7 (2008-08-18 revision 18677) [i686-linux]
> -e:1:in `expand_path': user oracle doesn't exist (ArgumentError)
> 	from -e:1
> $ ruby19 -v -e 'p File.expand_path("~oracle")'
> ruby 1.9.0 (2008-08-18 revision 18687) [i686-linux]
> -e:1:in `expand_path': user oracle doesn't exist (ArgumentError)
> 	from -e:1:in `<main>'
>
>   
The example was used because it is the one of the examples in the 
documentation
for File.expand_path()

If there is a user named 'oracle' on the system being used, then file 
expand_path
will always return  it's home dir say '/home/oracle'.

If you are in a dir named '/home/user/test' and it contains a dir 
'~oracle' then
calling expand_path("~oracle") while in that area returns '/home/oracle' NOT
'/home/user/test/~oracle'

Chuck T.

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


In This Thread