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