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