summaryrefslogtreecommitdiffstats
path: root/ruby.c
Commit message (Collapse)AuthorAgeFilesLines
* * ruby.c (process_sflag, proc_options, load_file_internal): fixednobu2009-09-131-9/+9
| | | | | | | types. git-svn-id: http://svn.ruby-lang.org/repos/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: http://svn.ruby-lang.org/repos/ruby/trunk@24897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (ruby_init_loadpath_safe): suppressed warnings.nobu2009-08-271-1/+4
| | | | git-svn-id: http://svn.ruby-lang.org/repos/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: http://svn.ruby-lang.org/repos/ruby/trunk@24410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_stdio_set_default_encoding): prototyped.nobu2009-08-051-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (rb_stdio_set_default_encoding): declared.naruse2009-08-051-0/+2
| | | | git-svn-id: http://svn.ruby-lang.org/repos/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: http://svn.ruby-lang.org/repos/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: http://svn.ruby-lang.org/repos/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: http://svn.ruby-lang.org/repos/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: http://svn.ruby-lang.org/repos/ruby/trunk@23813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (process_options): set progname earlier.nobu2009-06-221-2/+3
| | | | git-svn-id: http://svn.ruby-lang.org/repos/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: http://svn.ruby-lang.org/repos/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: http://svn.ruby-lang.org/repos/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: http://svn.ruby-lang.org/repos/ruby/trunk@23473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (cmdline_options_init): initialize encodings.nobu2009-05-171-2/+0
| | | | git-svn-id: http://svn.ruby-lang.org/repos/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: http://svn.ruby-lang.org/repos/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: http://svn.ruby-lang.org/repos/ruby/trunk@23468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (set_arg0): get rids of overrun.nobu2009-05-161-21/+4
| | | | git-svn-id: http://svn.ruby-lang.org/repos/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: http://svn.ruby-lang.org/repos/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: http://svn.ruby-lang.org/repos/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: http://svn.ruby-lang.org/repos/ruby/trunk@22957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (ruby_init_loadpath_safe): expands libpath and removesnobu2009-03-101-3/+3
| | | | | | | last /lib. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in (MANGLED_PATH): defines for RUBYLIB_PREFIX.nobu2009-03-091-17/+12
| | | | | | | | | * ruby.c (ruby_init_loadpath_safe): uses string as buffer. * symbian/setup (config_h): defines MANGLED_PATH. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in (load_relative): new option to enable load pathnobu2009-03-091-0/+9
| | | | | | | | | relative to libruby_so. * ruby.c (ruby_init_loadpath_safe): added the case using dladdr(). git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/dl.h (dlerror): fixed on Windows.nobu2009-03-021-0/+6
| | | | | | | | * ext/dl/handle.c (rb_dlhandle_initialize): returns handle to libruby if nil is given on Windows as dlopen. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (ruby_options): evaluator now expects iseq instead of tree.yugui2009-02-221-3/+3
| | | | | | * ruby.c (ruby_process_options): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval_intern.h (translit_char): moved from ruby.c.nobu2009-02-191-19/+3
| | | | | | | | | | * load.c (load_ext): transliterates file separators and back if needed. * symbian/setup (DLN_NEEDS_ALT_SEPARATOR): defined. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in, */Makefile.sub (LOAD_RELATIVE): moved from ruby.cnobu2009-02-191-4/+0
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (process_options): set initial default_external before -r.usa2009-02-061-0/+7
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (process_options): -K and -E in shebang should be reflect tousa2009-02-061-7/+7
| | | | | | | | default_external. [ruby-dev:37920] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in (RUBY_LIB_VERSION): added for library version, tonobu2009-02-051-24/+7
| | | | | | | | | | | | | | | | | | split from core version. [ruby-dev:37748] * configure.in (RUBY_LIB_PATH, etc): moved actual version dependent stuff to version.c. * ruby.c (ruby_init_loadpath_safe): ditto. * version.c (ruby_initial_load_paths): moved initial load path version depending on version from ruby.c. * version.h (RUBY_VERSION_{MAJOR,MINOR,TEENY}): now mean library and API version, and reverted to 1.9.1. [ruby-dev:37889] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (load_file_internal): resets EOF flag after parse.nobu2009-02-031-1/+3
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c (rb_fiber_current), dln.c (dln_print_undef, dln_undefined),nobu2009-02-011-2/+2
| | | | | | | | | | | eval.c (rb_iterator_p, rb_need_block), load.c: (Init_load), ruby.c (uscore_get, rb_f_chop), st.c (stat_col), signal.c (rb_signal_buff_size, ruby_sig_finalize), thread.c (rb_thread_sleep_forever, rb_thread_sleep_deadly, rb_thread_alone): protoized. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_ungetbyte, rb_io_ungetc): allows nil to reset EOFnobu2009-01-211-0/+1
| | | | | | | | | | flag with ungetting nothing. * ruby.c (load_file_internal): rests EOF flag to make possible to load from stdin after reading data. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (load_file_internal): no need to cast.nobu2009-01-211-10/+10
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (require_libraries): reset th->parse_in_eval whileko12009-01-191-0/+4
| | | | | | | | loading libraries. fixes [ruby-dev:37780] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * iseq.c:ko12009-01-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | rename ruby_iseq_disasm_insn() -> rb_iseq_disasm_insn(). rename ruby_iseq_disasm() -> rb_iseq_disasm(). * compile.c: rename ruby_iseq_compile() -> rb_iseq_compile_node(). rename ruby_iseq_translate_threaded_code() -> rb_iseq_translate_threaded_code(). rename ruby_insns_name_array() -> rb_insns_name_array(). rename ruby_iseq_build_from_ary() -> rb_iseq_build_from_ary(). * iseq.c, compile.c: remove ruby_insn_make_insn_table() and make static function insn_make_insn_table(). * iseq.h, ruby.c, vm.c, vm_core.h, vm_eval.c, vm_dump.c, blockinlining.c: ditto. Rename strange "ruby_" prefix to "rb_" prefix. This changes may affect only core because renamed functions require a pointer of rb_iseq_t which is not exposed. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (process_options): decrement parse_in_eval to recognizeko12009-01-151-2/+2
| | | | | | | | | | | | parsing main or normal eval script. * compile.c (rb_parse_in_main): return 1 if parsing main script. (if parse_in_eval is negative value, it means main script) * parse.y (yycompile0): check rb_parse_in_main() to accumulate script text. Bug #848 [ruby-core:20450] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * symbian/README.SYMBIAN: symbian support added. great appreciatematz2009-01-151-2/+2
| | | | | | to <alexandre.zavorine at symbian.com>. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (process_options): set th->base_block only whileko12008-12-281-11/+27
| | | | | | | | | | it is needed. * ruby.c (require_libraries): clear th->base_block before require libraries. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (process_options): fix to untouch th->mild_compile_error.ko12008-12-271-2/+0
| | | | | | | | [ruby-dev:37621], [ruby-dev:37620] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm.c (Init_VM): create and define TOPLEVEL_BINDING at first.ko12008-12-271-2/+22
| | | | | | | | | | | | | | | | | | * vm.c (vm_set_main_stack, rb_iseq_eval_main): added. * parse.y (rb_parser_compile_file): fix to check parse_in_eval flag. * eval.c (ruby_exec_node): use rb_iseq_eval_main() instead of rb_iseq_eval(). * iseq.c (rb_iseq_new_main), vm_core.h: added. main script (specified by -e or script name) should be run under TOPLEVEL_BINDING using Kernel#eval. Above changes simulate Kernel#eval behaviour. [ruby-dev:37240] * compile.c (make_name_for_block): skip iseq except block type. this fix is needed for [ruby-dev:37240], and also fixes [ruby-dev:35392]. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (process_options): get rid of warning on DOSISH.nobu2008-12-191-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (set_arg0): use strlcpy() instead of strncpy().usa2008-12-161-2/+1
| | | | | | | | * load.c (rb_feature_p): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (process_options): revive global sub, gsub, chop, chompmatz2008-12-151-0/+98
| | | | | | | only when auto looping options (-p/-n) is specified. [ruby-core:20570] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (rubylib_mangled_path, rubylib_mangled_path2): cannot usenobu2008-12-151-12/+27
| | | | | | | | | | | | | locale encoding before load path is initialized * ruby.c (ruby_init_loadpath_safe): ditto. * ruby.c (process_options): loads encdb so that encodings can be loaded, then associates script name and load paths with the locale encoding. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (process_options): fixed default_internal is nil.kouji2008-12-131-1/+1
| | | | | | | (closes #862) git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (enc_get_default_encoding): removed.yugui2008-12-121-6/+6
| | | | | | | | | | | | | | | | | | | | Generalizing rb_default_{external,internal}_encoding seems to be difficult. default_external cannot be NULL even before detected. [ruby-dev:37390] * encoding.c (rb_default_external_encoding): has its own implementation again. * encoding.c (rb_default_internal_encoding): ditto. * gem_prelude.rb: added notice. * ruby.c (rubylib_mangled_path, rubylib_mangled_path2): uses locale encoding but not ASCII-8BIT. * ruby.c (process_options): refers less to default_external. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (proc_options): added version, copyright, usage, yydebug,nobu2008-12-081-43/+58
| | | | | | | syntax to --dump option. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (proc_options): source-encoding option.nobu2008-12-081-0/+9
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e