mame
6ff75042db
* compile.c, iseq.c, ruby.c, vm.c, vm_core.h, vm_eval.c: add absolute
...
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
2010-03-16 17:40:00 +00:00
nobu
04e68d0107
* ruby.c (ruby_init_loadpath_safe): mark initial load paths.
...
* 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
2010-03-12 15:11:10 +00:00
nobu
1dcf1174ea
* ruby.c (ruby_init_loadpath_safe, ruby_init_gems): set and remove
...
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
2010-03-11 22:15:11 +00:00
naruse
77088d6672
* ruby.c (rb_parser_dump_tree): add prototype.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-13 11:29:33 +00:00
mame
38828fa8d1
* node.c: node management added. Currently, only pretty-dumper is
...
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
2009-12-09 14:05:59 +00:00
naruse
a7db2c1efd
* encoding.c (enc_set_default_encoding): reset filesytem
...
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
2009-11-18 03:38:20 +00:00
akr
1aba3f9d76
* encoding.c (rb_filesystem_encindex): use default external encoding
...
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
2009-11-15 16:37:38 +00:00
nobu
ab4e003969
* ruby.c (set_{internal,external}_encoding_once): fixed typos.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-04 06:46:32 +00:00
naruse
2f2e8455e3
Revert set locale and filesystem encindex in Init_Encoding.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-29 09:40:25 +00:00
naruse
06346d5849
* encoding.c (Init_Encoding): set locale and filesystem encindex.
...
* 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
2009-10-29 08:14:09 +00:00
naruse
2bb26c118d
* ruby.c (process_options): call rb_filesystem_encoding().
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-28 19:42:59 +00:00
mame
1996a4af69
* ruby.c (usage): -T and -W descriptions updated. see
...
[ruby-dev:39539]
* man/ruby.1: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-26 03:41:01 +00:00
nobu
d68e5dce35
* ruby.c (ruby_init_loadpath_safe): should not dup tmp string. a
...
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
2009-10-18 09:32:02 +00:00
nobu
0e4121aa5b
* ruby.c (process_options): script name should not be shown in an
...
error message before loaded.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-14 04:24:16 +00:00
nobu
a39f4e5cf6
* ruby.c (process_sflag, proc_options, load_file_internal): fixed
...
types.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-13 11:18:51 +00:00
nobu
bc832b8e5b
* ruby.c (load_file_internal): no need to define DATA when error.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-13 10:38:36 +00:00
nobu
f9be12fb14
* ruby.c (ruby_init_loadpath_safe): suppressed warnings.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-27 04:55:55 +00:00
nobu
8bc6c71547
* ruby.c (load_file_internal): assumes -x flag if no "ruby" is in
...
the shebang line. [ruby-dev:39015]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-05 10:19:18 +00:00
nobu
cb9038cbaf
* io.c (rb_stdio_set_default_encoding): prototyped.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-05 10:18:21 +00:00
naruse
c6abdf3e0c
* ruby.c (rb_stdio_set_default_encoding): declared.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-05 10:12:31 +00:00
naruse
00499c097f
Set encodings of stdio after setting default internal and external.
...
* 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
2009-07-31 07:37:02 +00:00
akr
98aac1e651
* ruby.c (process_options): don't specify .so for encdb here.
...
"." 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
2009-06-22 16:21:09 +00:00
nobu
4a81d13592
* ruby.c (ruby_init_loadpath_safe): removed "." from load_path.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-22 07:26:16 +00:00
nobu
c030cf1975
* ruby.c (process_options), enc/prelude.rb: encdb and transdb are
...
extension libraries.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-22 05:41:51 +00:00
nobu
210e51f3bd
* ruby.c (process_options): set progname earlier.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-22 05:35:51 +00:00
mame
5d30ddec17
* load.c (Init_load): $: must be readonly. [ruby-dev:38690]
...
* 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
2009-06-21 13:35:41 +00:00
nobu
3b6d6b0861
* ruby.c (ruby_init_loadpath_safe): VARIABLE_LIBPATH is always
...
defined, see its value instead.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-17 14:05:08 +00:00
nobu
589ec2beb5
* ruby.c (ruby_script): sets also VM toplevel program name.
...
* 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
2009-05-17 05:02:58 +00:00
nobu
cda453c238
* ruby.c (cmdline_options_init): initialize encodings.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-17 00:51:09 +00:00
nobu
64f767b556
* ruby.c (cmdline_options_init): initialize encodings.
...
* 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
2009-05-17 00:47:49 +00:00
nobu
bd9a5871dd
* ruby.c (ruby_init_loadpath_safe): support for cygwin 1.7. see
...
[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
2009-05-17 00:02:58 +00:00
nobu
214e725334
* ruby.c (set_arg0): get rids of overrun.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-16 23:55:46 +00:00
nobu
22cde7b682
* dir.c, dln.c, parse.y, re.c, ruby.c, sprintf.c, strftime.c,
...
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
2009-03-17 01:29:17 +00:00
nobu
731504b4d3
* ruby.c (load_file_internal): stop the timer thread before exec.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-15 02:00:15 +00:00
nobu
4de12b6ae9
* util.c (ruby_scan_oct, ruby_scan_hex): use size_t.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-14 09:25:20 +00:00
nobu
745bc1fd83
* ruby.c (ruby_init_loadpath_safe): expands libpath and removes
...
last /lib.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-10 21:12:49 +00:00
nobu
ee4fbaa37e
* configure.in (MANGLED_PATH): defines for RUBYLIB_PREFIX.
...
* ruby.c (ruby_init_loadpath_safe): uses string as buffer.
* symbian/setup (config_h): defines MANGLED_PATH.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-09 19:56:46 +00:00
nobu
31d1d0a829
* configure.in (load_relative): new option to enable load path
...
relative to libruby_so.
* ruby.c (ruby_init_loadpath_safe): added the case using dladdr().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-09 15:06:22 +00:00
nobu
033bed37c8
* ext/dl/dl.h (dlerror): fixed on Windows.
...
* ext/dl/handle.c (rb_dlhandle_initialize): returns handle to
libruby if nil is given on Windows as dlopen.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-02 02:01:48 +00:00
yugui
5c94b5d113
* eval.c (ruby_options): evaluator now expects iseq instead of tree.
...
* ruby.c (ruby_process_options): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22 04:04:31 +00:00
nobu
f35308b3ef
* eval_intern.h (translit_char): moved from ruby.c.
...
* load.c (load_ext): transliterates file separators and back if
needed.
* symbian/setup (DLN_NEEDS_ALT_SEPARATOR): defined.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-19 06:11:41 +00:00
nobu
6d3ceb6ce3
* configure.in, */Makefile.sub (LOAD_RELATIVE): moved from ruby.c
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-19 05:48:14 +00:00
usa
03c7332241
* ruby.c (process_options): set initial default_external before -r.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-06 03:12:09 +00:00
usa
5067bfe36e
* ruby.c (process_options): -K and -E in shebang should be reflect to
...
default_external. [ruby-dev:37920]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-06 03:05:27 +00:00
nobu
f4e9d9a2c5
* configure.in (RUBY_LIB_VERSION): added for library version, to
...
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: svn+ssh://ci.ruby-lang.org/ruby/trunk@22069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-05 02:21:37 +00:00
nobu
813dad7afd
* ruby.c (load_file_internal): resets EOF flag after parse.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-03 14:37:09 +00:00
nobu
845103b751
* cont.c (rb_fiber_current), dln.c (dln_print_undef, dln_undefined),
...
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: svn+ssh://ci.ruby-lang.org/ruby/trunk@21929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-01 12:51:44 +00:00
nobu
938fcd6b70
* io.c (rb_io_ungetbyte, rb_io_ungetc): allows nil to reset EOF
...
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: svn+ssh://ci.ruby-lang.org/ruby/trunk@21718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-21 12:42:39 +00:00
nobu
1a0f593b3c
* ruby.c (load_file_internal): no need to cast.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-21 04:59:20 +00:00
ko1
d31e1d4a52
* ruby.c (require_libraries): reset th->parse_in_eval while
...
loading libraries. fixes [ruby-dev:37780]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-19 04:41:19 +00:00
ko1
c4c3f238d7
* iseq.c:
...
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: svn+ssh://ci.ruby-lang.org/ruby/trunk@21653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-19 01:06:56 +00:00
ko1
e40928733d
* ruby.c (process_options): decrement parse_in_eval to recognize
...
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: svn+ssh://ci.ruby-lang.org/ruby/trunk@21571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-15 16:14:43 +00:00
matz
c6af6b1b94
* symbian/README.SYMBIAN: symbian support added. great appreciate
...
to <alexandre.zavorine at symbian.com>.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-15 01:53:08 +00:00
ko1
ec5283e691
* ruby.c (process_options): set th->base_block only while
...
it is needed.
* ruby.c (require_libraries): clear th->base_block before
require libraries.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-28 18:45:24 +00:00
ko1
b19be9b1a9
* ruby.c (process_options): fix to untouch th->mild_compile_error.
...
[ruby-dev:37621], [ruby-dev:37620]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-27 06:05:41 +00:00
ko1
597220ef0c
* vm.c (Init_VM): create and define TOPLEVEL_BINDING at first.
...
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@21079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-27 01:15:56 +00:00
nobu
e5bfdb8391
* ruby.c (process_options): get rid of warning on DOSISH.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-19 06:51:52 +00:00
usa
6a613ba2e4
* ruby.c (set_arg0): use strlcpy() instead of strncpy().
...
* load.c (rb_feature_p): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-16 02:37:45 +00:00
matz
0e20782339
* ruby.c (process_options): revive global sub, gsub, chop, chomp
...
only when auto looping options (-p/-n) is specified.
[ruby-core:20570]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-15 14:46:50 +00:00
nobu
f403298449
* ruby.c (rubylib_mangled_path, rubylib_mangled_path2): cannot use
...
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: svn+ssh://ci.ruby-lang.org/ruby/trunk@20741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-15 02:32:21 +00:00
kouji
e53990e4bd
* ruby.c (process_options): fixed default_internal is nil.
...
(closes #862 )
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-13 06:58:58 +00:00
yugui
aa06e69000
* encoding.c (enc_get_default_encoding): removed.
...
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: svn+ssh://ci.ruby-lang.org/ruby/trunk@20656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-12 05:25:39 +00:00
nobu
774f924db9
* ruby.c (proc_options): added version, copyright, usage, yydebug,
...
syntax to --dump option.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-08 02:28:17 +00:00
nobu
ba274d1f46
* ruby.c (proc_options): source-encoding option.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-08 02:15:47 +00:00
nobu
ecc83033ba
* ruby.c (set_option_encoding_once): dry.
...
* ruby.c (proc_options): checks extra argument for -E/--encoding.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-08 01:32:36 +00:00
matz
b58ed03759
* ruby.c (usage): -W description updated. [ruby-core:19858]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-21 18:34:03 +00:00
davidflanagan
2228f91851
ruby.c (set_internal_encoding_once): fix typo in error string
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-11 22:18:21 +00:00
nobu
04e94c6ec8
* ruby.c (process_options): delays setting safe level.
...
[ruby-dev:36997]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-30 23:16:16 +00:00
matz
86c50e3983
* ruby.c (load_file_internal): should not set script encoding to
...
ASCII-8BIT.
* ruby.c (load_file_internal): do not auto convert scripts even
when default_internal is set. [ruby-core:19579]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-30 09:17:49 +00:00
nobu
5cdd7f52cc
* ruby.c (moreswitches): splits option string and passes arguments.
...
* ruby.c (proc_options): checks if allowed in RUBYOPT.
* ruby.c (process_options): allows long style options in RUBYOPT.
* ruby.c (load_file_internal): ditto in shebang. [ruby-dev:36979]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-30 01:34:23 +00:00
nobu
bc4bc3a80f
* ruby.c (load_file_internal): use ASCII-8BIT to prevent conversion.
...
[ruby-core:19579]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-29 00:30:09 +00:00
nobu
bd92ab89c0
* ruby.c (load_file_internal): cache common interned IDs.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-29 00:23:04 +00:00
nobu
0a20a506e1
* ruby.c (load_file): preserves $.. [ruby-dev:36937]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-27 06:58:28 +00:00
yugui
5106742893
* ruby.c (usage): updated the description of -E option.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-25 02:18:53 +00:00
matz
3f0ec8887f
* string.c (rb_external_str_new): a new function to convert from
...
external encoding to internal encoding. if something went
wrong, it returns a string with the external encoding.
* string.c (rb_external_str_new_with_enc): same as above besides
you can specify the source encoding.
* ruby.c (ruby_set_argv): use rb_external_str_new()
* ruby.c (set_arg0, ruby_script): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-18 10:36:20 +00:00
matz
4709e330cf
* ruby.c (proc_options): no warning when default_external already
...
set by -E.
* test/ruby/test_rubyoptions.rb (TestRubyOptions#test_rubyopt):
put -K after -E to set script encoding.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-16 22:21:09 +00:00
matz
40adf66644
* ruby.c (process_options): -U should be allowed in RUBYOPT
...
environment variable. [ruby-dev:36720]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-15 07:48:34 +00:00
nobu
40c08c9ee6
* ruby.c (proc_options): -U can be followed by other options.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-14 05:11:20 +00:00
matz
339ceda4e8
* ruby.c (set_internal_encoding_once): check double contradicted
...
specification of the encoding from command line.
* ruby.c (set_external_encoding_once): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-14 00:41:09 +00:00
matz
9ed35ae793
* ruby.c (proc_options): add -U command line option to specify
...
utf-8 as default_internal.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-12 23:03:17 +00:00
matz
baeeebf474
* encoding.c (rb_default_internal_encoding): merged a patch from
...
Michael Selig <michael.selig at fs.com.au> in [ruby-core:18985].
* io.c (rb_io_ext_int_to_encs): ditto.
* ruby.c (proc_options): support default internal encoding in -E
option.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-07 17:39:44 +00:00
yugui
e8ee99ff1a
* dln.c: Ruby no longer supports VMS.
...
* error.c: ditto.
* eval.c: ditto.
* eval_intern.h: ditto.
* include/ruby/defines.h: ditto.
* include/ruby/ruby.h: ditto.
* io.c: ditto.
* process.c: ditto.
* ruby.c: ditto.
* vms/config.h: removed.
* vms/vms.h: ditto.
* vms/vmsruby_private.c: ditto.
* vms/vmsruby_private.h: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04 13:57:06 +00:00
yugui
a8c3540b32
* dln.c: Ruby no longer supports Windows CE.
...
* eval.c: ditto.
* include/ruby/defines.h: ditto.
* include/ruby/win32.h: ditto.
* ruby.c: ditto.
* strftime.c: ditto.
* win32/Makefile.sub: ditto.
* win32/win32.c: ditto.
* ext/tk/extconf.rb: ditto.
* lib/fileutils.rb: ditto.
* test/fileutils/test_fileutils.rb: ditto.
* wince/*: removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04 13:48:20 +00:00
yugui
642e081879
* dln.c: Ruby no longer supports MacOS 9 or before.
...
* eval.c: ditto.
* eval_intern.h: ditto.
* ext/extmk.rb: ditto.
* ext/tk/sample/tkextlib/treectrl/demo.rb: ditto.
* ext/tk/stubs.c: ditto.
* file.c: ditto.
* hash.c: ditto.
* include/ruby/defines.h: ditto.
* ruby.c: ditto.
* signal.c: ditto.
* vm_core.h: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04 13:42:00 +00:00
yugui
ae7ea3332b
* dln.c: Ruby no longer supports MS-DOS.
...
* ext/sdbm/_sdbm.c: ditto.
* ext/sdbm/sdbm.h: ditto.
* gc.c: ditto.
* hash.c: ditto.
* include/ruby/defines.h: ditto.
* include/ruby/util.h: ditto.
* io.c: ditto.
* process.c: ditto.
* ruby.c: ditto.
* strftime.c: ditto.
* util.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04 13:33:22 +00:00
yugui
8dd118c0db
* djgpp/GNUmakefile.in: removed. Ruby no longer supports djgpp.
...
* djgpp/README.djgpp: ditto.
* djgpp/config.hin: ditto.
* djgpp/config.sed: ditto.
* djgpp/configure.bat: ditto.
* djgpp/mkver.sed: ditto.
* ext/Setup.dj: ditto.
* dln.c: removed djgpp supports.
* file.c: ditto.
* gc.c: ditto.
* io.c: ditto.
* process.c: ditto.
* ruby.c: ditto.
* signal.c: ditto.
* util.c: ditto.
* vm_core.h: ditto.
* lib/fileutils.rb: ditto.
* lib/mkmf.rb: ditto.
* ext/socket/socket.c: ditto.
* test/fileutils/test_fileutils.rb: ditto.
* test/ruby/test_env.rb: ditto.
* test/ruby/test_path.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04 13:25:12 +00:00
yugui
bbbd9c0b7b
* x68/_dtos18.c: removed. Ruby no longer supports human68k.
...
* x68/_round.c: ditto.
* x68/fconvert.c: ditto.
* x68/select.c: ditto.
* ext/Setup.x68: ditto.
* missing/x68.c: ditto.
* dln.c (dln_find_exe_r): removed human68k supports.
(dln_find_1): ditto.
* lib/mkmf.rb: ditto.
* ext/extmk.rb (Init_ext): ditto.
* ext/socket/socket.c (init_sock): ditto.
* gc.c (GC_MALLOC_LIMIT): ditto.
(rb_setjmp, rb_jmpbuf): ditto.
(mark_current_machine_context): ditto.
* include/ruby/defines.h (PATH_ENV): ditto.
* io.c: ditto.
* process.c: ditto.
* ruby.c: ditto.
* test/ruby/test_env.rb: ditto.
* test/ruby/test_path.rb: ditto.
* LEGAL
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04 13:12:13 +00:00
ko1
2e311f6bd5
* include/ruby/node.h, node.h: move node.h from include path.
...
This change stop to install node.h beacuase of saving ABI
(node.h will be changed. Extensions should not depends on
this file).
* blockinlining.c, class.c, compile.c, debug.h, enum.c,
gc.c, iseq.c, parse.y, ruby.c, signal.c, variable.c,
vm.c, vm_core.h, vm_dump.c: ditto.
* ext/ripper/depend: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-23 19:52:31 +00:00
ko1
7f7834abf7
* include/ruby/node.h, vm_core.h: move definition of
...
RUBY_VM_METHOD_NODE to node.h.
* class.c, common.mk: remove useless inclusion.
* compile.h, iseq.h, vm_core.h: rename compile.h to iseq.h.
move some definitions from vm_core.h to iseq.h.
* compile.c, iseq.c, vm.c: ditto.
* eval.c, compile.c: move some functions for parser
from eval.c to compile.c.
* eval_intern.h, vm_core.h: move va_init_list() macro to
vm_core.h.
* iseq.c (rb_iseq_new_top, rb_iseq_first_lineno): added.
* load.c, ruby.c: use rb_iseq_new_top() instead of
rb_iseq_new() with ISEQ_TYPE_TOP constant directly.
* proc.c: use rb_iseq_first_lineno() instead of accessing
iseq structure.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-23 07:49:45 +00:00
ko1
69029b90fe
* gc.c, include/ruby/ruby.h: rename rb_register_mark_object()
...
to rb_gc_register_mark_object().
* eval.c, vm.c: initialize vm->mark_object_ary at
Init_top_self().
* bignum.c, complex.c, encoding.c, ext/win32ole/win32ole.c,
io.c, load.c, marshal.c, rational.c, ruby.c, vm.c:
use rb_gc_register_mark_object() instead of
rb_global_variable() or rb_gc_register_address().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-15 14:59:14 +00:00
nobu
387d645af0
* ruby.c (process_options): associates the locale encoding with $0 as
...
well as ARGV.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-14 07:07:31 +00:00
nobu
ce60bbc851
* include/ruby/intern.h (rb_io_ungetbyte): added prototype.
...
* io.c (rb_io_gets): use rb_io_getline_1 for unget buffer.
* ruby.c (load_file): use rb_io_ungetbyte.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-25 08:36:46 +00:00
shugo
f433d710d0
* object.c (rb_obj_untrusted): new method Object#untrusted?.
...
(rb_obj_untrust): new method Object#untrust.
(rb_obj_trust): new method Object#trust.
* array.c, debug.c, time.c, include/ruby/ruby.h, re.c, variable.c,
string.c, io.c, dir.c, vm_method.c, struct.c, class.c, hash.c,
ruby.c, marshal.c: fixes for Object#untrusted?.
* test/ruby/test_module.rb, test/ruby/test_array.rb,
test/ruby/test_object.rb, test/ruby/test_string.rb,
test/ruby/test_marshal.rb, test/ruby/test_hash.rb: added tests for
Object#untrusted?.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-13 07:25:05 +00:00
shyouhei
0ef21e44e7
forgot to commit
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-01 09:50:30 +00:00
shyouhei
3e69e83a62
* include/ruby/ruby.h (enum ruby_special_consts): ISO C forbids
...
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
2008-07-01 08:27:58 +00:00
nobu
de15273702
* ruby.c (set_arg0, ruby_prog_init): freeze $0. a patch from Keita
...
Yamaguchi <keita.yamaguchi at gmail.com>.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-26 15:00:16 +00:00
nobu
29ad22694f
* ruby.c (verbose_setter, opt_W_getter): fixed prototypes.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-18 12:08:16 +00:00
usa
2c66adba64
* ruby.c (opt_W_getter): use ruby_verbose directly instead of parameter
...
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
2008-06-18 10:22:06 +00:00
nobu
3e30cdad08
* ruby.c (opt_W_getter): made a hooked variable.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-17 14:02:20 +00:00
nobu
7799fe9e9f
* ruby.c (rb_argv0): revised for ext/tk.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-10 02:25:18 +00:00
nobu
5a647a3f5f
* include/ruby/ruby.h (CONST_ID): constant ID cache for non-gcc.
...
* *.c: no cache in init functions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-09 09:25:32 +00:00
matz
66054b9e3d
* ruby.c (require_libraries): req_list may be NULL. [ruby-dev:35008]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-09 06:40:02 +00:00
nobu
6cdc89332e
* vm_core.h (struct rb_vm_struct): moved ruby_debug, ruby_verbose, and
...
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
2008-06-09 05:18:03 +00:00
nobu
9fb521515d
* vm_core.h (struct rb_vm_struct): moved src_encoding_index.
...
* 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
2008-06-09 04:20:07 +00:00
ko1
72ba13aa8e
* array.c, bignum.c, cont.c, dir.c, dln.c, encoding.c, enumerator.c,
...
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
2008-06-08 10:01:40 +00:00
nobu
8f05f7fe05
* ruby.c (set_arg0): reverted used variable definition.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-01 18:52:15 +00:00
naruse
ccb61351ea
* rational.c (string_to_r_internal): use rb_isdigit.
...
* 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
2008-06-01 18:23:10 +00:00
nobu
075530a685
* suppress warnings with -Wwrite-string.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-31 09:28:20 +00:00
nobu
75aa81b79d
* ruby.c (process_options): --dump option exit immediately.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-20 04:19:27 +00:00
nobu
8afd39ad09
* ruby.c (proc_options, process_options): --dump option.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-20 03:13:52 +00:00
nobu
294a1d2270
* ruby.c (ruby_init_gems), gem_prelude.rb: check if Gem is defined
...
instead of Gem::Enable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-12 01:52:53 +00:00
nobu
4264ca9436
* dln.c (dln_find_exe_r, dln_find_file_r): reentrant versions.
...
* 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
2008-05-07 21:43:54 +00:00
usa
ffd4bf96cc
* ruby.c (process_options, ruby_set_argv): set encoding of rb_argv
...
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
2008-05-07 11:25:23 +00:00
nobu
01b773a093
* load.c (rb_load_path), vm_core.h (rb_vm_t): moved to VM.
...
* 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
2008-04-30 09:03:03 +00:00
naruse
fe0446cc01
* ruby.c (ruby_set_argv): ARGV should be locale encoding.
...
[ruby-list:44861]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-26 23:08:38 +00:00
matz
ae6782315a
* ruby.c (process_options): set safe_level before loading script.
...
[ruby-dev:34421]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-24 08:20:56 +00:00
nobu
6cdd421a9b
* ruby.c (process_options): preludes and parser need to run in safe
...
level 0. [ruby-dev:34407]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-15 17:40:46 +00:00
nobu
73437c05f5
* ruby.c (process_options): dln_find_file returns the pointer to a
...
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
2008-04-15 17:26:29 +00:00
nobu
639c3a8962
* include/ruby/intern.h (rb_argv): replaced with rb_get_argv().
...
[ruby-Bugs-19514]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-15 09:02:19 +00:00
nobu
7b4a171158
* eval.c (ruby_exec_node, ruby_run_node), ruby.c (process_options):
...
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
2008-04-12 03:41:51 +00:00
nobu
f6001be537
* ruby.c (proc_options): checks if the word is empty.
...
* 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
2008-03-25 07:32:58 +00:00
matz
8149168db6
* ruby.c (usage): remove some unimportant lines to fit -h message
...
in a page. [ruby-dev:34018]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-10 15:47:47 +00:00
nobu
6a9bfa23bf
* ruby.c (load_file): parse shebang in us-ascii. a patch from
...
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
2008-03-02 01:13:15 +00:00
nobu
b8a733d0b8
* io.c (struct argf): packed ARGF stuffs.
...
* 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
2008-03-01 08:59:04 +00:00
nobu
b676e2671e
* ruby.c (enable_option, disable_option): allow all for all known
...
features.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-23 21:49:15 +00:00
nobu
552badf29f
* debug.c (ruby_set_debug_option): separated ruby_each_words().
...
* 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
2008-02-23 21:13:05 +00:00
nobu
b3b3ff29b5
* ruby.c (proc_options): check if argument for -E exists.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-23 20:25:29 +00:00
naruse
9a431fd58c
* ruby.c (process_options): set default_external before loading
...
libraries. [ruby-dev:33801]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-15 23:03:22 +00:00
naruse
dd738cd887
* ruby.c (load_file): enc must effect source encoding.
...
[ruby-core#15496]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-12 01:20:43 +00:00
naruse
bd5a15f76d
* ruby.c (load_file): the encoding of DATA follows the source
...
file encoding. [ruby-dev:33693]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-11 01:47:26 +00:00
usa
2160c40fb2
* parse.y (parser_initialize): set default script encoding as US-ASCII.
...
* 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
2008-01-25 18:49:28 +00:00
nobu
a984e00b80
* ruby.c (load_file): set default to ASCII-8BIT explicitly if -K
...
option is not given.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-25 08:12:15 +00:00
nobu
8020c2e676
* ruby.c (process_options, load_file, rb_load_file): propagates script
...
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
2008-01-25 07:11:18 +00:00
nobu
5776f23d69
* ruby.c (process_options): set encoding of -e option from -E option
...
if they are compatible.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-25 06:56:50 +00:00
nobu
c30d2489dd
* ruby.c (cmdline_arguments): split argc and argv from cmdline_options.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-25 06:41:22 +00:00
nobu
95e59bd9e0
* ruby.c (process_options): not set encoding of -e option from -E
...
option if they are not compatible.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-25 06:12:44 +00:00
usa
2fc0fe5332
* ruby.c (proc_options, process_options, load_file): shouldn't effect
...
--encoding to script encoding. [ruby-dev:33169]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-25 04:18:14 +00:00
naruse
ac7794478c
* ruby.c (proc_optionc): -Kn means ASCII-8BIT.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-23 16:08:04 +00:00
nobu
9872d4d600
* parse.y (parser_prepare): get encoding from the first line.
...
[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
2008-01-18 23:35:38 +00:00
nobu
9eab65b3f0
* ruby.c (proc_options): encoding libraries cannot be loaded until
...
load path is set.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-15 07:59:33 +00:00
matz
c884219d96
* ruby.1: a patch to describe --encoding. a patch from Yugui
...
<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
2008-01-14 07:10:22 +00:00
nobu
e26e05c4ab
* ruby.c (load_file): local variable was not initialized when -x flag
...
is given.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-13 04:53:02 +00:00
nobu
60e38b6efb
* ruby.c (load_file): script files should not be affected by locale.
...
[ruby-dev:33054]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-13 04:50:48 +00:00
nobu
a7b36aebe8
* ruby.c (proc_options): fixed typo.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-13 04:37:17 +00:00
naruse
513d0ca7f6
* encoding.c (ENCINDEX_EUC_JP, ENCINDEX_SJIS): removed.
...
(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
2008-01-13 02:51:15 +00:00
naruse
7f9c3b1c97
* ruby.c (process_options): -e'script' is locale encoding by default.
...
(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
2008-01-11 19:41:22 +00:00
nobu
d036633dcb
* ruby.c (process_options): give priority command line encoding option
...
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
2008-01-09 06:54:26 +00:00
akr
6cdef2dc7e
* $Date$ keyword removed to avoid inclusion of locale dependent
...
string.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-06 15:49:38 +00:00
nobu
4be0eb95cf
* ruby.c (proc_options): no need for intermediate object.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-05 04:04:26 +00:00
matz
b65d6208fe
* ruby.c (proc_options): update according to the last API revert.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-04 16:47:41 +00:00