object.c: rb_class_search_ancestor

* object.c (rb_class_search_ancestor): return ancestor class or
  iclass if inherited.

* object.c (rb_obj_is_kind_of, rb_class_inherited_p): share
  function to search the ancestor.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
proc.c: use already included ancestor iclass

* proc.c (umethod_bind): use the ancestor iclass instead of new
  iclass to get rid of infinite recursion, if the defined module
  is already included.  [ruby-core:62014] [Bug #9721]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* addr2line.c (main_exe_path): support FreeBSD.
  At least sh, csh, tcsh, bash, and zsh sets realpath of the main
  executable for dladdr, but gdb doesn't.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* addr2line.c (fill_lines): get base addrs in fill_lines to use it
  with dladdr_fbases introduced at r45563.
  it didn't get before if the executalbe is not pie.

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