determining ruby interpreter

A

Ara.T.Howard

anything more reliable than this?

~ > ruby -rrbconfig -e'p File.join(*Config::CONFIG.values_at("bindir","RUBY_INSTALL_NAME"))'
"/usr/local/bin/ruby"

??

-a
--
===============================================================================
| EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
| PHONE :: 303.497.6469
| A flower falls, even though we love it;
| and a weed grows, even though we do not love it.
| --Dogen
===============================================================================
 
N

nobu.nokada

Hi,

At Fri, 20 Aug 2004 13:01:02 +0900,
Ara.T.Howard wrote in [ruby-talk:109940]:
really? the install name doesn't include the extention then?

It doesn't, but EXEEXT is not needed by system and spawn.
 
A

Ara.T.Howard

Hi,

At Fri, 20 Aug 2004 13:01:02 +0900,
Ara.T.Howard wrote in [ruby-talk:109940]:
really? the install name doesn't include the extention then?

It doesn't, but EXEEXT is not needed by system and spawn.


tricky. what is spawn?!


does this do anything tricky on windows like it does on *nix:

system "#{ cmd } 2>/dev/null"

??

-a
--
===============================================================================
| EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
| PHONE :: 303.497.6469
| A flower falls, even though we love it;
| and a weed grows, even though we do not love it.
| --Dogen
===============================================================================
 
N

nobu.nokada

Hi,

At Fri, 20 Aug 2004 23:45:50 +0900,
Ara.T.Howard wrote in [ruby-talk:109977]:
tricky. what is spawn?!

As well as command.com/cmd.exe, some suffixes can be omitted.
does this do anything tricky on windows like it does on *nix:

system "#{ cmd } 2>/dev/null"

It would work except that:
* redirection with file descriptor works only on cmd.exe, but
not command.com, and
* /dev/null doesn't exist on Windows.
 
S

Shashank Date

--- (e-mail address removed) wrote:
* /dev/null doesn't exist on Windows.

I believe it exists (not sure if on *ALL* versions) as
"NUL". Notice that it is spelt with a single L

Try this :

Microsoft Windows 2000 [Version 5.00.2195]
(C) Copyright 1985-2000 Microsoft Corp.

C:\>mkdir junk_nobu

C:\>cd junk_nobu

C:\junk_nobu>dir
Volume in drive C is LOCAL
Volume Serial Number is AC53-D8CC

Directory of C:\junk_nobu

08/20/2004 05:04p <DIR> .
08/20/2004 05:04p <DIR> ..
0 File(s) 0 bytes
2 Dir(s) 35,783,368,704 bytes free

C:\junk_nobu>dir > null

C:\junk_nobu>dir
Volume in drive C is LOCAL
Volume Serial Number is AC53-D8CC

Directory of C:\junk_nobu

08/20/2004 05:04p <DIR> .
08/20/2004 05:04p <DIR> ..
08/20/2004 05:04p 326 null
1 File(s) 326 bytes
2 Dir(s) 35,783,368,704 bytes free

C:\junk_nobu>dir > NUL

C:\junk_nobu>dir
Volume in drive C is LOCAL
Volume Serial Number is AC53-D8CC

Directory of C:\junk_nobu

08/20/2004 05:04p <DIR> .
08/20/2004 05:04p <DIR> ..
08/20/2004 05:04p 326 null
1 File(s) 326 bytes
2 Dir(s) 35,783,368,704 bytes free

C:\junk_nobu>





_______________________________
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

openssl examples and docs 12
stable-snapshot.tgz 1
irb 5
Data_Wrap_Struct (cKlass, 0, 0, ptr); 1
tk tabbed pane 1
latest instiki err 2
[ANN] nfsstore-0.4.0 0
opening a file in ext 11

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top