* ChangeLog: fix a typo of r40667.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* random.c: Document Random::DEFAULT by @eLobato [Fixes GH-304]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 2013-05-13

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* hash.c: Hash[] and {} are not equivalent by @eam [Fixes GH-301]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

* ext/openssl/ossl_ssl.c: Disabled OpenSSL::SSL::SSLSocket if
  defined(OPENSSL_NO_SOCK).

  This fixes a linkage error on platforms which do not have socket.
  OpenSSL itself is still useful as a set of cryptographic functions
  even on such platforms.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
class.c: adjust indent

* class.c (singleton_class_of): adjust indent.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
class.c: rb_singleton_class_get

* class.c (rb_singleton_class_get): get the singleton class if exists,
  or nil.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
vm_method.c: rb_method_entry_at

* vm_method.c (rb_method_entry_at): return the method entry for id at
  klass, without ancestors.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
proc.c: Kernel#singleton_method

* proc.c (rb_obj_singleton_method): new method Kernel#singleton_method
  which returns a Method object of the singleton method.
  non-singleton method causes NameError, but not aliased or zsuper
  method, right now.
  [ruby-core:54914] [Feature #8391]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gc.c (rb_data_object_alloc, rb_data_typed_object_alloc):
  use NEWOBJ_OF() instead of NEWOBJ().



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gc.c (rb_data_object_alloc): check klass only if klass is not 0.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* object.c (rb_obj_setup): added.
* include/ruby/ruby.h (OBJSETUP): ues rb_obj_setup() instead of
  a macro.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ChangeLog: add a comment.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* include/ruby/ruby.h: add new utility macros to access
  Array's element.
* RARRAY_AREF(a, i) returns i-th element of an array `a'
* RARRAY_ASET(a, i, v) set i-th element of `a' to `v'
  This change is a part of RGENGC branch [ruby-trunk - Feature #8339].



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* *.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
* 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
* iseq.c (prepare_iseq_build): remove additional line braek.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32/win32.c, include/ruby/win32.h (getipaddrs): [experimental]
  emulate getipaddrs(3) on Unix.

* win32/Makefile.sub, configure.in (LIBS): need iphlpapi.lib for above
  function.

* include/ruby/win32.h (socketpair): rb_w32_socketpair() doesn't
  substitute for any function, so use non-prefixed name.

* ext/socket/extconf.rb (socketpair); follow above change.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32/win32.c (getipaddrs): use alternamtive interface name if
  available, because if_nametoindex() requires them.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/socket/extconf.rb: Check socketpair again.
  It is required on Unix.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e