aboutsummaryrefslogtreecommitdiffstats
path: root/ruby.c
Commit message (Collapse)AuthorAgeFilesLines
* * file.c (file_expand_path): use cygwin_conv_path on cygwin 1.7 ornobu2010-11-111-2/+9
| | | | | | | later. * ruby.c (push_include_cygwin): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cygwin/GNUmakefile.in (scriptbin): make executable file fromnobu2010-11-091-3/+6
| | | | | | | | | | | | | scripts with stub. * ruby.c (load_file_internal): assume xflag for exe file as well as no-shebang file. * tool/rbinstall.rb: install script programs. * win32/mkexports.rb (Exports#initialize): alias ruby_sysinit for stub. * win32/stub.c: stub for scripts. [EXPERIMENTAL] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (ruby_init_loadpath_safe): ensure sopath to be modifiablenobu2010-08-051-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (ruby_init_loadpath_safe): rb_str_set_len modifies ptrnobu2010-08-021-2/+4
| | | | | | | since r26303. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/io.h, io.c: reverted r21709.nobu2010-06-271-3/+9
| | | | | | | | * ruby.c (load_file_internal): nothing to read if EOF reached while reading shebang. [ruby-core:30910] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c: add prototype of rb_realpath_internal.naruse2010-06-181-0/+1
| | | | | | * load.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * load.c (rb_load_internal): remove call to rb_realpath_internalmame2010-06-171-1/+2
| | | | | | | | | | | | | | within rb_load_internal which caused big performance degradation. Instead, call rb_realpath_internal in the caller of rb_load_internal. [ruby-dev:41502] [ruby-dev:41610] * vm.c (rb_vm_call_cfunc): ditto. * eval_intern.h (rb_vm_call_cfunc): ditto. * ruby.c (process_options): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (process_options, load_file_internal): $0 seen fromnobu2010-06-051-2/+6
| | | | | | | | required libraries by -r option should be the main script. [ruby-core:23717] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (process_options): revert r25330, so that $0 can be seennobu2010-06-051-2/+2
| | | | | | | from required libraries by -r option. [ruby-core:23717] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * suppress warnings.nobu2010-05-211-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (ruby_init_loadpath_safe): use real path for non-sharednobu2010-05-211-3/+6
| | | | | | build. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c: Documentation: change => in call-seq to ->.marcandre2010-05-171-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Harmonize "#=>" in examples. [ruby-core:30206] * bignum.c: ditto * class.c: ditto * compar.c: ditto * cont.c: ditto * dir.c: ditto * encoding.c: ditto * enum.c: ditto * enumerator.c: ditto * error.c: ditto * eval.c: ditto * file.c: ditto * gc.c: ditto * io.c: ditto * load.c: ditto * marshal.c: ditto * math.c: ditto * numeric.c: ditto * object.c: ditto * pack.c: ditto * proc.c: ditto * process.c: ditto * random.c: ditto * range.c: ditto * re.c: ditto * ruby.c: ditto * signal.c: ditto * sprintf.c: ditto * string.c: ditto * struct.c: ditto * thread.c: ditto * time.c: ditto * transcode.c: ditto * variable.c: ditto * vm_eval.c: ditto * vm_method.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (get_arglen): skip the last terminator of argv beforenobu2010-04-241-5/+18
| | | | | | | | | | | | checking environ. * ruby.c (get_arglen): duplicate environ area if setenv and unsetenv are provided. * ruby.c (set_arg0): keep empty strings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (PREFIX_PATH): use RUBY_RELATIVE macro.nobu2010-04-231-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in (RUBY_EXEC_PREFIX): added to config.h.nobu2010-03-171-1/+2
| | | | | | | | | | * ruby.c (ruby_init_loadpath_safe): TMP_RUBY_PREFIX should be exec_prefix, not rubylibprefix. [ruby-core:28718] * version.c (RUBY_LIB_PREFIX): fallback to RUBY_EXEC_PREFIX. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c, iseq.c, ruby.c, vm.c, vm_core.h, vm_eval.c: add absolutemame2010-03-161-1/+3
| | | | | | | | | | | | | | | path field into rb_iseq_t. The field contains a string representing a path to corresponding source file. or nil when the iseq is created from -e, stdin, eval, etc. This field is used for require_relative. [ruby-dev:40004] * load.c (rb_f_require_relative): add C implementation of require_relative. * prelude.rb (require_relative): get rid of Ruby implementation of require_relative. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (ruby_init_loadpath_safe): mark initial load paths.nobu2010-03-121-2/+5
| | | | | | | | | | * gem_prelude.rb (push_all_highest_version_gems_on_load_path): search insertion position by initial load path mark. * lib/rubygems.rb (Gem.load_path_insert_index): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (ruby_init_loadpath_safe, ruby_init_gems): set and removenobu2010-03-111-2/+8
| | | | | | | | | | | TMP_RUBY_PREFIX. * variable.c (rb_mod_remove_const): new function. * tool/compile_prelude.rb: split each preludes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (rb_parser_dump_tree): add prototype.naruse2009-12-131-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * node.c: node management added. Currently, only pretty-dumper ismame2009-12-091-1/+11
| | | | | | | | | | implemented. [ruby-dev:39853] * ruby.c: --dump=parsetree and --dump=parsetree_with_comment options added. This is just for debug or research purpose. Note that the compatibility of these options are not supported at all. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (enc_set_default_encoding): reset filesytemnaruse2009-11-181-1/+0
| | | | | | | | | | | | | encoding because on resetting default_external because Unix's filesystem encoding depends on default_external. * encoding.c (enc_set_filesystem_encoding): added. * ruby.c (process_options): don't call rb_filesystem_encoding because filesystem encoding is reset when default_external is reset. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (rb_filesystem_encindex): use default external encodingakr2009-11-151-1/+1
| | | | | | | | | | instead of locale encoding in Unix. * ruby.c (process_options): delay inifilesystem encoding initialization after default external encoding initialization. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (set_{internal,external}_encoding_once): fixed typos.nobu2009-11-041-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert set locale and filesystem encindex in Init_Encoding.naruse2009-10-291-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (Init_Encoding): set locale and filesystem encindex.naruse2009-10-291-1/+0
| | | | | | | * ruby.c (process_options): move setting func of filesystem encoding to Init_Encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (process_options): call rb_filesystem_encoding().naruse2009-10-281-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (usage): -T and -W descriptions updated. seemame2009-10-261-2/+2
| | | | | | | | [ruby-dev:39539] * man/ruby.1: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (ruby_init_loadpath_safe): should not dup tmp string. anobu2009-10-181-7/+4
| | | | | | | patch from neomjp neomjp in [ruby-core:24251]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (process_options): script name should not be shown in annobu2009-10-141-2/+2
| | | | | | | error message before loaded. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (process_sflag, proc_options, load_file_internal): fixednobu2009-09-131-9/+9
| | | | | | | types. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (load_file_internal): no need to define DATA when error.nobu2009-09-131-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (ruby_init_loadpath_safe): suppressed warnings.nobu2009-08-271-1/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (load_file_internal): assumes -x flag if no "ruby" is innobu2009-08-051-31/+3
| | | | | | | the shebang line. [ruby-dev:39015] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_stdio_set_default_encoding): prototyped.nobu2009-08-051-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (rb_stdio_set_default_encoding): declared.naruse2009-08-051-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Set encodings of stdio after setting default internal and external.naruse2009-07-311-0/+1
| | | | | | | | | * io.c (rb_stdio_set_default_encoding): added. * ruby.c (process_options): call rb_stdio_set_default_encoding after setting defualt internal and external. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (process_options): don't specify .so for encdb here.akr2009-06-221-1/+1
| | | | | | | | | | "." is replaced by "_" in load_encoding. * encoding.c (load_encoding): add .so here. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (ruby_init_loadpath_safe): removed "." from load_path.nobu2009-06-221-4/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (process_options), enc/prelude.rb: encdb and transdb arenobu2009-06-221-1/+1
| | | | | | | extension libraries. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (process_options): set progname earlier.nobu2009-06-221-2/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * load.c (Init_load): $: must be readonly. [ruby-dev:38690]mame2009-06-211-1/+1
| | | | | | | * ruby.c (ruby_prog_init): $-W must be readonly. [ruby-dev:38691] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (ruby_init_loadpath_safe): VARIABLE_LIBPATH is alwaysnobu2009-05-171-1/+1
| | | | | | | defined, see its value instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (ruby_script): sets also VM toplevel program name.nobu2009-05-171-18/+3
| | | | | | | * ruby.c (process_options): no longer needs additional frame. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (cmdline_options_init): initialize encodings.nobu2009-05-171-2/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (cmdline_options_init): initialize encodings.nobu2009-05-171-28/+31
| | | | | | | | | | | * ruby.c (add_modules, require_libraries, process_sflag): * ruby.c (process_sflag): not process twice. * ruby.c (moreswitches): get rid of possible overflow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (ruby_init_loadpath_safe): support for cygwin 1.7. seenobu2009-05-171-4/+45
| | | | | | | | [ruby-core:23241]. gets rid of possible buffer overflow with realpath(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (set_arg0): get rids of overrun.nobu2009-05-161-21/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * dir.c, dln.c, parse.y, re.c, ruby.c, sprintf.c, strftime.c,nobu2009-03-171-3/+4
| | | | | | | | string.c, util.c, variable.c: use strlcpy, memcpy and snprintf instead of strcpy, strncpy and sprintf. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (load_file_internal): stop the timer thread before exec.nobu2009-03-151-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * util.c (ruby_scan_oct, ruby_scan_hex): use size_t.nobu2009-03-141-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e