[#192] auto-loaded script? — Julian Fondren <julian@...>
Does ruby load any particular scripts upon startup?
13 messages
1999/01/17
[#193] Re: auto-loaded script?
— gotoken@... (GOTO Kentaro)
1999/01/17
In message "[ruby-talk:00192] auto-loaded script?"
[#194] Re: auto-loaded script?
— Julian Fondren <julian@...>
1999/01/18
> >Does ruby load any particular scripts upon startup?
[#195] Re: auto-loaded script?
— matz@... (Yukihiro Matsumoto)
1999/01/18
Hi.
[#197] Re: auto-loaded script?
— Julian Fondren <julian@...>
1999/01/18
> rb_load_file("/home/julian/.rubyrc"); /* this line added */
[#210] Get character with no wait — Gabriel <gabriel@...>
What is the best way to do a getc without waiting; so I can try to grab
8 messages
1999/01/25
[ruby-talk:00195] Re: auto-loaded script?
From:
matz@... (Yukihiro Matsumoto)
Date:
1999-01-18 02:55:33 UTC
List:
ruby-talk #195
Hi.
In message "[ruby-talk:00194] Re: auto-loaded script?"
on 99/01/17, Julian Fondren <julian@imaji.net> writes:
|No, that won't work because /etc/passwd doesn't like dashes or flags
|in the command part - right now the closest I can get is to have a ruby
|script as the shell, which doesn't seem very safe to me.
Well, are you going to use ruby as login shell? I do not recomment
it, because Ruby is a script language, like Perl.
Anyway, to load script before executing, you'd better re-compile
ruby to do so. Modify main.c as below, and re-compile.
int
main(argc, argv, envp)
int argc;
char **argv, **envp;
{
#if defined(NT)
NtInitialize(&argc, &argv);
#endif
ruby_init();
ruby_options(argc, argv);
rb_load_file("/home/julian/.rubyrc"); /* this line added */
ruby_run();
}
Hope this helps.
I'm not really sure whether plain Ruby should load particular script
before executing. But I feel it is not required.
matz.