--
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
--
* 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
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
* 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
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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
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
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
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
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
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