summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-09-03 05:37:42 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-09-03 05:37:42 +0000
commit0f35b58a2fbae58a20979de77a3a642c42f41899 (patch)
treecab4099dba0fde8650c94226a1f9ce94549561c9 /file.c
parentc9d1be6327640aa5bc01f8c6c8846e4e3fb31337 (diff)
* ruby.c (proc_options): should not alter origargv[].
* ruby.c (set_arg0): long strings for $0 dumped core. * ruby.c (set_arg0): use setprogtitle() if it's available. * io.c (rb_io_popen): accept integer flags as mode. * file.c (rb_find_file_ext): extension table can be supplied from outside. renamed. * eval.c (rb_f_require): replace rb_find_file_noext by rb_find_file_ext. * eval.c (rb_provided): should also check feature without extension. * numeric.c (flo_to_s): do not rely on decimal point to be '.' git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/file.c b/file.c
index 58eebe52d5..2c14d8fe1b 100644
--- a/file.c
+++ b/file.c
@@ -2284,22 +2284,15 @@ file_load_ok(file)
extern VALUE rb_load_path;
int
-rb_find_file_noext(filep)
+rb_find_file_ext(filep, ext)
VALUE *filep;
+ char **ext;
{
char *path, *e, *found;
char *f = RSTRING(*filep)->ptr;
VALUE fname;
int i, j;
- static char *ext[] = {
- ".rb", DLEXT,
-#ifdef DLEXT2
- DLEXT2,
-#endif
- 0
- };
-
if (f[0] == '~') {
fname = *filep;
fname = rb_file_s_expand_path(1, &fname);