summaryrefslogtreecommitdiffstats
path: root/ruby.c
Commit message (Collapse)AuthorAgeFilesLines
* * ruby.c (rb_parser_dump_tree): add prototype.naruse2009-12-131-0/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/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: http://svn.ruby-lang.org/repos/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: http://svn.ruby-lang.org/repos/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: http://svn.ruby-lang.org/repos/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: http://svn.ruby-lang.org/repos/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: http://svn.ruby-lang.org/repos/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: http://svn.ruby-lang.org/repos/ruby/trunk@25558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (process_options): call rb_filesystem_encoding().naruse2009-10-281-0/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/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: http://svn.ruby-lang.org/repos/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: http://svn.ruby-lang.org/repos/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: http://svn.ruby-lang.org/repos/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: 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