aboutsummaryrefslogtreecommitdiffstats
path: root/ruby.c
Commit message (Collapse)AuthorAgeFilesLines
* * ruby.c (process_options): --dump option exit immediately.nobu2008-05-201-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (proc_options, process_options): --dump option.nobu2008-05-201-1/+26
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (ruby_init_gems), gem_prelude.rb: check if Gem is definednobu2008-05-121-3/+1
| | | | | | | instead of Gem::Enable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * dln.c (dln_find_exe_r, dln_find_file_r): reentrant versions.nobu2008-05-071-2/+3
| | | | | | | | | * file.c (rb_find_file_ext, rb_find_file), process.c (proc_exec_v), (rb_proc_exec, proc_spawn_v, proc_spawn), ruby.c (process_options): use reentrant versions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (process_options, ruby_set_argv): set encoding of rb_argvusa2008-05-071-5/+7
| | | | | | | | | after Init_prelude() because cannot load encoding extensions before it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * load.c (rb_load_path), vm_core.h (rb_vm_t): moved to VM.nobu2008-04-301-5/+8
| | | | | | | | | | | | | | * load.c (rb_get_load_path): returns absolute load path. * load.c (load_path_getter): $LOAD_PATH getter. * file.c (rb_find_file_ext, rb_find_file), ruby.c (push_include, ruby_init_loadpath): use the accessor. * vm.c (rb_vm_mark): mark load_path. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (ruby_set_argv): ARGV should be locale encoding.naruse2008-04-261-0/+2
| | | | | | [ruby-list:44861] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (process_options): set safe_level before loading script.matz2008-04-241-1/+1
| | | | | | [ruby-dev:34421] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (process_options): preludes and parser need to run in safenobu2008-04-151-0/+4
| | | | | | | level 0. [ruby-dev:34407] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (process_options): dln_find_file returns the pointer to anobu2008-04-151-8/+10
| | | | | | | static buffer, so should copy it. [ruby-dev:34409] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/intern.h (rb_argv): replaced with rb_get_argv().nobu2008-04-151-3/+0
| | | | | | | [ruby-Bugs-19514] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (ruby_exec_node, ruby_run_node), ruby.c (process_options):nobu2008-04-121-8/+7
| | | | | | | | | | | | | | | | use iseq instead of NODE. * gc.c (source_filenames): removed. * include/ruby/intern.h, parse.y (yycompile, parser_mark, parser_free, ripper_initialize): rb_source_filename() is no longer used. * compile.c, compile.h (ERROR_ARGS), parse.y (node_newnode, fixpos, parser_warn, e_option_supplied, warn_unless_e_option, range_op, cond0): nd_file is no longer used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (proc_options): checks if the word is empty.nobu2008-03-251-3/+3
| | | | | | | * ruby.c (process_options): typo fixed. [ruby-dev:34122] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (usage): remove some unimportant lines to fit -h messagematz2008-03-101-3/+0
| | | | | | in a page. [ruby-dev:34018] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (load_file): parse shebang in us-ascii. a patch fromnobu2008-03-021-0/+3
| | | | | | | sheepman <sheepman AT sheepman.sakura.ne.jp> in [ruby-dev:33955] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (struct argf): packed ARGF stuffs.nobu2008-03-011-13/+14
| | | | | | | * ruby.c (proc_options): use ruby_set_inplace_mode(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (enable_option, disable_option): allow all for all knownnobu2008-02-231-14/+27
| | | | | | | features. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * debug.c (ruby_set_debug_option): separated ruby_each_words().nobu2008-02-231-8/+56
| | | | | | | | | | | | | | | * util.c (ruby_each_words): extracted from ruby_set_debug_option(). * ruby.c (proc_options): generalized enable/disable options. * ruby.c (ruby_init_gems): take enabled flag. [ruby-core:14840] * ruby.c (process_options): added --disable-rubyopt flag. * include/ruby/util.h (ruby_each_words): prototype. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (proc_options): check if argument for -E exists.nobu2008-02-231-13/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (process_options): set default_external before loadingnaruse2008-02-151-2/+2
| | | | | | libraries. [ruby-dev:33801] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (load_file): enc must effect source encoding.naruse2008-02-121-0/+1
| | | | | | [ruby-core#15496] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (load_file): the encoding of DATA follows the sourcenaruse2008-02-111-1/+1
| | | | | | file encoding. [ruby-dev:33693] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (parser_initialize): set default script encoding as US-ASCII.usa2008-01-251-24/+7
| | | | | | | | | | | | | | * ruby.c (load_file): ditto. * ruby.c (process_options): set script encoding of -e from locale except when -K is specified. * ruby.c (load_file): set script encoding of stdin from locale except when -K is specified. [ruby-dev:33375] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (load_file): set default to ASCII-8BIT explicitly if -Knobu2008-01-251-4/+2
| | | | | | | option is not given. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (process_options, load_file, rb_load_file): propagates scriptnobu2008-01-251-1/+6
| | | | | | | encoding by -K to libraries. [ruby-dev:33156] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (process_options): set encoding of -e option from -E optionnobu2008-01-251-0/+3
| | | | | | | if they are compatible. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (cmdline_arguments): split argc and argv from cmdline_options.nobu2008-01-251-8/+15
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (process_options): not set encoding of -e option from -Enobu2008-01-251-2/+18
| | | | | | | option if they are not compatible. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (proc_options, process_options, load_file): shouldn't effectusa2008-01-251-17/+39
| | | | | | | | --encoding to script encoding. [ruby-dev:33169] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (proc_optionc): -Kn means ASCII-8BIT.naruse2008-01-231-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (parser_prepare): get encoding from the first line.nobu2008-01-181-2/+9
| | | | | | | | | [ruby-dev:33168] * ruby.c (load_file): set encoding to input with set_encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (proc_options): encoding libraries cannot be loaded untilnobu2008-01-151-8/+7
| | | | | | | load path is set. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.1: a patch to describe --encoding. a patch from Yuguimatz2008-01-141-0/+1
| | | | | | | | <yugui AT yugui.sakura.ne.jp> in [ruby-dev:33079]. * ruby.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (load_file): local variable was not initialized when -x flagnobu2008-01-131-2/+1
| | | | | | | is given. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (load_file): script files should not be affected by locale.nobu2008-01-131-2/+6
| | | | | | | [ruby-dev:33054] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (proc_options): fixed typo.nobu2008-01-131-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (ENCINDEX_EUC_JP, ENCINDEX_SJIS): removed.naruse2008-01-131-2/+2
| | | | | | | | | | | | | | | (rb_enc_init): EUC-JP and Shift_JIS are not builtin now. * enc/Makefile.in: ditto. * common.mk: ditto. * ruby.c (proc_options): ditto. * enc/shift_jis.c, enc/euc_jp.c: fixes for romove from builtin. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (process_options): -e'script' is locale encoding by default.naruse2008-01-111-8/+8
| | | | | | | (load_file): ruby script from stdin is locale encoding by default. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (process_options): give priority command line encoding optionnobu2008-01-091-8/+25
| | | | | | | | | | to RUBYOPT, and enable -E option in RUBYOPT. * ruby.c (load_file): deal with encoding option in shebang line if nothing in command line and RUBYOPT. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * $Date$ keyword removed to avoid inclusion of locale dependentakr2008-01-061-1/+0
| | | | | | | string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (proc_options): no need for intermediate object.nobu2008-01-051-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (proc_options): update according to the last API revert.matz2008-01-041-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/encoding.h (rb_isascii): defined.akr2008-01-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (rb_isalnum): ditto. (rb_isalpha): ditto. (rb_isblank): ditto. (rb_iscntrl): ditto. (rb_isdigit): ditto. (rb_isgraph): ditto. (rb_islower): ditto. (rb_isprint): ditto. (rb_ispunct): ditto. (rb_isspace): ditto. (rb_isupper): ditto. (rb_isxdigit): ditto. (rb_tolower): ditto. (rb_toupper): ditto. * include/ruby/st.h (st_strcasecmp): declared. (st_strncasecmp): ditto. * st.c (type_strcasehash): use st_strcasecmp instead of strcasecmp. (st_strcasecmp): defined. (st_strncasecmp): ditto. * include/ruby/ruby.h: include include/ruby/encoding.h. (ISASCII): use rb_isascii. (ISPRINT): use rb_isprint. (ISSPACE): use rb_isspace. (ISUPPER): use rb_isupper. (ISLOWER): use rb_islower. (ISALNUM): use rb_isalnum. (ISALPHA): use rb_isalpha. (ISDIGIT): use rb_isdigit. (ISXDIGIT): use rb_isxdigit. (TOUPPER): defined. (TOLOWER): ditto. (STRCASECMP): ditto. (STRNCASECMP): ditto. * dir.c, encoding.c, file.c, hash.c, process.c, ruby.c, time.c, transcode.c, ext/readline/readline.c: use locale insensitive functions. [ruby-core:14662] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (process_options): rejects dummy encoding.nobu2007-12-311-0/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (proc_options, process_options): delays finding encodingnobu2007-12-311-6/+9
| | | | | | | until load_path is set. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (Init_encoding): register Windows-31J and its alias.usa2007-12-291-1/+2
| | | | | | | | | | [ruby-dev:32843] * ruby.c (proc_options): -Ks options means Windows-31J, not Shift_JIS. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* unused variable removed.akr2007-12-281-1/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (rb_locale_encoding): should check return value fromusa2007-12-281-18/+1
| | | | | | | | | | | | | | | | rb_locale_charmap(). * ruby.c (locale_encoding): removed. * ruby.c (process_options): use rb_locale_encoding() instead of locale_encoding(). * ext/readline/readline.c (readline_readline): use locale encoding instead of input IO's encoding. [ruby-dev:32872] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (proc_options): encoding option in shbang and RUBYOPT did notnobu2007-12-251-8/+7
| | | | | | | work, do not store alloca()ed string in a parent scope struct. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/encoding.h, encoding.c, re.c, io.c, parse.y, numeric.c,akr2007-12-221-2/+2
| | | | | | | | | ruby.c, transcode.c: rename rb_ascii_encoding. to rb_ascii8bit_encoding. rb_ascii_encoding is ambiguous with ASCII-8BIT and US-ASCII. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e