Граф коммитов

465 Коммитов

Автор SHA1 Сообщение Дата
nobu d6379666ca file.c: set errno
* file.c (ruby_is_fd_loadable): set proper errno.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-17 23:41:14 +00:00
nobu d5cb997f18 ruby.c: suppress warnings
* ruby.c (loadopen_func): suppress a warning, unused function.

* ruby.c (open_load_file): suppress warnings, results of close(2).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-17 23:38:18 +00:00
kosaki bc8687acd6 * ruby.c (open_load_file): reset O_NONBLOCK after open.
Even if S_ISREG() is true, the file may be file on FUSE filesystem
  or something. We can't assume O_NONBLOCK is safe.
  Moreover, we should wait if the path is point to FIFO. That's
  FIFO semantics. GVL should be transparent from ruby script.
  Thus, just reopen without O_NONBLOCK for filling the requirements.
  [Bug #11060][Bug #11559]
* ruby.c (loadopen_func): new for the above.
* file.c (ruby_is_fd_loadable): new. for checks loadable file type
  of not.
* file.c (rb_file_load_ok): use ruby_is_fd_loadble()
* internal.h: add ruby_is_fd_loadble()
* common.mk: now, ruby.o depend on thread.h.
* test/ruby/test_require.rb
(TestRequire#test_loading_fifo_threading_success): new test.
  This test successful case that loading from FIFO.
* test/ruby/test_require.rb
(TestRequire#test_loading_fifo_threading_raise): rename from
  test_loading_fifo_threading. You souldn't rescue an exception
  if you test raise or not.
  Moreover, this case should be caught IOError because load(FIFO)
  should be blocked until given any input.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-17 21:09:10 +00:00
nobu c1a6fdc86c ruby.c: unify nested code
* ruby.c (load_file): unify each preparations and clean-ups by
  merging load_file_internal and load_file_internal2, and remove
  nested rb_protect and rb_ensure.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-17 04:19:12 +00:00
nobu 4bc884c4f3 ruby.c: conflicting O_NONBLOCK
* ruby.c (load_file_internal): do not use O_NONBLOCK when
  conflicting with O_ACCMODE.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-17 04:03:23 +00:00
nobu 34b877e491 ruby.c: fd leak
* ruby.c (load_file_internal): fix potential fd leak.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-16 23:24:37 +00:00
nobu abf832f435 file.c: non-blocking open
* file.c (rb_file_load_ok): open in non-blocking mode withoout
  releasing GVL.  don't care about others than regular files and
  directories.  [ruby-dev:49272] [Bug #11559]
* ruby.c (load_file_internal): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-16 06:54:38 +00:00
nobu 832c74f428 ruby.c: frozen-string-literal option
* ruby.c (process_options): add an option to enable/disable
  frozen-string-literal.  [Feature #8976]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-27 06:47:00 +00:00
nobu 6b52b88d46 ruby.c: abbreviated option name
* ruby.c (name_match_p): allow option argument names to be
  abbreviated for each words.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-27 05:47:24 +00:00
nobu f9a9193ae0 ruby.c: feature bits
* ruby.c (enum feature_flag_bits, struct cmdline_options): turn
  negative logic disable bits into positive logic feature bits.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-23 14:43:45 +00:00
usa 40f304e025 * ruby.c (usage, enable_option, disable_option, process_options): new
option `--disable_did_you_mean`.

* gem_prelude.rb: now requires did_you_mean gem by default if available.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-09 07:57:31 +00:00
nobu 9af0cf1cfb internal.h: move rb_readlink declaration
* internal.h (rb_readlink): move the declaration.

* ruby.c (dladdr_path): rb_readlink now requires the result
  encoding.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-05 14:00:15 +00:00
ko1 e4198a73d4 * make rb_iseq_t T_IMEMO object (type is imemo_iseq).
All contents of previous rb_iseq_t is in rb_iseq_t::body.
  Remove rb_iseq_t::self because rb_iseq_t is an object.
  RubyVM::InstructionSequence is wrapper object points T_IMEMO/iseq.
  So RubyVM::ISeq.of(something) method returns different wrapper
  objects but they point the same T_IMEMO/iseq object.
  This patch is big, but most of difference is replacement of
  iseq->xxx to iseq->body->xxx.
  (previous) rb_iseq_t::compile_data is also located to
  rb_iseq_t::compile_data.
  It was moved from rb_iseq_body::compile_data.
  Now rb_iseq_t has empty two pointers.
  I will split rb_iseq_body data into static data and dynamic data.
* compile.c: rename some functions/macros.
  Now, we don't need to separate iseq and iseqval (only VALUE).
* eval.c (ruby_exec_internal): `n' is rb_iseq_t (T_IMEMO/iseq).
* ext/objspace/objspace.c (count_imemo_objects): count T_IMEMO/iseq.
* gc.c: check T_IMEMO/iseq.
* internal.h: add imemo_type::imemo_iseq.
* iseq.c: define RubyVM::InstructionSequnce as T_OBJECT.
  Methods are implemented by functions named iseqw_....
* load.c (rb_load_internal0): rb_iseq_new_top() returns
  rb_iseq_t (T_IMEMO/iesq).
* method.h (rb_add_method_iseq): accept rb_iseq_t (T_IMEMO/iseq).
* vm_core.h (GetISeqPtr): removed because it is not T_DATA now.
* vm_core.h (struct rb_iseq_body): remove padding for
  [Bug #10037][ruby-core:63721].



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-21 22:52:59 +00:00
nobu aae22e3408 ruby.c: copy initial load path marks
* ruby.c (process_options): also copy initial load path marks at
  setting load paths encoding.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-02 05:12:04 +00:00
nobu e28addcf5b ruby.c: show_usage_line
* ruby.c (show_usage_line): extract function to print one usage
  line.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-24 02:20:10 +00:00
nobu 69f47dd0e8 ruby.c: only for load-relative
* ruby.c (dladdr_path): used only when load-relative is enabled.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-24 13:06:58 +00:00
nobu c3ad34c7fa ruby.c: replace with real path
* ruby.c (dladdr_path): replace the executable path with symlinked
  real path.  dladdr(3) on Linux returns the argv[0] as dli_fname
  instead of the real path, for a symbol defined in the executable
  file itself.  [Bug #10776]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-24 12:24:27 +00:00
nobu 3b0ca10539 ruby.c: do not modify shared string
* ruby.c (ruby_init_loadpath_safe): get rid of modify shared
  string directly.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-09 01:05:18 +00:00
nobu dd155e029e ruby.c: no safe_level 4
* ruby.c (process_options): safe_level 4 was removed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-05 21:37:12 +00:00
nobu f235dbeea5 dmyenc.c: try to load encdb
* load.c (ruby_require_internal): separate from rb_require_safe,
  not to raise exceptions.
* ruby.c (process_options): remove unnatural encoding search.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-03 05:51:28 +00:00
nobu 1ce81d6f8b ruby.c: transcode program names
* ruby.c (process_options, ruby_script): transcode script name and
  program name to locale encoding as well as argv.
  [ruby-dev:48752] [Bug #10555]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-29 15:02:58 +00:00
nobu b4c3c3171f ruby.c: translit_char_bin
* ruby.c (translit_char_bin): should not use code page dependent
  CharNext on UTF-8 string.  [ruby-dev:48752] [Bug #10555]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-29 15:02:25 +00:00
nobu 33ea2646b9 win32.c: use UTF-8 for argv
* ruby.c (ruby_set_argv): convert argv from UTF-8.
* win32/win32.c (rb_w32_sysinit, cmdglob, w32_cmdvector): convert
  wide char command line to UTF-8 argv, and glob in UTF-8 so that
  metacharacters would match multibyte characters.
  [ruby-dev:48752] [Bug #10555]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-29 07:53:17 +00:00
normal 83f0e9d6f1 trivial packing of rb_execarg, load_file_arg, args_info
* internal.h (struct rb_execarg): 160 => 144 bytes on x86-64
* ruby.c (struct load_file_arg): 48 => 40 bytes on x86-64
* vm_args.c (struct args_info): ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-23 01:49:57 +00:00
akr fdc41af774 * internal.h (ruby_init_setproctitle): Declare here.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-19 15:57:31 +00:00
akr 2b9191e557 * internal.h: Gather declarations in non-header files.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-18 15:13:05 +00:00
akr 7cd76ab0c5 * internal.h: Include ruby.h and ruby/encoding.h to be
includable without prior inclusion.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-15 11:49:06 +00:00
nobu 4079a35447 ruby.c: no -r when dump
* ruby.c (process_options, load_file_internal2): should not
  require other files when dump option is given.
  [ruby-dev:48712] [Bug #10435]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-28 07:22:43 +00:00
yugui 165221441c Enable nacl_io in pepper-ruby.
* configure.in (XCFLAGS): Add include path for NaCl libraries.
  (XLDFLAGS): ditto.
  (NACL_LIB_PATH): new stubstitution

* nacl/nacl-config.rb: support NACL_LIB_PATH

* nacl/package.rb: ditto.

* nacl/pepper_main.c: replace old implementations with nacl_io.

* nacl/GNUmakefile.in: link nacl_io to pepper_ruby

* ruby.c (rb_load_file): remove __attribute__((weak)) because the old
  override hack was replaced with nacl_io.

* file.c (rb_file_load_ok): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-21 15:23:21 +00:00
yugui 69ac654c90 Merges a patch form naclports.
* configure.in (RUBY_NACL and others): Supports PNaCl.
* dln.c: replace the old hacky dynamic loading over HTTP with nacl_io.
* file.c: tenatively use access(2) instead of eaccess.
  (rb_file_load_ok): weaken with attribute but not by postprocess.
* io.c (socket.h): now NaCl has socket.h
  (flock): disable here instead of nacl/ioctl.h
* nacl/GNUmakefile.in (CC, LD, NM, AR, AS, RANLIB, OBJDUMP, OBJCOPY):
  respect path to them if they are absolute.
  This helps naclports to build ruby in their source tree.
  (PROGRAM_NMF, .SUFFIXES): support .pnexe for PNaCl.
  (ruby.o, file.o): move the hack to attributes in ruby.c and file.c
* nacl/ioctl.h: removed. move the hack to io.c.
* nacl/nacl-config.rb: support arm, pnacl and others.
* nacl/pepper_main.c: support build in a naclports tree.
* ruby.c (rb_load_file): weaken with attribute but not by postprocess.

The patch is by sbc@google.com and the Native Client Authors.
It is available at:
* 873ca4910a/ports/ruby/nacl.patch

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-11 02:11:53 +00:00
nobu e2418c39bd ruby.c: reduce RARRAY_PTR_USE region
* ruby.c (process_options): reduce RARRAY_PTR_USE region, make the
  path to be set before entering the region.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-23 02:52:23 +00:00
akr fc3c52eb37 + * ruby.c (load_file_internal2): Extracted from load_file_internal.
+         (load_file_internal): Invoke load_file_internal2 using rb_protect.
+         Close an opened FD if load_file_internal2 raises an exception.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-03 14:33:51 +00:00
nobu 2254fc650b ruby.c: drop older cygwin
* ruby.c (push_include_cygwin): drop older cygwin support.

* ruby.c (ruby_init_loadpath_safe): ditto, and always use String as
  libpath buffer on Windows.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-17 08:24:15 +00:00
nobu 6613580145 ruby.c: remove mangled_path
* ruby.c (rubylib_mangled_path): remove obsolete code, which has
  been disabled since 5 years ago.

* man/ruby.1 (ENVIRONMENT): delete an obsolete variable to mangle
  path, RUBYLIB_PREFIX.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-16 08:46:31 +00:00
nobu 8ca2f8565d ruby.c: check argc
* ruby.c (proc_options): check argc before dereference of argv, to get
  rid of potential out-of-bound access.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-07 16:20:55 +00:00
tmm1 53e0d4666c gc.c: Load GC tuning settings earlier during boot.
* gc.c (ruby_gc_set_params): Accept safe_level argument so GC tuning
  settings can be applied before rb_safe_level() is available.
* internal.h (rb_gc_set_params): ditto.
* ruby.c (process_options): Apply GC tuning early during boot process
  so boot-time allocations can benefit. This also benefits any code
  loaded in via `ruby -r`.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05 00:19:13 +00:00
nari 9d2f54b3e9 * include/ruby/intern.h (rb_gc_set_params): Deprecate
rb_gc_set_params because it's only used in ruby internal.

* internal.h (ruby_gc_set_params): Declare rb_gc_set_params's
  alias function.

* gc.c: ditto.

* ruby.c: use ruby_gc_set_params.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-22 07:26:55 +00:00
glass 5c54eb4045 * dir.c, pack.c, ruby.c, struct.c, vm_eval.c: use RARRAY_CONST_PTR().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-08 02:37:47 +00:00
nobu 11ef85d237 ruby.c: load statically linked extensions before rubygems
* ruby.c (process_options): load statically linked extensions before
  rubygems, because of ext/thread.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-14 03:32:54 +00:00
nobu 02d28d01cf ruby.c: gem_prelude to load rubygems
* ruby.c (process_options): use gem_prelude instead of requiring
  rubygems directly when --enable=gems is given.
* Makefile.in (DEFAULT_PRELUDES): always use gem_prelude regardless of
  --disable-rubygems.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-14 03:22:24 +00:00
knu 1b4addb445 Process#setproctitle,argv0: Fix and improve rdoc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-02 05:42:02 +00:00
nobu e941e50506 ruby.c: use String path version parser functions
* ruby.c (load_file_internal): use rb_parser_compile_string_path and
  rb_parser_compile_file_path, String path name versions.  [Bug #8753]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-09 13:20:58 +00:00
knu d5ecd17aee Add Process.argv0.
* ruby.c (Process.argv0): New method to return the original value
  of $0. [Feature #8696]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-07 14:12:08 +00:00
knu 34bb945c40 Add Process.setproctitle().
* ruby.c (Process.setproctitle): New method to change the title of
  the running process that is shown in ps(1). [Feature #8696]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-07 14:12:04 +00:00
nobu 8948280c67 load.c: search in OS path encoding
* load.c (rb_load_internal): use rb_load_file_str() to keep path
  encoding.
* load.c (rb_require_safe): search in OS path encoding for Windows.
* ruby.c (rb_load_file_str): load file with keeping path encoding.
* win32/file.c (rb_file_load_ok): use WCHAR type API assuming incoming
  path is encoded in UTF-8.  [ruby-core:56136] [Bug #8676]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-26 04:04:23 +00:00
charliesome fff3589899 * compile.c (make_name_for_block): use PRIsVALUE in format string
instead of %s and RSTRING_PTR to protect objects from being garbage
  collected too soon
* encoding.c (str_to_encindex): ditto
* hash.c (rb_hash_fetch_m): ditto
* io.c (rb_io_reopen): ditto
* parse.y (reg_fragment_check_gen): ditto
* parse.y (reg_compile_gen): ditto
* parse.y (ripper_assert_Qundef): ditto
* re.c (rb_reg_raise): ditto
* ruby.c (set_option_encoding_once): ditto
* vm_eval.c (rb_throw_obj): ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-24 11:31:21 +00:00
akr bd15d4ca78 * internal.h (numberof): Gathered from various files.
* array.c, math.c, thread_pthread.c, iseq.c, enum.c, string.c, io.c,
  load.c, compile.c, struct.c, eval.c, gc.c, parse.y, process.c,
  error.c, ruby.c: Remove the definitions of numberof.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-07 10:01:19 +00:00
ktsj edb98f8b91 fix typos. Patch by k_takata.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-19 03:10:21 +00:00
ko1 83aba04862 * include/ruby/ruby.h: constify RBasic::klass and add
RBASIC_CLASS(obj) macro which returns a class of `obj'.
  This change is a part of RGENGC branch [ruby-trunk - Feature #8339].
* object.c: add new function rb_obj_reveal().
  This function reveal interal (hidden) object by rb_obj_hide().
  Note that do not change class before and after hiding.
  Only permitted example is:
  klass = RBASIC_CLASS(obj);
  rb_obj_hide(obj);
  ....
  rb_obj_reveal(obj, klass);
  TODO: API design. rb_obj_reveal() should be replaced with others.
  TODO: modify constified variables using cast may be harmful for
  compiler's analysis and optimizaton.
  Any idea to prohibt inserting RBasic::klass directly?
  If rename RBasic::klass and force to use RBASIC_CLASS(obj),
  then all codes such as `RBASIC(obj)->klass' will be
  compilation error. Is it acceptable? (We have similar
  experience at Ruby 1.9,
  for example "RARRAY(ary)->ptr" to "RARRAY_PTR(ary)".
* internal.h: add some macros.
* RBASIC_CLEAR_CLASS(obj) clear RBasic::klass to make it internal
  object.
* RBASIC_SET_CLASS(obj, cls) set RBasic::klass.
* RBASIC_SET_CLASS_RAW(obj, cls) same as RBASIC_SET_CLASS
  without write barrier (planned).
* RCLASS_SET_SUPER(a, b) set super class of a.
* array.c, class.c, compile.c, encoding.c, enum.c, error.c, eval.c,
  file.c, gc.c, hash.c, io.c, iseq.c, marshal.c, object.c,
  parse.y, proc.c, process.c, random.c, ruby.c, sprintf.c,
  string.c, thread.c, transcode.c, vm.c, vm_eval.c, win32/file.c:
  Use above macros and functions to access RBasic::klass.
* ext/coverage/coverage.c, ext/readline/readline.c,
  ext/socket/ancdata.c, ext/socket/init.c,
* ext/zlib/zlib.c: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13 10:49:11 +00:00
ko1 aacd771046 * *.c, parse.y, insns.def: use RARRAY_AREF/ASET macro
instead of using RARRAY_PTR().



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13 09:56:22 +00:00