aboutsummaryrefslogtreecommitdiffstats
path: root/ruby.c
Commit message (Collapse)AuthorAgeFilesLines
* forgot to commitshyouhei2008-07-011-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (enum ruby_special_consts): ISO C forbidsshyouhei2008-07-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | comma at end of enumerator list * include/ruby/ruby.h (enum ruby_value_type): ditto. * eval_intern.h (enum): ditto. * vm_core.h (enum rb_thread_status): ditto. * parse.y (enum lex_state_e): ditto. * parse.y (enum string_type): ditto. * process.c (enum): ditto. * ruby.c (enum dump_flag_bits): ditto. * ruby.c (enum disable_flag_bits): ditto. * compile.c (iseq_link_element): ditto * debug.c (union): ditto. * cont.c (enum context_type): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (set_arg0, ruby_prog_init): freeze $0. a patch from Keitanobu2008-06-261-2/+2
| | | | | | | Yamaguchi <keita.yamaguchi at gmail.com>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (verbose_setter, opt_W_getter): fixed prototypes.nobu2008-06-181-4/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (opt_W_getter): use ruby_verbose directly instead of parameterusa2008-06-181-1/+1
| | | | | | | | | because ruby_verbose is not a real variable, so the address of parameter is not collect. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (opt_W_getter): made a hooked variable.nobu2008-06-171-5/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (rb_argv0): revised for ext/tk.nobu2008-06-101-0/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (CONST_ID): constant ID cache for non-gcc.nobu2008-06-091-1/+2
| | | | | | | * *.c: no cache in init functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (require_libraries): req_list may be NULL. [ruby-dev:35008]matz2008-06-091-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_core.h (struct rb_vm_struct): moved ruby_debug, ruby_verbose, andnobu2008-06-091-7/+1
| | | | | | | | | | | rb_progname. * ruby.c (rb_argv0): no longer used. * vm.c: getters/setters for ruby_{debug,verbose}. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_core.h (struct rb_vm_struct): moved src_encoding_index.nobu2008-06-091-52/+49
| | | | | | | | | | | | | | | * ruby.c (struct cmdline_options): moved setids and req_list, and the latter is now an array, to prevent memory leak. * ruby.c (cmdline_options_init): added. * ruby.c (add_modules, require_libraries, init_ids, forbid_setid): use struct cmdline_options. * vm.c (vm_init2): initialize src_encoding_index. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c, bignum.c, cont.c, dir.c, dln.c, encoding.c, enumerator.c,ko12008-06-081-2/+2
| | | | | | | | | | | | | | | | | | | enumerator.c (enumerator_allocate), eval_jump.c, file.c, hash.c, io.c, load.c, pack.c, proc.c, random.c, re.c, ruby.c, st.c, string.c, thread.c, thread_pthread.c, time.c, util.c, variable.c, vm.c, gc.c: allocated memory objects by xmalloc (ruby_xmalloc) should be freed by xfree (ruby_xfree). * ext/curses/curses.c, ext/dbm/dbm.c, ext/digest/digest.c, ext/gdbm/gdbm.c, ext/json/ext/parser/parser.c, ext/json/ext/parser/unicode.c, ext/openssl/ossl_cipher.c, ext/openssl/ossl_hmac.c, ext/openssl/ossl_pkey_ec.c, ext/sdbm/init.c, ext/strscan/strscan.c, ext/zlib/zlib.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (set_arg0): reverted used variable definition.nobu2008-06-011-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * rational.c (string_to_r_internal): use rb_isdigit.naruse2008-06-011-6/+5
| | | | | | | | * marshal.c (long_toobig): use %zd. * ruby.c (set_arg0): move unused variable definition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * suppress warnings with -Wwrite-string.nobu2008-05-311-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 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