Commit graph

286 commits

Author SHA1 Message Date
yugui
a2339bc021 merges r25526,r25527,r25528,r25529,r25530 and r25555 from trunk into ruby_1_9_1.
--
* encoding.c (get_filesystem_encoding):
  add Encoding.filesystem_encoding [ruby-dev:39546]
  also see [ruby-core:25959]
--
* gem_prelude.rb (Gem.set_home):
  force_encoding(Encoding.filesystem_encoding)
  [ruby-dev:39546]

* gem_prelude.rb (Gem.set_paths): ditto.
--
Previous commit is for [ruby-core:25959]
--
* encoding.c (get_filesystem_encoding): removed.

* encoding.c (rb_locale_encindex): added.

* encoding.c (rb_filesystem_encindex): added.

* encoding.c (rb_filesystem_encindex): add an alias 'filesystem'.
  [ruby-dev:39574]

* encoding.c (enc_find): add rdoc about special aliases.

* gem_prelude.rb (Gem.set_home): use Encoding.find('filesystem').

* gem_prelude.rb (Gem.set_paths): ditto.
--
* encoding.c (enc_find): fixed rdoc formatting.
--
* ruby.c (process_options): call rb_filesystem_encoding().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-30 12:54:15 +00:00
yugui
9f79faa5d5 merges r24408 and r24409 from trunk into ruby_1_9_1.
--
* ruby.c (rb_stdio_set_default_encoding): declared.
--
* io.c (rb_stdio_set_default_encoding): prototyped.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-08 15:34:48 +00:00
yugui
944148dd91 merges r24337 from trunk into ruby_1_9_1.
--
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/branches/ruby_1_9_1@24456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-08 15:31:15 +00:00
yugui
c126c95c71 merges r23813 and r23821 from trunk into ruby_1_9_1.
--
* ruby.c (process_options), enc/prelude.rb: encdb and transdb are
  extension libraries.
--
* 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/branches/ruby_1_9_1@23843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-24 16:07:52 +00:00
yugui
eed1694c57 merges r23813 and r23821 from trunk into ruby_1_9_1.
--
* ruby.c (process_options), enc/prelude.rb: encdb and transdb are
  extension libraries.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-24 16:03:32 +00:00
yugui
d990d38aac merges r23809 from trunk into ruby_1_9_1.
--
* 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/branches/ruby_1_9_1@23810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-21 14:41:36 +00:00
yugui
18c0a7eebf merging r22085 needs r20086. [ruby-dev:38067]
merges r22086 from trunk into ruby_1_9_1.
	* ruby.c (process_options): set initial default_external before -r.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@22729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-03 11:38:55 +00:00
yugui
051558c92f merges r22085 from trunk into ruby_1_9_1.
* 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/branches/ruby_1_9_1@22516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22 09:48:05 +00:00
yugui
9a62ed5603 gets rid of ^D^D to quit script from stdin.
merges r22017 from trunk into ruby_1_9_1.
* ruby.c (load_file_internal): resets EOF flag after parse.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@22508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22 09:47:05 +00:00
yugui
3929773eef merges r21653 from trunk into ruby_1_9_1.
* 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/branches/ruby_1_9_1@21847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-28 11:09:24 +00:00
yugui
6c04b9531c merges r21715 and r21718 from trunk into ruby_1_9_1.
* io.c (rb_io_ungetbyte, rb_io_ungetc): clears EOF flag.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-28 09:20:46 +00:00
yugui
6106439984 merges r21661 from trunk into ruby_1_9_1.
* 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/branches/ruby_1_9_1@21689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-20 09:52:51 +00:00
yugui
1bf3fe1d60 merges r21571 from trunk into ruby_1_9_1.
* 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/branches/ruby_1_9_1@21576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-15 16:33:06 +00:00
yugui
3562d7bd82 merges r21143 from trunk into ruby_1_9_1.
* ruby.c (process_options): set th->base_block only while
  it is needed. [ruby-dev:37634]
* ruby.c (require_libraries): clear th->base_block before
  require libraries.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-29 07:19:11 +00:00
yugui
f531b26c9a merges r21089 from trunk into ruby_1_9_1.
* 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/branches/ruby_1_9_1@21119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-28 09:40:56 +00:00
yugui
846ca98acf merges r21079 from trunk into ruby_1_9_1.
* 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/branches/ruby_1_9_1@21083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-27 02:16:28 +00:00
yugui
d82eb1a48b merges r20869 from trunk into ruby_1_9_1.
* ruby.c (process_options): get rid of warning on DOSISH.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-19 12:11:53 +00:00
yugui
7dbb64a2ea merges r20771 and r20772 from trunk into ruby_1_9_1.
* ruby.c (set_arg0): use strlcpy() instead of strncpy().

	* load.c (rb_feature_p): ditto.

	* dln.c (dln_load): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-17 06:17:22 +00:00
yugui
423ca67130 merges r20765 from trunk into ruby_1_9_1.
* 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/branches/ruby_1_9_1@20820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-17 06:16:47 +00:00
yugui
0949c4c659 merges r20741 from trunk into ruby_1_9_1.
* 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/branches/ruby_1_9_1@20808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-17 06:14:51 +00:00
yugui
5f67291e42 merges r20720 from trunk into ruby_1_9_1.
* ruby.c (process_options): fixed default_internal is nil.
  (closes #862)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-16 10:25:42 +00:00
yugui
0eb7def2ad merges r20625, r20633, r20656 and r20665 from trunk into ruby_1_9_1.
--
* encoding.c (enc_set_default_encoding): allowed to set default
  encoding.
--
* encoding.c (rb_enc_aliases_enc_i): skips default internal.
--
* 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.
--
* encoding.c (rb_enc_set_default_external): default_internal can be
  nil, but default_external cannot.

* encoding.c (rb_set_default_internal): adds rdoc.

* encoding.c (enc_find): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-13 01:02:43 +00:00
yugui
a7e1f0a808 merges r20575 from trunk into ruby_1_9_1.
* 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/branches/ruby_1_9_1@20671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-12 14:53:42 +00:00
yugui
4c0a702c2b merges r20295 from trunk into ruby_1_9_1.
* ruby.c (usage): -W description updated.  [ruby-core:19858]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-22 14:52:36 +00:00
yugui
509a936e10 merges r20227 from trunk into ruby_1_9_1.
ruby.c (set_internal_encoding_once): fix typo in error string

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-18 16:47:16 +00:00
yugui
9de406c280 merges r20053 and r20067 from trunk into ruby_1_9_1.
* 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/branches/ruby_1_9_1@20219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-11 15:21:06 +00:00
yugui
43a9c5a364 merges r20056 from trunk into ruby_1_9_1.
* 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/branches/ruby_1_9_1@20064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-30 14:36:09 +00:00
yugui
c1ef322e53 merged r20012 and r20013 from trunk into ruby_1_9_1.
* ruby.c (load_file_internal): use ASCII-8BIT to prevent conversion.
  [ruby-core:19579]
* ruby.c (load_file_internal): cache common interned IDs.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-29 16:13:09 +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