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

38834 Коммитов

Автор SHA1 Сообщение Дата
ko1 5922c95461 * gc.c: fix memory leak by prepend method.
It is easy to reproduce with such script:
    module M; def bar; end; end
    loop{
      Class.new do
        def foo; end
        prepend M
      end
    }
* gc.c (obj_free): free T_ICLASS::m_tbl if it is created by prepend.
  To recognize it, check RICLASS_IS_ORIGIN flag.
* gc.c (gc_mark_children): T_ICLASS objects only need to mark
  T_ICLASS::m_tbl if RICLASS_IS_ORIGIN is set.
* gc.c (obj_memsize_of): count T_ICLASS if RICLASS_IS_ORIGIN is set.
* internal.h (RCLASS_SET_ORIGIN): add to set RCLASS_SET_ORIGIN.
  TODO: The word `origin' seems not good name. We need to invent
  another good name.
* class.c: use RCLASS_SET_ORIGIN().
* class.c (class_alloc): zero clear rb_classext_t.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-11 09:15:20 +00:00
nobu 5a62fdee4d vm_dump.c: check procstat_getvmmap
* configure.in: check also procstat_getvmmap, which is not
  available on FreeBSD 9.  [ruby-core:68468] [Bug #10954]
* vm_dump.c (procstat_vm): use kinfo_getvmmap instead if
  procstat_getvmmap is not available.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-11 04:28:51 +00:00
nobu 84b5bb9802 normalize.rb: remove redundant hash
* lib/unicode_normalize/normalize.rb (UnicodeNormalize): REGEXP_K
  matches only single chars which are keys of KOMPATIBLE_TABLE, so
  string in nfkd_one is always single char and one of the key of
  KOMPATIBLE_TABLE, that is that the default proc of NF_HASH_K only
  copies a pair in KOMPATIBLE_TABLE.  therefore NF_HASH_K is a
  part of KOMPATIBLE_TABLE always, and just redundant.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-11 03:56:44 +00:00
ko1 97e21517a3 * internal.h: define struct MEMO.
* enum.c: use MEMO.
* enumerator.c: ditto.
* load.c: ditto.
* node.h: return (struct MEMO *) pointer.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-11 00:20:45 +00:00
ko1 9f21759c53 * vm_insnhelper.h (THROW_DATA_STATE): return int, not VALUE.
* vm_insnhelper.h (THROW_DATA_STATE_SET): accept int value.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-10 21:28:09 +00:00
ko1 a74fe7546d * vm_eval.c (rb_catch_protect): use THROW_DATA_VAL().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-10 20:07:47 +00:00
ko1 b8fa8865ee * vm_insnhelper.h: define struct IFUNC.
* vm_eval.c (rb_iterate): use it.
* vm_insnhelper.c (vm_yield_with_cfunc): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-10 19:57:30 +00:00
svn e512180a98 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-10 18:53:34 +00:00
ko1 e2c5094698 * eval_intern.h (THROW_DATA_P): use RB_TYPE_P() instead of
BUILTIN_TYPE().
* thread.c (thread_join): use THROW_DATA_P().



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-10 18:53:28 +00:00
ko1 ed130faf28 * proc.c: use RUBY_VM_IFUNC_P() to recognize IFUNC or not.
* vm.c: ditto.
* vm_dump.c: ditto.
* vm_insnhelper.c: ditto.
* vm_core.h: use RB_TYPE_P() instead of BUILTIN_TYPE().



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-10 18:50:15 +00:00
ko1 46cdb8f187 * vm_insnhelper.h: define struct THROW_DATA to represent
throwing data. Also define accessor functions.
* eval_intern.h: move related changes into vm_insnhelper.h.
  Now these MACROs (functions) are only used in vm*.c.
  There is only THROW_DATA_P(err) to check this data type or not.
* vm.c: catch up these changes.
* vm_eval.c: ditto.
* vm_insnhelper.c: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-10 18:39:46 +00:00
svn 9d937bb086 * 2015-03-11
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-10 16:02:22 +00:00
odaira d4a1804eb1 * test/rubygems/test_gem_security_trust_dir.rb: The return value of
File::Stat#mode is OS dependent. In AIX, 0200000 is set.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-10 16:01:57 +00:00
ktsj f436de8f31 * enum.c (enum_slice_when): [DOC] fix typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-10 14:18:20 +00:00
akr ab0a64e1c8 * lib/webrick/server.rb: Invoke setup_shutdown_pipe in start method
instead of listen method.
  [ruby-core:68476] [Bug #10956] Reported by Shintaro Kojima.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-10 11:05:21 +00:00
nobu acc17bfc0f test_math.rb: to_f tests
* test/ruby/test_math.rb (test_{fixnum,bignum,rational}_to_f):
  refine to_f tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-10 11:01:55 +00:00
ko1 04e348e61a * thread.c (thread_join): Fixnum (except TAG_FATAL) and
NODE should not be reached here.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-10 08:28:22 +00:00
svn ab38e5b585 * 2015-03-10
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-10 04:53:57 +00:00
nobu 3f6fb5f72a math.c: fix tgamma on mingw
* math.c (mingw_tgamma): tgamma(3) on mingw returns a NaN for a
  big number, not infinity.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-10 04:53:46 +00:00
ko1 c5c5e96643 * vm_insnhelper.c (ep_cref): rename to lep_cref() because it should be
local ep.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-09 12:43:00 +00:00
nobu 2e02f2dfd2 stringio.c: don't raise after close
* ext/stringio/stringio.c (strio_close): don't raise on dobule
  close for consistent to IO#close.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-09 07:34:39 +00:00
nobu 5c87e39165 suppress warnings
* test/ruby/beginmainend.rb: suppress warnings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-09 06:51:20 +00:00
nobu f8a82e1583 complex.c: suppress warnings on FreeBSD
* complex.c (safe_mul): get rid of assignments in a macro.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-09 05:48:09 +00:00
nobu 34beb98464 test_beginendblock.rb: assert_in_out_err
* test/ruby/test_beginendblock.rb (TestBeginEndBlock): simplify
  with assert_in_out_err.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-09 05:47:05 +00:00
nobu dbbccb3cff io.c: duplicate code
* io.c (rb_io_close_m): remove duplicate check.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-09 04:57:51 +00:00
nobu 140d7fd95d proc.c, vm.c: fix implicit conversions
* proc.c (rb_mod_define_method): fix implicit conversion of
  visibility type. erred by -Werror=shorten-64-to-32.

* vm.c (vm_define_method): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-08 23:20:13 +00:00
ko1 5856347f16 * vm_insnhelper.h: define struct SVAR for SVAR.
This data type is also same layout of NODE (NODE_IF).
* vm_insnhelper.c: catch up this change.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-08 21:53:05 +00:00
ko1 2262aba6a2 * vm_insnhelper.c (lep_svar_set): add WBs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-08 21:44:00 +00:00
ko1 8dced4d2c0 * internal.h: define rb_cref_t and change to use it.
rb_cref_t is data type of CREF. Now, the body is still NODE.
  It is easy to understand what is CREF and what is pure NODE.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-08 21:22:43 +00:00
ko1 2324c14d00 * vm_insnhelper.h (COPY_CREF_OMOD): fix translation miss.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-08 21:01:31 +00:00
svn 720efd6947 * 2015-03-09
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-08 19:50:50 +00:00
ko1 ae166317a4 * internal.h: define CREF accessor macros.
* CREF_CLASS(cref)
  * CREF_NEXT(cref)
  * CREF_VISI(cref)
  * CREF_VISI_SET(cref, v)
  * CREF_REFINEMENTS(cref)
  * CREF_PUSHED_BY_EVAL(cref)
  * CREF_PUSHED_BY_EVAL_SET(cref)
  * CREF_OMOD_SHARED(cref)
  * CREF_OMOD_SHARED_SET(cref)
  * CREF_OMOD_SHARED_UNSET(cref)
  This is process to change CREF data type from NODE.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-08 19:50:37 +00:00
akr b6d5ce7975 * ext/zlib/zlib.c (rb_gzfile_close): Don't raise on double
close for consistent to IO#close.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-08 13:52:51 +00:00
nobu 5b06e83345 dir.c: glob short names
* dir.c (glob_helper): match patterns against legacy short names
  too, not only ordinary names.  [ruby-core:67954] [Bug #10819]
* win32/dir.h (struct direct): add short name members.
* win32/win32.c (opendir_internal, readdir_internal): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-08 07:57:38 +00:00
nobu db24cb705d miniinit.c: minimum built-in encodings in miniruby
* common.mk (MINIOBJS): no longer need dmyenc.o.

* miniinit.c (Init_enc): declare minimum built-in encodings so
  that these Encoding constants will be available in miniruby.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-08 06:30:32 +00:00
nobu 53662a711f test_extlibs.rb: skip excluded libraries
* test/ruby/test_extlibs.rb (TestExtLibs.check_existence): ignore
  tests for explicitly excluded libraries.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-08 03:08:37 +00:00
nobu 65f2103b46 Makefile.sub: RUBY_PROGRAM_VERSION
* win32/Makefile.sub (config.status): now RUBY_PROGRAM_VERSION is
  necessary for fake.rb.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-08 02:25:26 +00:00
svn 9a2e375704 * 2015-03-08
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-08 02:19:21 +00:00
nobu 2403aa9867 GNUmakefile.in: fix dependency
* cygwin/GNUmakefile.in: fix dependency, win32.o should be under
  win32 directory.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-08 02:19:04 +00:00
nobu 9833ae93cf make-snapshot: follow previous commits
* tool/make-snapshot (package): set @ruby_version@ and
  BOOTSTRAPRUBY.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-07 11:54:58 +00:00
nobu 0581320a59 fake.rb.in: RUBY_PATCHLEVEL
* template/fake.rb.in: add RUBY_PATCHLEVEL and include it in
  RUBY_DESCRIPTION.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-07 02:06:28 +00:00
nobu cdcae92de9 common.mk: same fake.rb
* common.mk (fake.rb): generate from same template on all
  platforms including win32.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-07 02:06:24 +00:00
nobu aa68fd85b9 expand-config.rb: without fake.rb
* win32/Makefile.sub (ruby_pc): without fake.rb.

* tool/expand-config.rb: no longer depends on fake.rb.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-07 02:06:18 +00:00
nobu 6268830ba8 mkconfig.rb: without fake.rb
* tool/mkconfig.rb: use arguments instead of built-in constants
  to work without fake.rb.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-07 02:06:11 +00:00
nobu e9f3a59e85 configure.in: BOOTSTRAPRUBY
* configure.in (BOOTSTRAPRUBY): baseruby if cross compiling or
  miniruby, anyway runnable ruby command.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-07 02:06:06 +00:00
nobu dd939a3886 ruby-additional.el: monkey-patching ruby-mode.el
* misc/ruby-additional.el: monkey-patch ruby-mode.el in Emacs 24,
  to fix regexp parsing as r49872.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-07 01:59:32 +00:00
hsbt 05d1196203 * array.c: document that first element is kept when using
Array#uniq and #uniq! [fix GH-845][ci skip]
  Patch by @riffraff

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-07 00:36:09 +00:00
hsbt 6271eea522 * thread.c: Mutex#owned? is no longer experimental since 2.1.0
[fix GH-839][ci skip] Patch by @takiy33

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-07 00:28:06 +00:00
svn 1c8a6c685f * 2015-03-07
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-07 00:18:57 +00:00
hsbt fe46bec769 * tool/merger.rb: Added documentation to version method.
[fix GH-847][ci skip] Patch by @magikid

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-07 00:18:46 +00:00