summaryrefslogtreecommitdiff
path: root/doc/NEWS-2.5.0
diff options
context:
space:
mode:
Diffstat (limited to 'doc/NEWS-2.5.0')
0 files changed, 0 insertions, 0 deletions
--.gdbinit140
-rw-r--r--.gitattributes5
-rw-r--r--.gitignore48
-rw-r--r--.travis.yml39
-rw-r--r--CONTRIBUTING.md4
-rw-r--r--ChangeLog22601
-rw-r--r--KNOWNBUGS.rb6
-rw-r--r--LEGAL123
-rw-r--r--Makefile.in194
-rw-r--r--NEWS614
-rw-r--r--README166
-rw-r--r--README.EXT1599
-rw-r--r--README.EXT.ja1651
-rw-r--r--README.ja192
-rw-r--r--README.ja.md171
-rw-r--r--README.md164
-rw-r--r--aclocal.m446
-rw-r--r--addr2line.c426
-rw-r--r--addr2line.h2
-rw-r--r--array.c821
-rw-r--r--benchmark/bm_app_aobench.rb7
-rw-r--r--benchmark/bm_app_lc_fizzbuzz.rb52
-rw-r--r--benchmark/bm_array_shift.rb14
-rw-r--r--benchmark/bm_hash_aref_dsym.rb4
-rw-r--r--benchmark/bm_hash_aref_dsym_long.rb21
-rw-r--r--benchmark/bm_hash_aref_fix.rb4
-rw-r--r--benchmark/bm_hash_aref_flo.rb4
-rw-r--r--benchmark/bm_hash_aref_miss.rb5
-rw-r--r--benchmark/bm_hash_aref_str.rb4
-rw-r--r--benchmark/bm_hash_aref_sym.rb9
-rw-r--r--benchmark/bm_hash_aref_sym_long.rb13
-rw-r--r--benchmark/bm_hash_ident_flo.rb4
-rw-r--r--benchmark/bm_hash_ident_num.rb4
-rw-r--r--benchmark/bm_hash_ident_obj.rb4
-rw-r--r--benchmark/bm_hash_ident_str.rb4
-rw-r--r--benchmark/bm_hash_ident_sym.rb4
-rw-r--r--benchmark/bm_hash_shift_u16.rb10
-rw-r--r--benchmark/bm_hash_shift_u24.rb10
-rw-r--r--benchmark/bm_hash_shift_u32.rb10
-rw-r--r--benchmark/bm_hash_to_proc.rb9
-rw-r--r--benchmark/bm_io_nonblock_noex.rb22
-rw-r--r--benchmark/bm_io_nonblock_noex2.rb21
-rw-r--r--benchmark/bm_marshal_dump_flo.rb2
-rw-r--r--benchmark/bm_marshal_dump_load_geniv.rb10
-rw-r--r--benchmark/bm_marshal_dump_load_time.rb1
-rw-r--r--benchmark/bm_require.rb7
-rw-r--r--benchmark/bm_require_thread.rb15
-rw-r--r--benchmark/bm_securerandom.rb5
-rw-r--r--benchmark/bm_so_meteor_contest.rb14
-rw-r--r--benchmark/bm_vm1_gc_wb_ary.rb10
-rw-r--r--benchmark/bm_vm1_gc_wb_ary_promoted.rb14
-rw-r--r--benchmark/bm_vm1_gc_wb_obj.rb10
-rw-r--r--benchmark/bm_vm1_gc_wb_obj_promoted.rb17
-rw-r--r--benchmark/bm_vm2_case_lit.rb19
-rw-r--r--benchmark/bm_vm2_newlambda.rb5
-rw-r--r--benchmark/bm_vm2_string_literal.rb5
-rw-r--r--benchmark/bm_vm2_struct_big_aref_hi.rb7
-rw-r--r--benchmark/bm_vm2_struct_big_aref_lo.rb7
-rw-r--r--benchmark/bm_vm2_struct_big_aset.rb7
-rw-r--r--benchmark/bm_vm2_struct_big_href_hi.rb7
-rw-r--r--benchmark/bm_vm2_struct_big_href_lo.rb7
-rw-r--r--benchmark/bm_vm2_struct_big_hset.rb7
-rw-r--r--benchmark/bm_vm2_struct_small_aref.rb7
-rw-r--r--benchmark/bm_vm2_struct_small_aset.rb7
-rw-r--r--benchmark/bm_vm2_struct_small_href.rb7
-rw-r--r--benchmark/bm_vm2_struct_small_hset.rb7
-rw-r--r--[-rwxr-xr-x]benchmark/bm_vm3_gc.rb1
-rw-r--r--benchmark/bm_vm_symbol_block_pass.rb13
-rw-r--r--benchmark/bm_vm_thread_close.rb6
-rw-r--r--benchmark/bm_vm_thread_pipe.rb2
-rw-r--r--benchmark/driver.rb119
-rw-r--r--benchmark/prepare_require.rb25
-rw-r--r--benchmark/prepare_require_thread.rb2
-rw-r--r--benchmark/prepare_so_k_nucleotide.rb2
-rw-r--r--benchmark/prepare_so_reverse_complement.rb2
-rw-r--r--bignum.c705
-rwxr-xr-xbin/erb34
-rwxr-xr-xbin/rake33
-rwxr-xr-xbin/testrb3
-rwxr-xr-xbootstraptest/runner.rb58
-rw-r--r--bootstraptest/test_block.rb14
-rw-r--r--bootstraptest/test_fork.rb30
-rw-r--r--bootstraptest/test_io.rb14
-rw-r--r--bootstraptest/test_literal.rb2
-rw-r--r--bootstraptest/test_method.rb32
-rw-r--r--bootstraptest/test_string.rb3
-rw-r--r--bootstraptest/test_syntax.rb2
-rw-r--r--bootstraptest/test_thread.rb58
-rw-r--r--ccan/build_assert/build_assert.h40
-rw-r--r--ccan/check_type/check_type.h63
-rw-r--r--ccan/container_of/container_of.h142
-rw-r--r--ccan/licenses/BSD-MIT17
-rw-r--r--ccan/licenses/CC028
-rw-r--r--ccan/list/list.h773
-rw-r--r--ccan/str/str.h16
-rw-r--r--class.c592
-rw-r--r--common.mk2063
-rw-r--r--compar.c48
-rw-r--r--compile.c4566
-rw-r--r--complex.c266
-rw-r--r--configure.in1330
-rw-r--r--constant.h22
-rw-r--r--cont.c610
-rw-r--r--coverage/README17
-rw-r--r--cygwin/GNUmakefile.in16
-rw-r--r--debug.c56
-rw-r--r--defs/default_gems5
-rw-r--r--defs/gmake.mk63
-rw-r--r--defs/id.def73
-rw-r--r--defs/keywords6
-rw-r--r--defs/known_errors.def3
-rw-r--r--defs/lex.c.src6
-rw-r--r--defs/opt_operand.def2
-rw-r--r--dir.c741
-rw-r--r--dln.c161
-rw-r--r--dln_find.c21
-rw-r--r--dmyenc.c10
-rw-r--r--dmyext.c5
-rw-r--r--doc/ChangeLog-0.06_to_0.521147
-rw-r--r--doc/ChangeLog-0.50_to_0.60462
-rw-r--r--doc/ChangeLog-0.60_to_1.13955
-rw-r--r--doc/ChangeLog-1.8.06
-rw-r--r--doc/ChangeLog-1.9.338
-rw-r--r--doc/ChangeLog-2.1.018060
-rw-r--r--doc/ChangeLog-2.2.012157
-rw-r--r--doc/ChangeLog-YARV10
-rw-r--r--doc/NEWS-1.8.74
-rw-r--r--doc/NEWS-2.0.02
-rw-r--r--doc/NEWS-2.1.0376
-rw-r--r--doc/NEWS-2.2.0361
-rw-r--r--doc/contributing.rdoc45
-rw-r--r--doc/contributors.rdoc2
-rw-r--r--doc/dtrace_probes.rdoc10
-rw-r--r--doc/etc.rd.ja4
-rw-r--r--doc/extension.ja.rdoc1799
-rw-r--r--doc/extension.rdoc1828
-rw-r--r--doc/forwardable.rd.ja6
-rw-r--r--doc/globals.rdoc1
-rw-r--r--doc/irb/irb-tools.rd.ja10
-rw-r--r--doc/keywords.rdoc158
-rw-r--r--doc/maintainers.rdoc4
-rw-r--r--doc/pty/README.ja2
-rw-r--r--doc/regexp.rdoc16
-rw-r--r--doc/security.rdoc36
-rw-r--r--doc/shell.rd.ja8
-rw-r--r--doc/standard_library.rdoc12
-rw-r--r--doc/syntax/assignment.rdoc19
-rw-r--r--doc/syntax/calling_methods.rdoc27
-rw-r--r--doc/syntax/control_expressions.rdoc27
-rw-r--r--doc/syntax/exceptions.rdoc7
-rw-r--r--doc/syntax/literals.rdoc81
-rw-r--r--doc/syntax/methods.rdoc85
-rw-r--r--doc/syntax/miscellaneous.rdoc11
-rw-r--r--doc/syntax/modules_and_classes.rdoc5
-rw-r--r--doc/syntax/refinements.rdoc74
-rw-r--r--enc/Makefile.in6
-rw-r--r--enc/ascii.c6
-rw-r--r--enc/big5.c6
-rw-r--r--enc/depend462
-rw-r--r--enc/ebcdic.h11
-rw-r--r--enc/encdb.c9
-rw-r--r--enc/encinit.c.erb17
-rw-r--r--enc/euc_jp.c49
-rw-r--r--enc/iso_2022_jp.h2
-rw-r--r--enc/iso_8859_1.c12
-rw-r--r--enc/iso_8859_10.c4
-rw-r--r--enc/iso_8859_13.c8
-rw-r--r--enc/iso_8859_14.c4
-rw-r--r--enc/iso_8859_15.c4
-rw-r--r--enc/iso_8859_16.c4
-rw-r--r--enc/iso_8859_2.c12
-rw-r--r--enc/iso_8859_3.c4
-rw-r--r--enc/iso_8859_4.c5
-rw-r--r--enc/iso_8859_5.c4
-rw-r--r--enc/iso_8859_7.c4
-rw-r--r--enc/iso_8859_9.c4
-rw-r--r--enc/jis/props.h227
-rw-r--r--enc/jis/props.h.blt227
-rw-r--r--enc/jis/props.kwd52
-rw-r--r--enc/jis/props.src52
-rw-r--r--enc/koi8_r.c4
-rw-r--r--enc/koi8_u.c4
-rwxr-xr-xenc/make_encmake.rb25
-rw-r--r--enc/prelude.rb8
-rw-r--r--enc/shift_jis.c47
-rw-r--r--enc/trans/JIS/JISX0201-KANA%UCS.src51
-rw-r--r--enc/trans/JIS/JISX0208@1990%UCS.src54
-rw-r--r--enc/trans/JIS/JISX0212%UCS.src62
-rw-r--r--enc/trans/JIS/UCS%JISX0201-KANA.src52
-rw-r--r--enc/trans/JIS/UCS%JISX0208@1990.src53
-rw-r--r--enc/trans/JIS/UCS%JISX0212.src61
-rw-r--r--enc/trans/ebcdic.trans278
-rw-r--r--enc/trans/escape.trans6
-rw-r--r--enc/trans/euckr-tbl.rb2
-rw-r--r--enc/trans/gb18030.trans8
-rw-r--r--enc/unicode.c193
-rwxr-xr-xenc/unicode/case-folding.rb196
-rw-r--r--enc/unicode/casefold.h8460
-rw-r--r--enc/unicode/name2ctype.h11629
-rw-r--r--enc/unicode/name2ctype.h.blt9915
-rw-r--r--enc/us_ascii.c12
-rw-r--r--enc/utf_16_32.h2
-rw-r--r--enc/utf_16be.c6
-rw-r--r--enc/utf_16le.c6
-rw-r--r--enc/utf_32be.c18
-rw-r--r--enc/utf_32le.c18
-rw-r--r--enc/utf_7.h2
-rw-r--r--enc/utf_8.c31
-rw-r--r--enc/windows_1250.c220
-rw-r--r--enc/windows_1251.c4
-rw-r--r--enc/windows_1252.c211
-rw-r--r--encindex.h67
-rw-r--r--encoding.c275
-rw-r--r--enum.c1235
-rw-r--r--enumerator.c107
-rw-r--r--error.c607
-rw-r--r--eval.c461
-rw-r--r--eval_error.c110
-rw-r--r--eval_intern.h158
-rw-r--r--eval_jump.c13
-rw-r--r--ext/-test-/array/resize/extconf.rb1
-rw-r--r--ext/-test-/bignum/big2str.c1
-rw-r--r--ext/-test-/bignum/bigzero.c6
-rw-r--r--ext/-test-/bignum/depend107
-rw-r--r--ext/-test-/bignum/div.c1
-rw-r--r--ext/-test-/bignum/extconf.rb1
-rw-r--r--ext/-test-/bignum/intpack.c5
-rw-r--r--ext/-test-/bignum/mul.c5
-rw-r--r--ext/-test-/bignum/str2big.c1
-rw-r--r--ext/-test-/bug-3571/extconf.rb1
-rw-r--r--ext/-test-/bug-3662/extconf.rb1
-rw-r--r--ext/-test-/bug-5832/extconf.rb1
-rw-r--r--ext/-test-/bug_reporter/extconf.rb1
-rw-r--r--ext/-test-/class/extconf.rb1
-rw-r--r--ext/-test-/debug/depend35
-rw-r--r--ext/-test-/debug/extconf.rb1
-rw-r--r--ext/-test-/dln/empty/empty.c4
-rw-r--r--ext/-test-/dln/empty/extconf.rb2
-rw-r--r--ext/-test-/exception/depend46
-rw-r--r--ext/-test-/exception/extconf.rb1
-rw-r--r--ext/-test-/fatal/extconf.rb1
-rw-r--r--ext/-test-/file/depend38
-rw-r--r--ext/-test-/file/extconf.rb16
-rw-r--r--ext/-test-/file/fs.c108
-rw-r--r--ext/-test-/float/depend3
-rw-r--r--ext/-test-/float/extconf.rb8
-rw-r--r--ext/-test-/float/init.c11
-rw-r--r--ext/-test-/float/nextafter.c36
-rw-r--r--ext/-test-/funcall/extconf.rb1
-rw-r--r--ext/-test-/gvl/call_without_gvl/call_without_gvl.c34
-rw-r--r--ext/-test-/gvl/call_without_gvl/extconf.rb2
-rw-r--r--ext/-test-/hash/delete.c16
-rw-r--r--ext/-test-/hash/extconf.rb8
-rw-r--r--ext/-test-/hash/init.c11
-rw-r--r--ext/-test-/iseq_load/extconf.rb2
-rw-r--r--ext/-test-/iseq_load/iseq_load.c21
-rw-r--r--ext/-test-/iter/extconf.rb1
-rw-r--r--ext/-test-/load/dot.dot/extconf.rb1
-rw-r--r--ext/-test-/marshal/compat/extconf.rb1
-rw-r--r--ext/-test-/marshal/internal_ivar/extconf.rb2
-rw-r--r--ext/-test-/marshal/internal_ivar/internal_ivar.c39
-rw-r--r--ext/-test-/marshal/usr/extconf.rb1
-rw-r--r--ext/-test-/marshal/usr/usrmarshal.c21
-rw-r--r--ext/-test-/method/extconf.rb1
-rw-r--r--ext/-test-/notimplement/bug.c (renamed from ext/-test-/bug-3662/bug.c)2
-rw-r--r--ext/-test-/notimplement/extconf.rb2
-rw-r--r--ext/-test-/num2int/extconf.rb1
-rw-r--r--ext/-test-/old_thread_select/depend4
-rw-r--r--ext/-test-/old_thread_select/extconf.rb4
-rw-r--r--ext/-test-/old_thread_select/old_thread_select.c75
-rw-r--r--ext/-test-/path_to_class/extconf.rb1
-rw-r--r--ext/-test-/popen_deadlock/extconf.rb5
-rw-r--r--ext/-test-/popen_deadlock/infinite_loop_dlsym.c50
-rw-r--r--ext/-test-/postponed_job/extconf.rb1
-rw-r--r--ext/-test-/printf/extconf.rb1
-rw-r--r--ext/-test-/printf/printf.c37
-rw-r--r--ext/-test-/proc/extconf.rb8
-rw-r--r--ext/-test-/proc/init.c11
-rw-r--r--ext/-test-/proc/receiver.c21
-rw-r--r--ext/-test-/proc/super.c27
-rw-r--r--ext/-test-/rational/depend17
-rw-r--r--ext/-test-/rational/extconf.rb1
-rw-r--r--ext/-test-/rational/rat.c1
-rw-r--r--ext/-test-/recursion/extconf.rb1
-rw-r--r--ext/-test-/st/foreach/extconf.rb2
-rw-r--r--ext/-test-/st/foreach/foreach.c175
-rw-r--r--ext/-test-/st/numhash/extconf.rb1
-rw-r--r--ext/-test-/st/numhash/numhash.c34
-rw-r--r--ext/-test-/st/update/extconf.rb1
-rw-r--r--ext/-test-/string/coderange.c21
-rw-r--r--ext/-test-/string/cstr.c105
-rw-r--r--ext/-test-/string/depend118
-rw-r--r--ext/-test-/string/enc_associate.c8
-rw-r--r--ext/-test-/string/extconf.rb3
-rw-r--r--ext/-test-/string/fstring.c15
-rw-r--r--ext/-test-/string/nofree.c13
-rw-r--r--ext/-test-/string/normalize.c1
-rw-r--r--ext/-test-/struct/duplicate.c24
-rw-r--r--ext/-test-/struct/extconf.rb8
-rw-r--r--ext/-test-/struct/init.c11
-rw-r--r--ext/-test-/struct/member.c18
-rw-r--r--ext/-test-/symbol/extconf.rb2
-rw-r--r--ext/-test-/symbol/init.c14
-rw-r--r--ext/-test-/symbol/intern.c14
-rw-r--r--ext/-test-/symbol/type.c30
-rw-r--r--ext/-test-/thread_fd_close/depend14
-rw-r--r--ext/-test-/thread_fd_close/extconf.rb2
-rw-r--r--ext/-test-/thread_fd_close/thread_fd_close.c14
-rw-r--r--ext/-test-/time/extconf.rb8
-rw-r--r--ext/-test-/time/init.c11
-rw-r--r--ext/-test-/time/new.c34
-rw-r--r--ext/-test-/tracepoint/depend23
-rw-r--r--ext/-test-/tracepoint/extconf.rb1
-rw-r--r--ext/-test-/typeddata/extconf.rb1
-rw-r--r--ext/-test-/typeddata/typeddata.c24
-rw-r--r--ext/-test-/vm/at_exit.c44
-rw-r--r--ext/-test-/vm/extconf.rb1
-rw-r--r--ext/-test-/wait_for_single_fd/depend18
-rw-r--r--ext/-test-/wait_for_single_fd/extconf.rb1
-rw-r--r--ext/-test-/win32/console/attribute.c56
-rw-r--r--ext/-test-/win32/console/depend1
-rw-r--r--ext/-test-/win32/console/extconf.rb9
-rw-r--r--ext/-test-/win32/console/init.c11
-rw-r--r--ext/-test-/win32/dln/depend9
-rw-r--r--ext/-test-/win32/dln/extconf.rb40
-rw-r--r--ext/-test-/win32/dln/libdlntest.c2
-rw-r--r--ext/-test-/win32/fd_setsize/depend3
-rw-r--r--ext/-test-/win32/fd_setsize/extconf.rb1
-rw-r--r--ext/.document4
-rw-r--r--ext/Setup23
-rw-r--r--ext/Setup.atheos2
-rw-r--r--ext/Setup.emx32
-rw-r--r--ext/Setup.nacl6
-rw-r--r--ext/Setup.nt2
-rw-r--r--ext/bigdecimal/README60
-rw-r--r--ext/bigdecimal/bigdecimal.c451
-rw-r--r--ext/bigdecimal/bigdecimal.gemspec6
-rw-r--r--ext/bigdecimal/bigdecimal.h33
-rw-r--r--ext/bigdecimal/depend14
-rw-r--r--ext/bigdecimal/extconf.rb5
-rw-r--r--ext/bigdecimal/lib/bigdecimal/jacobian.rb3
-rw-r--r--ext/bigdecimal/lib/bigdecimal/ludcmp.rb1
-rw-r--r--ext/bigdecimal/lib/bigdecimal/math.rb17
-rw-r--r--ext/bigdecimal/lib/bigdecimal/newton.rb1
-rw-r--r--ext/bigdecimal/lib/bigdecimal/util.rb1
-rw-r--r--ext/bigdecimal/sample/linear.rb21
-rw-r--r--ext/bigdecimal/sample/nlsolve.rb22
-rw-r--r--ext/bigdecimal/sample/pi.rb1
-rw-r--r--ext/cgi/escape/escape.c105
-rw-r--r--ext/cgi/escape/extconf.rb3
-rw-r--r--ext/continuation/continuation.c5
-rw-r--r--ext/continuation/extconf.rb1
-rw-r--r--ext/coverage/coverage.c42
-rw-r--r--ext/coverage/depend32
-rw-r--r--ext/coverage/extconf.rb1
-rw-r--r--ext/date/date_core.c515
-rw-r--r--ext/date/date_parse.c34
-rw-r--r--ext/date/date_strftime.c9
-rw-r--r--ext/date/date_strptime.c14
-rw-r--r--ext/date/depend58
-rw-r--r--ext/date/extconf.rb2
-rw-r--r--ext/date/lib/date.rb18
-rw-r--r--ext/date/lib/date/format.rb1
-rw-r--r--ext/dbm/dbm.c61
-rw-r--r--ext/dbm/extconf.rb18
-rw-r--r--ext/digest/bubblebabble/bubblebabble.c4
-rw-r--r--ext/digest/bubblebabble/depend14
-rw-r--r--ext/digest/bubblebabble/extconf.rb2
-rw-r--r--ext/digest/depend14
-rw-r--r--ext/digest/digest.c48
-rw-r--r--ext/digest/digest.h25
-rw-r--r--ext/digest/digest_conf.rb30
-rw-r--r--ext/digest/extconf.rb1
-rw-r--r--ext/digest/lib/digest.rb25
-rw-r--r--ext/digest/lib/digest/hmac.rb302
-rw-r--r--ext/digest/md5/depend17
-rw-r--r--ext/digest/md5/extconf.rb15
-rw-r--r--ext/digest/md5/md5.c10
-rw-r--r--ext/digest/md5/md5.h6
-rw-r--r--ext/digest/md5/md5cc.h12
-rw-r--r--ext/digest/md5/md5init.c15
-rw-r--r--ext/digest/md5/md5ossl.c9
-rw-r--r--ext/digest/md5/md5ossl.h4
-rw-r--r--ext/digest/rmd160/depend29
-rw-r--r--ext/digest/rmd160/extconf.rb14
-rw-r--r--ext/digest/rmd160/rmd160.c6
-rw-r--r--ext/digest/rmd160/rmd160.h6
-rw-r--r--ext/digest/rmd160/rmd160init.c13
-rw-r--r--ext/digest/rmd160/rmd160ossl.c8
-rw-r--r--ext/digest/rmd160/rmd160ossl.h3
-rw-r--r--ext/digest/sha1/depend29
-rw-r--r--ext/digest/sha1/extconf.rb14
-rw-r--r--ext/digest/sha1/sha1.c6
-rw-r--r--ext/digest/sha1/sha1.h6
-rw-r--r--ext/digest/sha1/sha1cc.h14
-rw-r--r--ext/digest/sha1/sha1init.c15
-rw-r--r--ext/digest/sha1/sha1ossl.c10
-rw-r--r--ext/digest/sha1/sha1ossl.h4
-rw-r--r--ext/digest/sha2/depend29
-rw-r--r--ext/digest/sha2/extconf.rb20
-rw-r--r--ext/digest/sha2/lib/sha2.rb1
-rw-r--r--ext/digest/sha2/sha2.c28
-rw-r--r--ext/digest/sha2/sha2.h30
-rw-r--r--ext/digest/sha2/sha2cc.h31
-rw-r--r--ext/digest/sha2/sha2init.c13
-rw-r--r--ext/digest/sha2/sha2ossl.c13
-rw-r--r--ext/digest/sha2/sha2ossl.h16
-rw-r--r--ext/dl/callback/depend15
-rw-r--r--ext/dl/callback/extconf.rb14
-rw-r--r--ext/dl/callback/mkcallback.rb242
-rw-r--r--ext/dl/cfunc.c677
-rw-r--r--ext/dl/cptr.c670
-rw-r--r--ext/dl/depend14
-rw-r--r--ext/dl/dl.c569
-rw-r--r--ext/dl/dl.h217
-rw-r--r--ext/dl/extconf.rb43
-rw-r--r--ext/dl/handle.c431
-rw-r--r--ext/dl/lib/dl.rb15
-rw-r--r--ext/dl/lib/dl/callback.rb112
-rw-r--r--ext/dl/lib/dl/cparser.rb156
-rw-r--r--ext/dl/lib/dl/func.rb251
-rw-r--r--ext/dl/lib/dl/import.rb268
-rw-r--r--ext/dl/lib/dl/pack.rb128
-rw-r--r--ext/dl/lib/dl/stack.rb116
-rw-r--r--ext/dl/lib/dl/struct.rb236
-rw-r--r--ext/dl/lib/dl/types.rb71
-rw-r--r--ext/dl/lib/dl/value.rb114
-rw-r--r--ext/etc/depend8
-rw-r--r--ext/etc/etc.c416
-rw-r--r--ext/etc/extconf.rb60
-rw-r--r--ext/etc/mkconstants.rb332
-rwxr-xr-xext/extmk.rb122
-rw-r--r--ext/fcntl/extconf.rb1
-rw-r--r--ext/fcntl/fcntl.c2
-rw-r--r--ext/fiber/extconf.rb1
-rw-r--r--ext/fiddle/closure.c98
-rw-r--r--ext/fiddle/closure.h2
-rw-r--r--ext/fiddle/conversions.h4
-rw-r--r--ext/fiddle/depend55
-rw-r--r--ext/fiddle/extconf.rb149
-rw-r--r--ext/fiddle/extlibs2
-rw-r--r--ext/fiddle/fiddle.c4
-rw-r--r--ext/fiddle/fiddle.h5
-rw-r--r--ext/fiddle/function.c147
-rw-r--r--ext/fiddle/function.h2
-rw-r--r--ext/fiddle/handle.c25
-rw-r--r--ext/fiddle/lib/fiddle.rb1
-rw-r--r--ext/fiddle/lib/fiddle/closure.rb1
-rw-r--r--ext/fiddle/lib/fiddle/cparser.rb158
-rw-r--r--ext/fiddle/lib/fiddle/function.rb1
-rw-r--r--ext/fiddle/lib/fiddle/import.rb5
-rw-r--r--ext/fiddle/lib/fiddle/pack.rb1
-rw-r--r--ext/fiddle/lib/fiddle/struct.rb1
-rw-r--r--ext/fiddle/lib/fiddle/types.rb1
-rw-r--r--ext/fiddle/lib/fiddle/value.rb1
-rw-r--r--ext/fiddle/pointer.c13
-rwxr-xr-xext/fiddle/win32/fficonfig.h29
-rw-r--r--ext/fiddle/win32/libffi-3.2.1-mswin.patch191
-rwxr-xr-xext/fiddle/win32/libffi-config.rb48
-rwxr-xr-xext/fiddle/win32/libffi.mk.tmpl96
-rw-r--r--ext/gdbm/extconf.rb12
-rw-r--r--ext/gdbm/gdbm.c51
-rwxr-xr-xext/io/console/buildgem.sh5
-rw-r--r--ext/io/console/console.c345
-rw-r--r--ext/io/console/depend21
-rw-r--r--ext/io/console/extconf.rb23
-rw-r--r--ext/io/console/io-console.gemspec8
-rw-r--r--ext/io/console/lib/console/size.rb1
-rw-r--r--ext/io/console/win32_vk.chksum1
-rw-r--r--ext/io/console/win32_vk.inc1400
-rw-r--r--ext/io/console/win32_vk.list166
-rw-r--r--ext/io/nonblock/extconf.rb1
-rw-r--r--ext/io/nonblock/nonblock.c15
-rw-r--r--ext/io/wait/extconf.rb1
-rw-r--r--ext/io/wait/wait.c94
-rw-r--r--ext/json/extconf.rb1
-rw-r--r--ext/json/fbuffer/fbuffer.h11
-rw-r--r--ext/json/generator/depend19
-rw-r--r--ext/json/generator/extconf.rb1
-rw-r--r--ext/json/generator/generator.c84
-rw-r--r--ext/json/generator/generator.h29
-rw-r--r--ext/json/json.gemspec7
-rw-r--r--ext/json/lib/json.rb1
-rw-r--r--ext/json/lib/json/add/bigdecimal.rb1
-rw-r--r--ext/json/lib/json/add/complex.rb7
-rw-r--r--ext/json/lib/json/add/core.rb1
-rw-r--r--ext/json/lib/json/add/date.rb2
-rw-r--r--ext/json/lib/json/add/date_time.rb2
-rw-r--r--ext/json/lib/json/add/exception.rb2
-rw-r--r--ext/json/lib/json/add/ostruct.rb2
-rw-r--r--ext/json/lib/json/add/range.rb2
-rw-r--r--ext/json/lib/json/add/rational.rb6
-rw-r--r--ext/json/lib/json/add/regexp.rb2
-rw-r--r--ext/json/lib/json/add/struct.rb2
-rw-r--r--ext/json/lib/json/add/symbol.rb2
-rw-r--r--ext/json/lib/json/add/time.rb4
-rw-r--r--ext/json/lib/json/common.rb9
-rw-r--r--ext/json/lib/json/ext.rb1
-rw-r--r--ext/json/lib/json/generic_object.rb9
-rw-r--r--ext/json/lib/json/version.rb3
-rw-r--r--ext/json/parser/depend18
-rw-r--r--ext/json/parser/extconf.rb3
-rw-r--r--ext/json/parser/parser.c360
-rw-r--r--ext/json/parser/parser.h23
-rw-r--r--ext/json/parser/parser.rl132
-rw-r--r--ext/json/parser/prereq.mk3
-rw-r--r--ext/mathn/complex/extconf.rb1
-rw-r--r--ext/mathn/rational/extconf.rb1
-rw-r--r--ext/nkf/depend28
-rw-r--r--ext/nkf/extconf.rb1
-rw-r--r--ext/nkf/lib/kconv.rb1
-rw-r--r--ext/nkf/nkf-utf8/nkf.c37
-rw-r--r--ext/nkf/nkf-utf8/utf8tbl.c2
-rw-r--r--ext/nkf/nkf-utf8/utf8tbl.h2
-rw-r--r--ext/nkf/nkf.c2
-rw-r--r--ext/objspace/depend80
-rw-r--r--ext/objspace/extconf.rb2
-rw-r--r--ext/objspace/object_tracing.c8
-rw-r--r--ext/objspace/objspace.c295
-rw-r--r--ext/objspace/objspace_dump.c90
-rw-r--r--ext/openssl/depend1097
-rw-r--r--ext/openssl/deprecation.rb1
-rw-r--r--ext/openssl/extconf.rb15
-rw-r--r--ext/openssl/lib/openssl.rb9
-rw-r--r--ext/openssl/lib/openssl/bn.rb17
-rw-r--r--ext/openssl/lib/openssl/buffering.rb10
-rw-r--r--ext/openssl/lib/openssl/cipher.rb10
-rw-r--r--ext/openssl/lib/openssl/config.rb3
-rw-r--r--ext/openssl/lib/openssl/digest.rb11
-rw-r--r--ext/openssl/lib/openssl/pkey.rb37
-rw-r--r--ext/openssl/lib/openssl/ssl.rb270
-rw-r--r--ext/openssl/lib/openssl/x509.rb32
-rw-r--r--ext/openssl/openssl_missing.c18
-rw-r--r--ext/openssl/openssl_missing.h13
-rw-r--r--ext/openssl/ossl.c69
-rw-r--r--ext/openssl/ossl.h16
-rw-r--r--ext/openssl/ossl_asn1.c53
-rw-r--r--ext/openssl/ossl_asn1.h3
-rw-r--r--ext/openssl/ossl_bio.c8
-rw-r--r--ext/openssl/ossl_bio.h4
-rw-r--r--ext/openssl/ossl_bn.c448
-rw-r--r--ext/openssl/ossl_bn.h4
-rw-r--r--ext/openssl/ossl_cipher.c110
-rw-r--r--ext/openssl/ossl_cipher.h4
-rw-r--r--ext/openssl/ossl_config.c18
-rw-r--r--ext/openssl/ossl_config.h5
-rw-r--r--ext/openssl/ossl_digest.c31
-rw-r--r--ext/openssl/ossl_digest.h4
-rw-r--r--ext/openssl/ossl_engine.c55
-rw-r--r--ext/openssl/ossl_engine.h3
-rw-r--r--ext/openssl/ossl_hmac.c23
-rw-r--r--ext/openssl/ossl_hmac.h3
-rw-r--r--ext/openssl/ossl_ns_spki.c32
-rw-r--r--ext/openssl/ossl_ns_spki.h4
-rw-r--r--ext/openssl/ossl_ocsp.c639
-rw-r--r--ext/openssl/ossl_ocsp.h3
-rw-r--r--ext/openssl/ossl_pkcs12.c40
-rw-r--r--ext/openssl/ossl_pkcs12.h4
-rw-r--r--ext/openssl/ossl_pkcs5.c3
-rw-r--r--ext/openssl/ossl_pkcs7.c123
-rw-r--r--ext/openssl/ossl_pkcs7.h4
-rw-r--r--ext/openssl/ossl_pkey.c34
-rw-r--r--ext/openssl/ossl_pkey.h14
-rw-r--r--ext/openssl/ossl_pkey_dh.c85
-rw-r--r--ext/openssl/ossl_pkey_dsa.c24
-rw-r--r--ext/openssl/ossl_pkey_ec.c74
-rw-r--r--ext/openssl/ossl_pkey_rsa.c32
-rw-r--r--ext/openssl/ossl_rand.c108
-rw-r--r--ext/openssl/ossl_rand.h4
-rw-r--r--ext/openssl/ossl_ssl.c712
-rw-r--r--ext/openssl/ossl_ssl.h14
-rw-r--r--ext/openssl/ossl_ssl_session.c37
-rw-r--r--ext/openssl/ossl_version.h3
-rw-r--r--ext/openssl/ossl_x509.c6
-rw-r--r--ext/openssl/ossl_x509.h5
-rw-r--r--ext/openssl/ossl_x509attr.c53
-rw-r--r--ext/openssl/ossl_x509cert.c82
-rw-r--r--ext/openssl/ossl_x509crl.c52
-rw-r--r--ext/openssl/ossl_x509ext.c112
-rw-r--r--ext/openssl/ossl_x509name.c38
-rw-r--r--ext/openssl/ossl_x509req.c44
-rw-r--r--ext/openssl/ossl_x509revoked.c44
-rw-r--r--ext/openssl/ossl_x509store.c73
-rw-r--r--ext/openssl/ruby_missing.h3
-rw-r--r--ext/pathname/extconf.rb2
-rw-r--r--ext/pathname/lib/pathname.rb50
-rw-r--r--ext/pathname/pathname.c23
-rw-r--r--ext/psych/extconf.rb1
-rw-r--r--ext/psych/lib/psych.rb34
-rw-r--r--ext/psych/lib/psych/class_loader.rb1
-rw-r--r--ext/psych/lib/psych/coder.rb1
-rw-r--r--ext/psych/lib/psych/core_ext.rb1
-rw-r--r--ext/psych/lib/psych/deprecated.rb1
-rw-r--r--ext/psych/lib/psych/exception.rb1
-rw-r--r--ext/psych/lib/psych/handler.rb1
-rw-r--r--ext/psych/lib/psych/handlers/document_stream.rb1
-rw-r--r--ext/psych/lib/psych/handlers/recorder.rb1
-rw-r--r--ext/psych/lib/psych/json/ruby_events.rb1
-rw-r--r--ext/psych/lib/psych/json/stream.rb1
-rw-r--r--ext/psych/lib/psych/json/tree_builder.rb1
-rw-r--r--ext/psych/lib/psych/json/yaml_events.rb1
-rw-r--r--ext/psych/lib/psych/nodes.rb1
-rw-r--r--ext/psych/lib/psych/nodes/alias.rb1
-rw-r--r--ext/psych/lib/psych/nodes/document.rb1
-rw-r--r--ext/psych/lib/psych/nodes/mapping.rb1
-rw-r--r--ext/psych/lib/psych/nodes/node.rb1
-rw-r--r--ext/psych/lib/psych/nodes/scalar.rb1
-rw-r--r--ext/psych/lib/psych/nodes/sequence.rb3
-rw-r--r--ext/psych/lib/psych/nodes/stream.rb1
-rw-r--r--ext/psych/lib/psych/omap.rb1
-rw-r--r--ext/psych/lib/psych/parser.rb1
-rw-r--r--ext/psych/lib/psych/scalar_scanner.rb3
-rw-r--r--ext/psych/lib/psych/set.rb1
-rw-r--r--ext/psych/lib/psych/stream.rb1
-rw-r--r--ext/psych/lib/psych/streaming.rb1
-rw-r--r--ext/psych/lib/psych/syntax_error.rb1
-rw-r--r--ext/psych/lib/psych/tree_builder.rb1
-rw-r--r--ext/psych/lib/psych/versions.rb4
-rw-r--r--ext/psych/lib/psych/visitors.rb1
-rw-r--r--ext/psych/lib/psych/visitors/depth_first.rb1
-rw-r--r--ext/psych/lib/psych/visitors/emitter.rb1
-rw-r--r--ext/psych/lib/psych/visitors/json_tree.rb1
-rw-r--r--ext/psych/lib/psych/visitors/to_ruby.rb52
-rw-r--r--ext/psych/lib/psych/visitors/visitor.rb1
-rw-r--r--ext/psych/lib/psych/visitors/yaml_tree.rb191
-rw-r--r--ext/psych/lib/psych/y.rb1
-rw-r--r--ext/psych/lib/psych_jars.rb6
-rw-r--r--ext/psych/psych.c2
-rw-r--r--ext/psych/psych.gemspec34
-rw-r--r--ext/psych/psych_emitter.c90
-rw-r--r--ext/psych/psych_emitter.h2
-rw-r--r--ext/psych/psych_parser.c28
-rw-r--r--ext/psych/psych_parser.h2
-rw-r--r--ext/psych/yaml/api.c57
-rw-r--r--ext/psych/yaml/config.h12
-rw-r--r--ext/psych/yaml/emitter.c16
-rw-r--r--ext/psych/yaml/loader.c25
-rw-r--r--ext/psych/yaml/parser.c12
-rw-r--r--ext/psych/yaml/scanner.c53
-rw-r--r--ext/psych/yaml/yaml_private.h4
-rw-r--r--ext/pty/depend23
-rw-r--r--ext/pty/extconf.rb1
-rw-r--r--ext/pty/lib/expect.rb1
-rw-r--r--ext/pty/pty.c36
-rw-r--r--ext/racc/cparse/cparse.c54
-rw-r--r--ext/racc/cparse/extconf.rb1
-rw-r--r--ext/rbconfig/sizeof/depend18
-rw-r--r--ext/rbconfig/sizeof/extconf.rb34
-rw-r--r--ext/readline/depend22
-rw-r--r--ext/readline/extconf.rb6
-rw-r--r--ext/readline/readline.c69
-rw-r--r--ext/ripper/depend45
-rw-r--r--ext/ripper/eventids2.c523
-rw-r--r--ext/ripper/extconf.rb1
-rw-r--r--ext/ripper/lib/ripper.rb1
-rw-r--r--ext/ripper/lib/ripper/core.rb22
-rw-r--r--ext/ripper/lib/ripper/filter.rb1
-rw-r--r--ext/ripper/lib/ripper/lexer.rb50
-rw-r--r--ext/ripper/lib/ripper/sexp.rb98
-rwxr-xr-xext/ripper/tools/generate-param-macros.rb1
-rwxr-xr-xext/ripper/tools/generate.rb34
-rwxr-xr-xext/ripper/tools/preproc.rb1
-rwxr-xr-xext/ripper/tools/strip.rb1
-rw-r--r--ext/sdbm/_sdbm.c17
-rw-r--r--ext/sdbm/depend21
-rw-r--r--ext/sdbm/extconf.rb1
-rw-r--r--ext/sdbm/init.c55
-rw-r--r--ext/socket/ancdata.c290
-rw-r--r--ext/socket/basicsocket.c113
-rw-r--r--ext/socket/constants.c2
-rw-r--r--ext/socket/depend312
-rw-r--r--ext/socket/extconf.rb93
-rw-r--r--ext/socket/getaddrinfo.c15
-rw-r--r--ext/socket/getnameinfo.c27
-rw-r--r--ext/socket/ifaddr.c28
-rw-r--r--ext/socket/init.c425
-rw-r--r--ext/socket/ipsocket.c42
-rw-r--r--ext/socket/lib/socket.rb524
-rw-r--r--ext/socket/mkconstants.rb60
-rw-r--r--ext/socket/option.c477
-rw-r--r--ext/socket/raddrinfo.c264
-rw-r--r--ext/socket/rubysocket.h96
-rw-r--r--ext/socket/socket.c538
-rw-r--r--ext/socket/sockport.h15
-rw-r--r--ext/socket/sockssocket.c3
-rw-r--r--ext/socket/tcpserver.c44
-rw-r--r--ext/socket/tcpsocket.c6
-rw-r--r--ext/socket/udpsocket.c190
-rw-r--r--ext/socket/unixserver.c43
-rw-r--r--ext/socket/unixsocket.c39
-rw-r--r--ext/stringio/extconf.rb1
-rw-r--r--ext/stringio/stringio.c196
-rw-r--r--ext/strscan/depend24
-rw-r--r--ext/strscan/extconf.rb1
-rw-r--r--ext/strscan/strscan.c62
-rw-r--r--ext/syslog/depend14
-rw-r--r--ext/syslog/extconf.rb1
-rw-r--r--ext/syslog/lib/syslog/logger.rb3
-rw-r--r--ext/syslog/syslog.c12
-rw-r--r--ext/thread/extconf.rb1
-rw-r--r--ext/thread/thread.c613
-rw-r--r--ext/tk/MANUAL_tcltklib.eng14
-rw-r--r--ext/tk/MANUAL_tcltklib.ja12
-rw-r--r--ext/tk/README.macosx-aqua2
-rw-r--r--ext/tk/README.tcltklib2
-rw-r--r--ext/tk/extconf.rb27
-rw-r--r--ext/tk/lib/README2
-rw-r--r--ext/tk/lib/multi-tk.rb35
-rw-r--r--ext/tk/lib/remote-tk.rb9
-rw-r--r--ext/tk/lib/tcltk.rb5
-rw-r--r--ext/tk/lib/tk.rb51
-rw-r--r--ext/tk/lib/tk/after.rb1
-rw-r--r--ext/tk/lib/tk/autoload.rb3
-rw-r--r--ext/tk/lib/tk/bgerror.rb1
-rw-r--r--ext/tk/lib/tk/bindtag.rb1
-rw-r--r--ext/tk/lib/tk/busy.rb1
-rw-r--r--ext/tk/lib/tk/button.rb1
-rw-r--r--ext/tk/lib/tk/canvas.rb1
-rw-r--r--ext/tk/lib/tk/canvastag.rb1
-rw-r--r--ext/tk/lib/tk/checkbutton.rb1
-rw-r--r--ext/tk/lib/tk/clipboard.rb1
-rw-r--r--ext/tk/lib/tk/clock.rb1
-rw-r--r--ext/tk/lib/tk/composite.rb1
-rw-r--r--ext/tk/lib/tk/console.rb1
-rw-r--r--ext/tk/lib/tk/dialog.rb1
-rw-r--r--ext/tk/lib/tk/encodedstr.rb1
-rw-r--r--ext/tk/lib/tk/entry.rb1
-rw-r--r--ext/tk/lib/tk/event.rb1
-rw-r--r--ext/tk/lib/tk/font.rb1
-rw-r--r--ext/tk/lib/tk/fontchooser.rb7
-rw-r--r--ext/tk/lib/tk/frame.rb1
-rw-r--r--ext/tk/lib/tk/grid.rb1
-rw-r--r--ext/tk/lib/tk/image.rb1
-rw-r--r--ext/tk/lib/tk/itemconfig.rb2
-rw-r--r--ext/tk/lib/tk/itemfont.rb1
-rw-r--r--ext/tk/lib/tk/kinput.rb1
-rw-r--r--ext/tk/lib/tk/label.rb1
-rw-r--r--ext/tk/lib/tk/labelframe.rb1
-rw-r--r--ext/tk/lib/tk/listbox.rb1
-rw-r--r--ext/tk/lib/tk/macpkg.rb1
-rw-r--r--ext/tk/lib/tk/menu.rb1
-rw-r--r--ext/tk/lib/tk/menubar.rb3
-rw-r--r--ext/tk/lib/tk/menuspec.rb1
-rw-r--r--ext/tk/lib/tk/message.rb1
-rw-r--r--ext/tk/lib/tk/mngfocus.rb1
-rw-r--r--ext/tk/lib/tk/msgcat.rb1
-rw-r--r--ext/tk/lib/tk/namespace.rb1
-rw-r--r--ext/tk/lib/tk/optiondb.rb7
-rw-r--r--ext/tk/lib/tk/optionobj.rb1
-rw-r--r--ext/tk/lib/tk/pack.rb1
-rw-r--r--ext/tk/lib/tk/package.rb1
-rw-r--r--ext/tk/lib/tk/palette.rb1
-rw-r--r--ext/tk/lib/tk/panedwindow.rb1
-rw-r--r--ext/tk/lib/tk/place.rb1
-rw-r--r--ext/tk/lib/tk/radiobutton.rb1
-rw-r--r--ext/tk/lib/tk/root.rb1
-rw-r--r--ext/tk/lib/tk/scale.rb1
-rw-r--r--ext/tk/lib/tk/scrollable.rb1
-rw-r--r--ext/tk/lib/tk/scrollbar.rb1
-rw-r--r--ext/tk/lib/tk/scrollbox.rb1
-rw-r--r--ext/tk/lib/tk/selection.rb1
-rw-r--r--ext/tk/lib/tk/spinbox.rb1
-rw-r--r--ext/tk/lib/tk/tagfont.rb1
-rw-r--r--ext/tk/lib/tk/text.rb1
-rw-r--r--ext/tk/lib/tk/textimage.rb1
-rw-r--r--ext/tk/lib/tk/textmark.rb1
-rw-r--r--ext/tk/lib/tk/texttag.rb1
-rw-r--r--ext/tk/lib/tk/textwindow.rb1
-rw-r--r--ext/tk/lib/tk/timer.rb5
-rw-r--r--ext/tk/lib/tk/tk_mac.rb159
-rw-r--r--ext/tk/lib/tk/toplevel.rb1
-rw-r--r--ext/tk/lib/tk/ttk_selector.rb1
-rw-r--r--ext/tk/lib/tk/txtwin_abst.rb1
-rw-r--r--ext/tk/lib/tk/validation.rb1
-rw-r--r--ext/tk/lib/tk/variable.rb4
-rw-r--r--ext/tk/lib/tk/virtevent.rb1
-rw-r--r--ext/tk/lib/tk/winfo.rb1
-rw-r--r--ext/tk/lib/tk/winpkg.rb1
-rw-r--r--ext/tk/lib/tk/wm.rb1
-rw-r--r--ext/tk/lib/tk/xim.rb1
-rw-r--r--ext/tk/lib/tkafter.rb1
-rw-r--r--ext/tk/lib/tkbgerror.rb1
-rw-r--r--ext/tk/lib/tkcanvas.rb1
-rw-r--r--ext/tk/lib/tkclass.rb1
-rw-r--r--ext/tk/lib/tkconsole.rb1
-rw-r--r--ext/tk/lib/tkdialog.rb1
-rw-r--r--ext/tk/lib/tkentry.rb1
-rw-r--r--ext/tk/lib/tkextlib/ICONS.rb1
-rw-r--r--ext/tk/lib/tkextlib/ICONS/icons.rb1
-rw-r--r--ext/tk/lib/tkextlib/ICONS/setup.rb1
-rw-r--r--ext/tk/lib/tkextlib/SUPPORT_STATUS2
-rw-r--r--ext/tk/lib/tkextlib/blt.rb1
-rw-r--r--ext/tk/lib/tkextlib/blt/barchart.rb1
-rw-r--r--ext/tk/lib/tkextlib/blt/bitmap.rb1
-rw-r--r--ext/tk/lib/tkextlib/blt/busy.rb1
-rw-r--r--ext/tk/lib/tkextlib/blt/component.rb1
-rw-r--r--ext/tk/lib/tkextlib/blt/container.rb1
-rw-r--r--ext/tk/lib/tkextlib/blt/cutbuffer.rb1
-rw-r--r--ext/tk/lib/tkextlib/blt/dragdrop.rb1
-rw-r--r--ext/tk/lib/tkextlib/blt/eps.rb1
-rw-r--r--ext/tk/lib/tkextlib/blt/graph.rb1
-rw-r--r--ext/tk/lib/tkextlib/blt/htext.rb1
-rw-r--r--ext/tk/lib/tkextlib/blt/setup.rb1
-rw-r--r--ext/tk/lib/tkextlib/blt/spline.rb1
-rw-r--r--ext/tk/lib/tkextlib/blt/stripchart.rb1
-rw-r--r--ext/tk/lib/tkextlib/blt/table.rb1
-rw-r--r--ext/tk/lib/tkextlib/blt/tabnotebook.rb1
-rw-r--r--ext/tk/lib/tkextlib/blt/tabset.rb1
-rw-r--r--ext/tk/lib/tkextlib/blt/ted.rb1
-rw-r--r--ext/tk/lib/tkextlib/blt/tile.rb1
-rw-r--r--ext/tk/lib/tkextlib/blt/tile/button.rb1
-rw-r--r--ext/tk/lib/tkextlib/blt/tile/checkbutton.rb1
-rw-r--r--ext/tk/lib/tkextlib/blt/tile/frame.rb1
-rw-r--r--ext/tk/lib/tkextlib/blt/tile/label.rb1
-rw-r--r--ext/tk/lib/tkextlib/blt/tile/radiobutton.rb1
-rw-r--r--ext/tk/lib/tkextlib/blt/tile/scrollbar.rb1
-rw-r--r--ext/tk/lib/tkextlib/blt/tile/toplevel.rb1
-rw-r--r--ext/tk/lib/tkextlib/blt/tree.rb3
-rw-r--r--ext/tk/lib/tkextlib/blt/treeview.rb1
-rw-r--r--ext/tk/lib/tkextlib/blt/unix_dnd.rb1
-rw-r--r--ext/tk/lib/tkextlib/blt/vector.rb1
-rw-r--r--ext/tk/lib/tkextlib/blt/watch.rb1
-rw-r--r--ext/tk/lib/tkextlib/blt/win_printer.rb1
-rw-r--r--ext/tk/lib/tkextlib/blt/winop.rb1
-rw-r--r--ext/tk/lib/tkextlib/bwidget.rb1
-rw-r--r--ext/tk/lib/tkextlib/bwidget/arrowbutton.rb1
-rw-r--r--ext/tk/lib/tkextlib/bwidget/bitmap.rb1
-rw-r--r--ext/tk/lib/tkextlib/bwidget/button.rb1
-rw-r--r--ext/tk/lib/tkextlib/bwidget/buttonbox.rb1
-rw-r--r--ext/tk/lib/tkextlib/bwidget/combobox.rb1
-rw-r--r--ext/tk/lib/tkextlib/bwidget/dialog.rb1
-rw-r--r--ext/tk/lib/tkextlib/bwidget/dragsite.rb1
-rw-r--r--ext/tk/lib/tkextlib/bwidget/dropsite.rb1
-rw-r--r--ext/tk/lib/tkextlib/bwidget/dynamichelp.rb1
-rw-r--r--ext/tk/lib/tkextlib/bwidget/entry.rb1
-rw-r--r--ext/tk/lib/tkextlib/bwidget/label.rb1
-rw-r--r--ext/tk/lib/tkextlib/bwidget/labelentry.rb1
-rw-r--r--ext/tk/lib/tkextlib/bwidget/labelframe.rb1
-rw-r--r--ext/tk/lib/tkextlib/bwidget/listbox.rb1
-rw-r--r--ext/tk/lib/tkextlib/bwidget/mainframe.rb1
-rw-r--r--ext/tk/lib/tkextlib/bwidget/messagedlg.rb1
-rw-r--r--ext/tk/lib/tkextlib/bwidget/notebook.rb1
-rw-r--r--ext/tk/lib/tkextlib/bwidget/pagesmanager.rb1
-rw-r--r--ext/tk/lib/tkextlib/bwidget/panedwindow.rb1
-rw-r--r--ext/tk/lib/tkextlib/bwidget/panelframe.rb1
-rw-r--r--ext/tk/lib/tkextlib/bwidget/passwddlg.rb1
-rw-r--r--ext/tk/lib/tkextlib/bwidget/progressbar.rb1
-rw-r--r--ext/tk/lib/tkextlib/bwidget/progressdlg.rb1
-rw-r--r--ext/tk/lib/tkextlib/bwidget/scrollableframe.rb1
-rw-r--r--ext/tk/lib/tkextlib/bwidget/scrolledwindow.rb1
-rw-r--r--ext/tk/lib/tkextlib/bwidget/scrollview.rb1
-rw-r--r--ext/tk/lib/tkextlib/bwidget/selectcolor.rb1
-rw-r--r--ext/tk/lib/tkextlib/bwidget/selectfont.rb1
-rw-r--r--ext/tk/lib/tkextlib/bwidget/separator.rb1
-rw-r--r--ext/tk/lib/tkextlib/bwidget/setup.rb1
-rw-r--r--ext/tk/lib/tkextlib/bwidget/spinbox.rb1
-rw-r--r--ext/tk/lib/tkextlib/bwidget/statusbar.rb1
-rw-r--r--ext/tk/lib/tkextlib/bwidget/titleframe.rb1
-rw-r--r--ext/tk/lib/tkextlib/bwidget/tree.rb1
-rw-r--r--ext/tk/lib/tkextlib/bwidget/widget.rb1
-rw-r--r--ext/tk/lib/tkextlib/itcl.rb1
-rw-r--r--ext/tk/lib/tkextlib/itcl/incr_tcl.rb1
-rw-r--r--ext/tk/lib/tkextlib/itcl/setup.rb1
-rw-r--r--ext/tk/lib/tkextlib/itk.rb1
-rw-r--r--ext/tk/lib/tkextlib/itk/incr_tk.rb1
-rw-r--r--ext/tk/lib/tkextlib/itk/setup.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/buttonbox.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/calendar.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/canvasprintbox.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/canvasprintdialog.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/checkbox.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/combobox.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/dateentry.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/datefield.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/dialog.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/dialogshell.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/disjointlistbox.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/entryfield.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/extbutton.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/extfileselectionbox.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/extfileselectiondialog.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/feedback.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/fileselectionbox.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/fileselectiondialog.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/finddialog.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/hierarchy.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/hyperhelp.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/labeledframe.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/labeledwidget.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/mainwindow.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/menubar.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/messagebox.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/messagedialog.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/notebook.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/optionmenu.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/panedwindow.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/promptdialog.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/pushbutton.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/radiobox.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/scopedobject.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/scrolledframe.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/scrolledhtml.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/scrolledwidget.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/selectionbox.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/selectiondialog.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/setup.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/shell.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/spindate.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/spinint.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/spinner.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/spintime.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/tabnotebook.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/tabset.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/timeentry.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/timefield.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/toolbar.rb1
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/watch.rb1
-rwxr-xr-xext/tk/lib/tkextlib/pkg_checker.rb1
-rw-r--r--ext/tk/lib/tkextlib/setup.rb1
-rw-r--r--ext/tk/lib/tkextlib/tcllib.rb1
-rw-r--r--ext/tk/lib/tkextlib/tcllib/autoscroll.rb1
-rw-r--r--ext/tk/lib/tkextlib/tcllib/calendar.rb1
-rw-r--r--ext/tk/lib/tkextlib/tcllib/canvas_sqmap.rb1
-rw-r--r--ext/tk/lib/tkextlib/tcllib/canvas_zoom.rb1
-rw-r--r--ext/tk/lib/tkextlib/tcllib/chatwidget.rb1
-rw-r--r--ext/tk/lib/tkextlib/tcllib/crosshair.rb1
-rw-r--r--ext/tk/lib/tkextlib/tcllib/ctext.rb1
-rw-r--r--ext/tk/lib/tkextlib/tcllib/cursor.rb1
-rw-r--r--ext/tk/lib/tkextlib/tcllib/dateentry.rb1
-rw-r--r--ext/tk/lib/tkextlib/tcllib/datefield.rb1
-rw-r--r--ext/tk/lib/tkextlib/tcllib/diagrams.rb1
-rw-r--r--ext/tk/lib/tkextlib/tcllib/dialog.rb1
-rw-r--r--ext/tk/lib/tkextlib/tcllib/getstring.rb1
-rw-r--r--ext/tk/lib/tkextlib/tcllib/history.rb1
-rw-r--r--ext/tk/lib/tkextlib/tcllib/ico.rb1
-rw-r--r--ext/tk/lib/tkextlib/tcllib/ip_entry.rb1
-rw-r--r--ext/tk/lib/tkextlib/tcllib/khim.rb1
-rw-r--r--ext/tk/lib/tkextlib/tcllib/menuentry.rb1
-rw-r--r--ext/tk/lib/tkextlib/tcllib/ntext.rb1
-rw-r--r--ext/tk/lib/tkextlib/tcllib/panelframe.rb1
-rw-r--r--ext/tk/lib/tkextlib/tcllib/plotchart.rb7
-rw-r--r--ext/tk/lib/tkextlib/tcllib/ruler.rb1
-rw-r--r--ext/tk/lib/tkextlib/tcllib/screenruler.rb1
-rw-r--r--ext/tk/lib/tkextlib/tcllib/scrolledwindow.rb1
-rw-r--r--ext/tk/lib/tkextlib/tcllib/scrollwin.rb1
-rw-r--r--ext/tk/lib/tkextlib/tcllib/setup.rb1
-rw-r--r--ext/tk/lib/tkextlib/tcllib/statusbar.rb1
-rw-r--r--ext/tk/lib/tkextlib/tcllib/style.rb1
-rw-r--r--ext/tk/lib/tkextlib/tcllib/superframe.rb1
-rw-r--r--ext/tk/lib/tkextlib/tcllib/swaplist.rb1
-rw-r--r--ext/tk/lib/tkextlib/tcllib/tablelist.rb1
-rw-r--r--ext/tk/lib/tkextlib/tcllib/tablelist_core.rb1
-rw-r--r--ext/tk/lib/tkextlib/tcllib/tablelist_tile.rb3
-rw-r--r--ext/tk/lib/tkextlib/tcllib/tkpiechart.rb1
-rw-r--r--ext/tk/lib/tkextlib/tcllib/toolbar.rb3
-rw-r--r--ext/tk/lib/tkextlib/tcllib/tooltip.rb1
-rw-r--r--ext/tk/lib/tkextlib/tcllib/validator.rb66
-rw-r--r--ext/tk/lib/tkextlib/tcllib/widget.rb1
-rw-r--r--ext/tk/lib/tkextlib/tclx.rb1
-rw-r--r--ext/tk/lib/tkextlib/tclx/setup.rb1
-rw-r--r--ext/tk/lib/tkextlib/tclx/tclx.rb1
-rw-r--r--ext/tk/lib/tkextlib/tile.rb1
-rw-r--r--ext/tk/lib/tkextlib/tile/dialog.rb1
-rw-r--r--ext/tk/lib/tkextlib/tile/setup.rb1
-rw-r--r--ext/tk/lib/tkextlib/tile/sizegrip.rb1
-rw-r--r--ext/tk/lib/tkextlib/tile/style.rb1
-rw-r--r--ext/tk/lib/tkextlib/tile/tbutton.rb1
-rw-r--r--ext/tk/lib/tkextlib/tile/tcheckbutton.rb1
-rw-r--r--ext/tk/lib/tkextlib/tile/tcombobox.rb1
-rw-r--r--ext/tk/lib/tkextlib/tile/tentry.rb1
-rw-r--r--ext/tk/lib/tkextlib/tile/tframe.rb1
-rw-r--r--ext/tk/lib/tkextlib/tile/tlabel.rb1
-rw-r--r--ext/tk/lib/tkextlib/tile/tlabelframe.rb1
-rw-r--r--ext/tk/lib/tkextlib/tile/tmenubutton.rb1
-rw-r--r--ext/tk/lib/tkextlib/tile/tnotebook.rb1
-rw-r--r--ext/tk/lib/tkextlib/tile/tpaned.rb1
-rw-r--r--ext/tk/lib/tkextlib/tile/tprogressbar.rb1
-rw-r--r--ext/tk/lib/tkextlib/tile/tradiobutton.rb1
-rw-r--r--ext/tk/lib/tkextlib/tile/treeview.rb31
-rw-r--r--ext/tk/lib/tkextlib/tile/tscale.rb1
-rw-r--r--ext/tk/lib/tkextlib/tile/tscrollbar.rb1
-rw-r--r--ext/tk/lib/tkextlib/tile/tseparator.rb1
-rw-r--r--ext/tk/lib/tkextlib/tile/tspinbox.rb1
-rw-r--r--ext/tk/lib/tkextlib/tile/tsquare.rb1
-rw-r--r--ext/tk/lib/tkextlib/tkDND.rb1
-rw-r--r--ext/tk/lib/tkextlib/tkDND/setup.rb1
-rw-r--r--ext/tk/lib/tkextlib/tkDND/shape.rb1
-rw-r--r--ext/tk/lib/tkextlib/tkDND/tkdnd.rb3
-rw-r--r--ext/tk/lib/tkextlib/tkHTML.rb1
-rw-r--r--ext/tk/lib/tkextlib/tkHTML/htmlwidget.rb1
-rw-r--r--ext/tk/lib/tkextlib/tkHTML/setup.rb1
-rw-r--r--ext/tk/lib/tkextlib/tkimg.rb1
-rw-r--r--ext/tk/lib/tkextlib/tkimg/bmp.rb1
-rw-r--r--ext/tk/lib/tkextlib/tkimg/dted.rb34
-rw-r--r--ext/tk/lib/tkextlib/tkimg/gif.rb1
-rw-r--r--ext/tk/lib/tkextlib/tkimg/ico.rb1
-rw-r--r--ext/tk/lib/tkextlib/tkimg/jpeg.rb1
-rw-r--r--ext/tk/lib/tkextlib/tkimg/pcx.rb1
-rw-r--r--ext/tk/lib/tkextlib/tkimg/pixmap.rb1
-rw-r--r--ext/tk/lib/tkextlib/tkimg/png.rb1
-rw-r--r--ext/tk/lib/tkextlib/tkimg/ppm.rb1
-rw-r--r--ext/tk/lib/tkextlib/tkimg/ps.rb1
-rw-r--r--ext/tk/lib/tkextlib/tkimg/raw.rb34
-rw-r--r--ext/tk/lib/tkextlib/tkimg/setup.rb1
-rw-r--r--ext/tk/lib/tkextlib/tkimg/sgi.rb1
-rw-r--r--ext/tk/lib/tkextlib/tkimg/sun.rb1
-rw-r--r--ext/tk/lib/tkextlib/tkimg/tga.rb1
-rw-r--r--ext/tk/lib/tkextlib/tkimg/tiff.rb1
-rw-r--r--ext/tk/lib/tkextlib/tkimg/window.rb1
-rw-r--r--ext/tk/lib/tkextlib/tkimg/xbm.rb1
-rw-r--r--ext/tk/lib/tkextlib/tkimg/xpm.rb1
-rw-r--r--ext/tk/lib/tkextlib/tktable.rb1
-rw-r--r--ext/tk/lib/tkextlib/tktable/setup.rb1
-rw-r--r--ext/tk/lib/tkextlib/tktable/tktable.rb1
-rw-r--r--ext/tk/lib/tkextlib/tktrans.rb1
-rw-r--r--ext/tk/lib/tkextlib/tktrans/setup.rb1
-rw-r--r--ext/tk/lib/tkextlib/tktrans/tktrans.rb1
-rw-r--r--ext/tk/lib/tkextlib/treectrl.rb1
-rw-r--r--ext/tk/lib/tkextlib/treectrl/setup.rb1
-rw-r--r--ext/tk/lib/tkextlib/treectrl/tktreectrl.rb1
-rw-r--r--ext/tk/lib/tkextlib/trofs.rb1
-rw-r--r--ext/tk/lib/tkextlib/trofs/setup.rb1
-rw-r--r--ext/tk/lib/tkextlib/trofs/trofs.rb1
-rw-r--r--ext/tk/lib/tkextlib/version.rb1
-rw-r--r--ext/tk/lib/tkextlib/vu.rb1
-rw-r--r--ext/tk/lib/tkextlib/vu/bargraph.rb1
-rw-r--r--ext/tk/lib/tkextlib/vu/charts.rb1
-rw-r--r--ext/tk/lib/tkextlib/vu/dial.rb1
-rw-r--r--ext/tk/lib/tkextlib/vu/pie.rb1
-rw-r--r--ext/tk/lib/tkextlib/vu/setup.rb1
-rw-r--r--ext/tk/lib/tkextlib/vu/spinbox.rb1
-rw-r--r--ext/tk/lib/tkextlib/winico.rb1
-rw-r--r--ext/tk/lib/tkextlib/winico/setup.rb1
-rw-r--r--ext/tk/lib/tkextlib/winico/winico.rb1
-rw-r--r--ext/tk/lib/tkfont.rb1
-rw-r--r--ext/tk/lib/tkmacpkg.rb1
-rw-r--r--ext/tk/lib/tkmenubar.rb1
-rw-r--r--ext/tk/lib/tkmngfocus.rb1
-rw-r--r--ext/tk/lib/tkpalette.rb1
-rw-r--r--ext/tk/lib/tkscrollbox.rb1
-rw-r--r--ext/tk/lib/tktext.rb1
-rw-r--r--ext/tk/lib/tkvirtevent.rb1
-rw-r--r--ext/tk/lib/tkwinpkg.rb1
-rw-r--r--ext/tk/old-extconf.rb1
-rw-r--r--ext/tk/sample/24hr_clock.rb1
-rw-r--r--ext/tk/sample/binding_sample.rb1
-rw-r--r--ext/tk/sample/bindtag_sample.rb1
-rw-r--r--ext/tk/sample/binstr_usage.rb1
-rw-r--r--ext/tk/sample/btn_with_frame.rb1
-rw-r--r--ext/tk/sample/cd_timer.rb1
-rw-r--r--ext/tk/sample/cmd_res_test.rb1
-rw-r--r--ext/tk/sample/demos-en/anilabel.rb1
-rw-r--r--ext/tk/sample/demos-en/aniwave.rb1
-rw-r--r--ext/tk/sample/demos-en/arrow.rb1
-rw-r--r--ext/tk/sample/demos-en/bind.rb1
-rw-r--r--ext/tk/sample/demos-en/bitmap.rb1
-rw-r--r--ext/tk/sample/demos-en/button.rb1
-rw-r--r--ext/tk/sample/demos-en/check.rb1
-rw-r--r--ext/tk/sample/demos-en/check2.rb1
-rw-r--r--ext/tk/sample/demos-en/clrpick.rb1
-rw-r--r--ext/tk/sample/demos-en/colors.rb1
-rw-r--r--ext/tk/sample/demos-en/combo.rb3
-rw-r--r--ext/tk/sample/demos-en/cscroll.rb1
-rw-r--r--ext/tk/sample/demos-en/ctext.rb1
-rw-r--r--ext/tk/sample/demos-en/dialog1.rb1
-rw-r--r--ext/tk/sample/demos-en/dialog2.rb1
-rw-r--r--ext/tk/sample/demos-en/entry1.rb1
-rw-r--r--ext/tk/sample/demos-en/entry2.rb1
-rw-r--r--ext/tk/sample/demos-en/entry3.rb1
-rw-r--r--ext/tk/sample/demos-en/filebox.rb1
-rw-r--r--ext/tk/sample/demos-en/floor.rb1
-rw-r--r--ext/tk/sample/demos-en/floor2.rb1
-rw-r--r--ext/tk/sample/demos-en/form.rb1
-rw-r--r--ext/tk/sample/demos-en/goldberg.rb1
-rw-r--r--ext/tk/sample/demos-en/hscale.rb1
-rw-r--r--ext/tk/sample/demos-en/icon.rb1
-rw-r--r--ext/tk/sample/demos-en/image1.rb1
-rw-r--r--ext/tk/sample/demos-en/image2.rb1
-rw-r--r--ext/tk/sample/demos-en/image3.rb1
-rw-r--r--ext/tk/sample/demos-en/items.rb1
-rw-r--r--ext/tk/sample/demos-en/knightstour.rb1
-rw-r--r--ext/tk/sample/demos-en/label.rb1
-rw-r--r--ext/tk/sample/demos-en/labelframe.rb1
-rw-r--r--ext/tk/sample/demos-en/mclist.rb1
-rw-r--r--ext/tk/sample/demos-en/menu.rb1
-rw-r--r--ext/tk/sample/demos-en/menu84.rb1
-rw-r--r--ext/tk/sample/demos-en/menubu.rb1
-rw-r--r--ext/tk/sample/demos-en/msgbox.rb1
-rw-r--r--ext/tk/sample/demos-en/msgbox2.rb1
-rw-r--r--ext/tk/sample/demos-en/paned1.rb1
-rw-r--r--ext/tk/sample/demos-en/paned2.rb1
-rw-r--r--ext/tk/sample/demos-en/pendulum.rb1
-rw-r--r--ext/tk/sample/demos-en/plot.rb1
-rw-r--r--ext/tk/sample/demos-en/puzzle.rb1
-rw-r--r--ext/tk/sample/demos-en/radio.rb1
-rw-r--r--ext/tk/sample/demos-en/radio2.rb1
-rw-r--r--ext/tk/sample/demos-en/radio3.rb1
-rw-r--r--ext/tk/sample/demos-en/rolodex2
-rw-r--r--ext/tk/sample/demos-en/ruler.rb1
-rw-r--r--ext/tk/sample/demos-en/sayings.rb1
-rw-r--r--ext/tk/sample/demos-en/search.rb1
-rw-r--r--ext/tk/sample/demos-en/spin.rb1
-rw-r--r--ext/tk/sample/demos-en/states.rb1
-rw-r--r--ext/tk/sample/demos-en/style.rb1
-rw-r--r--ext/tk/sample/demos-en/text.rb1
-rw-r--r--ext/tk/sample/demos-en/textpeer.rb1
-rw-r--r--ext/tk/sample/demos-en/tkencoding.rb1
-rw-r--r--ext/tk/sample/demos-en/toolbar.rb1
-rw-r--r--ext/tk/sample/demos-en/tree.rb1
-rw-r--r--ext/tk/sample/demos-en/ttkbut.rb1
-rw-r--r--ext/tk/sample/demos-en/ttkmenu.rb1
-rw-r--r--ext/tk/sample/demos-en/ttknote.rb1
-rw-r--r--ext/tk/sample/demos-en/ttkpane.rb1
-rw-r--r--ext/tk/sample/demos-en/ttkprogress.rb1
-rw-r--r--ext/tk/sample/demos-en/twind.rb1
-rw-r--r--ext/tk/sample/demos-en/twind2.rb1
-rw-r--r--ext/tk/sample/demos-en/unicodeout.rb1
-rw-r--r--ext/tk/sample/demos-en/vscale.rb1
-rw-r--r--ext/tk/sample/demos-jp/anilabel.rb1
-rw-r--r--ext/tk/sample/demos-jp/aniwave.rb1
-rw-r--r--ext/tk/sample/demos-jp/arrow.rb1
-rw-r--r--ext/tk/sample/demos-jp/bind.rb1
-rw-r--r--ext/tk/sample/demos-jp/bitmap.rb1
-rw-r--r--ext/tk/sample/demos-jp/button.rb1
-rw-r--r--ext/tk/sample/demos-jp/check.rb1
-rw-r--r--ext/tk/sample/demos-jp/check2.rb1
-rw-r--r--ext/tk/sample/demos-jp/clrpick.rb1
-rw-r--r--ext/tk/sample/demos-jp/colors.rb1
-rw-r--r--ext/tk/sample/demos-jp/combo.rb1
-rw-r--r--ext/tk/sample/demos-jp/cscroll.rb1
-rw-r--r--ext/tk/sample/demos-jp/ctext.rb1
-rw-r--r--ext/tk/sample/demos-jp/dialog1.rb1
-rw-r--r--ext/tk/sample/demos-jp/dialog2.rb1
-rw-r--r--ext/tk/sample/demos-jp/entry1.rb1
-rw-r--r--ext/tk/sample/demos-jp/entry2.rb1
-rw-r--r--ext/tk/sample/demos-jp/entry3.rb1
-rw-r--r--ext/tk/sample/demos-jp/filebox.rb1
-rw-r--r--ext/tk/sample/demos-jp/floor.rb1
-rw-r--r--ext/tk/sample/demos-jp/floor2.rb1
-rw-r--r--ext/tk/sample/demos-jp/form.rb1
-rw-r--r--ext/tk/sample/demos-jp/goldberg.rb1
-rw-r--r--ext/tk/sample/demos-jp/hscale.rb1
-rw-r--r--ext/tk/sample/demos-jp/icon.rb1
-rw-r--r--ext/tk/sample/demos-jp/image1.rb1
-rw-r--r--ext/tk/sample/demos-jp/image2.rb1
-rw-r--r--ext/tk/sample/demos-jp/image3.rb1
-rw-r--r--ext/tk/sample/demos-jp/items.rb1
-rw-r--r--ext/tk/sample/demos-jp/knightstour.rb1
-rw-r--r--ext/tk/sample/demos-jp/label.rb1
-rw-r--r--ext/tk/sample/demos-jp/labelframe.rb1
-rw-r--r--ext/tk/sample/demos-jp/mclist.rb1
-rw-r--r--ext/tk/sample/demos-jp/menu.rb1
-rw-r--r--ext/tk/sample/demos-jp/menu84.rb1
-rw-r--r--ext/tk/sample/demos-jp/menu8x.rb1
-rw-r--r--ext/tk/sample/demos-jp/menubu.rb1
-rw-r--r--ext/tk/sample/demos-jp/msgbox.rb1
-rw-r--r--ext/tk/sample/demos-jp/msgbox2.rb1
-rw-r--r--ext/tk/sample/demos-jp/paned1.rb1
-rw-r--r--ext/tk/sample/demos-jp/paned2.rb1
-rw-r--r--ext/tk/sample/demos-jp/pendulum.rb1
-rw-r--r--ext/tk/sample/demos-jp/plot.rb1
-rw-r--r--ext/tk/sample/demos-jp/puzzle.rb1
-rw-r--r--ext/tk/sample/demos-jp/radio.rb1
-rw-r--r--ext/tk/sample/demos-jp/radio2.rb1
-rw-r--r--ext/tk/sample/demos-jp/radio3.rb1
-rw-r--r--ext/tk/sample/demos-jp/rolodex2
-rw-r--r--ext/tk/sample/demos-jp/ruler.rb1
-rw-r--r--ext/tk/sample/demos-jp/sayings.rb1
-rw-r--r--ext/tk/sample/demos-jp/search.rb1
-rw-r--r--ext/tk/sample/demos-jp/spin.rb1
-rw-r--r--ext/tk/sample/demos-jp/states.rb1
-rw-r--r--ext/tk/sample/demos-jp/style.rb1
-rw-r--r--ext/tk/sample/demos-jp/text.rb1
-rw-r--r--ext/tk/sample/demos-jp/textpeer.rb1
-rw-r--r--ext/tk/sample/demos-jp/toolbar.rb1
-rw-r--r--ext/tk/sample/demos-jp/tree.rb1
-rw-r--r--ext/tk/sample/demos-jp/ttkbut.rb1
-rw-r--r--ext/tk/sample/demos-jp/ttkmenu.rb1
-rw-r--r--ext/tk/sample/demos-jp/ttknote.rb1
-rw-r--r--ext/tk/sample/demos-jp/ttkpane.rb1
-rw-r--r--ext/tk/sample/demos-jp/ttkprogress.rb1
-rw-r--r--ext/tk/sample/demos-jp/twind.rb1
-rw-r--r--ext/tk/sample/demos-jp/twind2.rb1
-rw-r--r--ext/tk/sample/demos-jp/unicodeout.rb1
-rw-r--r--ext/tk/sample/demos-jp/vscale.rb1
-rw-r--r--ext/tk/sample/editable_listbox.rb1
-rw-r--r--ext/tk/sample/encstr_usage.rb1
-rw-r--r--ext/tk/sample/figmemo_sample.rb3
-rw-r--r--ext/tk/sample/irbtk.rb1
-rw-r--r--ext/tk/sample/menubar1.rb3
-rw-r--r--ext/tk/sample/menubar2.rb5
-rw-r--r--ext/tk/sample/menubar3.rb3
-rw-r--r--ext/tk/sample/multi-ip_sample.rb1
-rw-r--r--ext/tk/sample/multi-ip_sample2.rb1
-rw-r--r--ext/tk/sample/optobj_sample.rb1
-rw-r--r--ext/tk/sample/propagate.rb1
-rw-r--r--ext/tk/sample/remote-ip_sample.rb1
-rw-r--r--ext/tk/sample/remote-ip_sample2.rb1
-rwxr-xr-x[-rw-r--r--]ext/tk/sample/safe-tk.rb4
-rw-r--r--ext/tk/sample/scrollframe.rb1
-rw-r--r--ext/tk/sample/tcltklib/lines1.rb1
-rw-r--r--ext/tk/sample/tcltklib/lines2.rb1
-rw-r--r--ext/tk/sample/tcltklib/lines3.rb1
-rw-r--r--ext/tk/sample/tcltklib/lines4.rb1
-rw-r--r--ext/tk/sample/tcltklib/safeTk.rb1
-rw-r--r--ext/tk/sample/tcltklib/sample0.rb1
-rw-r--r--ext/tk/sample/tcltklib/sample1.rb1
-rw-r--r--ext/tk/sample/tcltklib/sample2.rb1
-rw-r--r--ext/tk/sample/tkalignbox.rb1
-rw-r--r--ext/tk/sample/tkballoonhelp.rb1
-rw-r--r--ext/tk/sample/tkbiff.rb1
-rw-r--r--ext/tk/sample/tkbrowse.rb1
-rw-r--r--ext/tk/sample/tkcombobox.rb1
-rw-r--r--ext/tk/sample/tkdialog.rb1
-rw-r--r--ext/tk/sample/tkextlib/ICONS/viewIcons.rb1
-rw-r--r--ext/tk/sample/tkextlib/blt/barchart5.rb1
-rw-r--r--ext/tk/sample/tkextlib/blt/calendar.rb1
-rw-r--r--ext/tk/sample/tkextlib/blt/graph6.rb1
-rw-r--r--ext/tk/sample/tkextlib/blt/graph7.rb1
-rw-r--r--ext/tk/sample/tkextlib/blt/graph7a.rb1
-rw-r--r--ext/tk/sample/tkextlib/blt/graph7b.rb1
-rw-r--r--ext/tk/sample/tkextlib/blt/graph7c.rb1
-rw-r--r--ext/tk/sample/tkextlib/blt/pareto.rb3
-rw-r--r--ext/tk/sample/tkextlib/blt/plot1.rb1
-rw-r--r--ext/tk/sample/tkextlib/blt/plot1b.rb1
-rw-r--r--ext/tk/sample/tkextlib/blt/scripts/stipples.rb1
-rw-r--r--ext/tk/sample/tkextlib/blt/winop1.rb1
-rw-r--r--ext/tk/sample/tkextlib/blt/winop2.rb1
-rw-r--r--ext/tk/sample/tkextlib/bwidget/basic.rb1
-rw-r--r--ext/tk/sample/tkextlib/bwidget/demo.rb1
-rw-r--r--ext/tk/sample/tkextlib/bwidget/dnd.rb1
-rw-r--r--ext/tk/sample/tkextlib/bwidget/manager.rb1
-rw-r--r--ext/tk/sample/tkextlib/bwidget/select.rb1
-rw-r--r--ext/tk/sample/tkextlib/bwidget/tmpldlg.rb1
-rw-r--r--ext/tk/sample/tkextlib/bwidget/tree.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/buttonbox.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/calendar.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/canvasprintbox.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/canvasprintdialog.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/checkbox.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/combobox.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/dateentry.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/datefield.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/dialog.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/dialogshell.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/disjointlistbox.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/entryfield-1.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/entryfield-2.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/entryfield-3.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/extbutton.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/extfileselectionbox.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/extfileselectiondialog.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/feedback.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/fileselectionbox.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/fileselectiondialog.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/finddialog.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/hierarchy.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/hyperhelp.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/labeledframe.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/labeledwidget.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/mainwindow.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/menubar.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/menubar2.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/messagebox1.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/messagebox2.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/messagedialog.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/notebook.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/notebook2.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/optionmenu.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/panedwindow.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/panedwindow2.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/promptdialog.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/pushbutton.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/radiobox.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/scrolledcanvas.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/scrolledframe.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/scrolledhtml.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/scrolledlistbox.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/scrolledtext.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/selectionbox.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/selectiondialog.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/shell.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/spindate.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/spinint.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/spinner.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/spintime.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/tabnotebook.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/tabnotebook2.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/tabset.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/timeentry.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/timefield.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/toolbar.rb1
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/watch.rb1
-rw-r--r--ext/tk/sample/tkextlib/tcllib/datefield.rb1
-rw-r--r--ext/tk/sample/tkextlib/tcllib/plotdemos1.rb1
-rw-r--r--ext/tk/sample/tkextlib/tcllib/plotdemos2.rb1
-rw-r--r--ext/tk/sample/tkextlib/tcllib/plotdemos3.rb1
-rw-r--r--ext/tk/sample/tkextlib/tcllib/xyplot.rb1
-rw-r--r--ext/tk/sample/tkextlib/tile/demo.rb1
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/kroc.rb1
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/hv.rb1
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page4/index.html2
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/ss.rb1
-rw-r--r--ext/tk/sample/tkextlib/tkimg/demo.rb1
-rw-r--r--ext/tk/sample/tkextlib/tktable/basic.rb1
-rw-r--r--ext/tk/sample/tkextlib/tktable/buttons.rb1
-rw-r--r--ext/tk/sample/tkextlib/tktable/command.rb1
-rw-r--r--ext/tk/sample/tkextlib/tktable/debug.rb1
-rw-r--r--ext/tk/sample/tkextlib/tktable/dynarows.rb1
-rw-r--r--ext/tk/sample/tkextlib/tktable/maxsize.rb1
-rw-r--r--ext/tk/sample/tkextlib/tktable/spreadsheet.rb1
-rw-r--r--ext/tk/sample/tkextlib/tktable/valid.rb1
-rw-r--r--ext/tk/sample/tkextlib/treectrl/bitmaps.rb1
-rw-r--r--ext/tk/sample/tkextlib/treectrl/demo.rb1
-rw-r--r--ext/tk/sample/tkextlib/treectrl/explorer.rb1
-rw-r--r--ext/tk/sample/tkextlib/treectrl/help.rb1
-rw-r--r--ext/tk/sample/tkextlib/treectrl/imovie.rb1
-rw-r--r--ext/tk/sample/tkextlib/treectrl/layout.rb1
-rw-r--r--ext/tk/sample/tkextlib/treectrl/mailwasher.rb1
-rw-r--r--ext/tk/sample/tkextlib/treectrl/outlook-folders.rb1
-rw-r--r--ext/tk/sample/tkextlib/treectrl/outlook-newgroup.rb1
-rw-r--r--ext/tk/sample/tkextlib/treectrl/random.rb1
-rw-r--r--ext/tk/sample/tkextlib/treectrl/www-options.rb1
-rw-r--r--ext/tk/sample/tkextlib/vu/canvItems.rb1
-rw-r--r--ext/tk/sample/tkextlib/vu/canvSticker.rb1
-rw-r--r--ext/tk/sample/tkextlib/vu/canvSticker2.rb1
-rw-r--r--ext/tk/sample/tkextlib/vu/dial_demo.rb1
-rw-r--r--ext/tk/sample/tkextlib/vu/oscilloscope.rb1
-rw-r--r--ext/tk/sample/tkextlib/vu/pie.rb1
-rw-r--r--ext/tk/sample/tkextlib/vu/vu_demo.rb1
-rw-r--r--ext/tk/sample/tkfrom.rb1
-rw-r--r--ext/tk/sample/tkhello.rb1
-rw-r--r--ext/tk/sample/tkline.rb1
-rw-r--r--ext/tk/sample/tkmenubutton.rb1
-rw-r--r--ext/tk/sample/tkmsgcat-load_rb.rb1
-rw-r--r--ext/tk/sample/tkmsgcat-load_rb2.rb1
-rw-r--r--ext/tk/sample/tkmsgcat-load_tk.rb1
-rw-r--r--ext/tk/sample/tkmulticolumnlist.rb1
-rw-r--r--ext/tk/sample/tkmultilistbox.rb1
-rw-r--r--ext/tk/sample/tkmultilistframe.rb1
-rwxr-xr-x[-rw-r--r--]ext/tk/sample/tkoptdb-safeTk.rb3
-rw-r--r--ext/tk/sample/tkoptdb.rb1
-rw-r--r--ext/tk/sample/tkrttimer.rb1
-rw-r--r--ext/tk/sample/tksleep_sample.rb1
-rw-r--r--ext/tk/sample/tktextframe.rb1
-rw-r--r--ext/tk/sample/tktextio.rb3
-rw-r--r--ext/tk/sample/tktimer.rb1
-rw-r--r--ext/tk/sample/tktimer2.rb1
-rw-r--r--ext/tk/sample/tktimer3.rb1
-rw-r--r--ext/tk/sample/tktree.rb1
-rw-r--r--ext/tk/sample/ttk_wrapper.rb1
-rw-r--r--ext/tk/stubs.c36
-rw-r--r--ext/tk/stubs.h10
-rw-r--r--ext/tk/tcltklib.c453
-rw-r--r--ext/tk/tkutil/extconf.rb12
-rw-r--r--ext/tk/tkutil/tkutil.c501
-rw-r--r--ext/win32/extconf.rb3
-rw-r--r--ext/win32/lib/Win32API.rb23
-rw-r--r--ext/win32/lib/win32/importer.rb11
-rw-r--r--ext/win32/lib/win32/registry.rb55
-rw-r--r--ext/win32/lib/win32/resolv.rb16
-rw-r--r--ext/win32/lib/win32/sspi.rb1
-rw-r--r--ext/win32ole/depend13
-rw-r--r--ext/win32ole/extconf.rb1
-rw-r--r--ext/win32ole/lib/win32ole/property.rb1
-rw-r--r--ext/win32ole/sample/excel1.rb6
-rw-r--r--ext/win32ole/sample/excel2.rb11
-rw-r--r--ext/win32ole/sample/excel3.rb8
-rw-r--r--ext/win32ole/sample/ie.rb1
-rw-r--r--ext/win32ole/sample/ieconst.rb1
-rw-r--r--ext/win32ole/sample/ienavi.rb1
-rw-r--r--ext/win32ole/sample/ienavi2.rb1
-rw-r--r--ext/win32ole/sample/oledirs.rb1
-rw-r--r--ext/win32ole/sample/olegen.rb1
-rw-r--r--ext/win32ole/sample/xml.rb1
-rw-r--r--ext/win32ole/win32ole.c6317
-rw-r--r--ext/win32ole/win32ole.h155
-rw-r--r--ext/win32ole/win32ole_error.c83
-rw-r--r--ext/win32ole/win32ole_error.h8
-rw-r--r--ext/win32ole/win32ole_event.c1278
-rw-r--r--ext/win32ole/win32ole_event.h6
-rw-r--r--ext/win32ole/win32ole_method.c950
-rw-r--r--ext/win32ole/win32ole_method.h16
-rw-r--r--ext/win32ole/win32ole_param.c438
-rw-r--r--ext/win32ole/win32ole_param.h8
-rw-r--r--ext/win32ole/win32ole_record.c604
-rw-r--r--ext/win32ole/win32ole_record.h10
-rw-r--r--ext/win32ole/win32ole_type.c915
-rw-r--r--ext/win32ole/win32ole_type.h8
-rw-r--r--ext/win32ole/win32ole_typelib.c844
-rw-r--r--ext/win32ole/win32ole_typelib.h11
-rw-r--r--ext/win32ole/win32ole_variable.c380
-rw-r--r--ext/win32ole/win32ole_variable.h8
-rw-r--r--ext/win32ole/win32ole_variant.c732
-rw-r--r--ext/win32ole/win32ole_variant.h9
-rw-r--r--ext/win32ole/win32ole_variant_m.c149
-rw-r--r--ext/win32ole/win32ole_variant_m.h7
-rw-r--r--ext/zlib/extconf.rb4
-rw-r--r--ext/zlib/zlib.c197
-rw-r--r--file.c839
-rw-r--r--gc.c5723
-rw-r--r--gc.h15
-rw-r--r--gem_prelude.rb8
-rw-r--r--gems/bundled_gems6
-rw-r--r--goruby.c6
-rw-r--r--hash.c841
-rw-r--r--id_table.c1583
-rw-r--r--id_table.h30
-rw-r--r--include/ruby/backward/classext.h2
-rw-r--r--include/ruby/backward/rubyio.h2
-rw-r--r--include/ruby/backward/rubysig.h7
-rw-r--r--include/ruby/backward/st.h2
-rw-r--r--include/ruby/backward/util.h2
-rw-r--r--include/ruby/defines.h105
-rw-r--r--include/ruby/encoding.h212
-rw-r--r--include/ruby/intern.h232
-rw-r--r--include/ruby/io.h59
-rw-r--r--include/ruby/missing.h38
-rw-r--r--include/ruby/oniguruma.h54
-rw-r--r--include/ruby/re.h1
-rw-r--r--include/ruby/ruby.h1152
-rw-r--r--include/ruby/st.h7
-rw-r--r--include/ruby/thread_native.h56
-rw-r--r--include/ruby/util.h15
-rw-r--r--include/ruby/version.h4
-rw-r--r--include/ruby/win32.h121
-rw-r--r--inits.c6
-rw-r--r--insns.def470
-rw-r--r--internal.h739
-rw-r--r--io.c1929
-rw-r--r--iseq.c1584
-rw-r--r--iseq.h157
-rw-r--r--lex.c.blt197
-rw-r--r--lib/English.rb5
-rw-r--r--[-rwxr-xr-x]lib/abbrev.rb96
-rw-r--r--lib/base64.rb22
-rw-r--r--lib/benchmark.rb56
-rw-r--r--lib/cgi.rb5
-rw-r--r--lib/cgi/cookie.rb60
-rw-r--r--lib/cgi/core.rb46
-rw-r--r--lib/cgi/html.rb3
-rw-r--r--lib/cgi/session.rb29
-rw-r--r--lib/cgi/session/pstore.rb14
-rw-r--r--lib/cgi/util.rb22
-rw-r--r--lib/cmath.rb263
-rw-r--r--lib/complex.rb28
-rw-r--r--lib/csv.rb157
-rw-r--r--lib/debug.rb24
-rw-r--r--lib/delegate.rb73
-rw-r--r--lib/drb.rb1
-rw-r--r--lib/drb/acl.rb21
-rw-r--r--lib/drb/drb.rb77
-rw-r--r--lib/drb/eq.rb1
-rw-r--r--lib/drb/extserv.rb31
-rw-r--r--lib/drb/extservm.rb3
-rw-r--r--lib/drb/gw.rb1
-rw-r--r--lib/drb/invokemethod.rb1
-rw-r--r--lib/drb/observer.rb1
-rw-r--r--lib/drb/ssl.rb6
-rw-r--r--lib/drb/timeridconv.rb41
-rw-r--r--lib/drb/unix.rb7
-rw-r--r--lib/e2mmap.rb5
-rw-r--r--lib/erb.rb48
-rw-r--r--lib/fileutils.rb185
-rw-r--r--lib/find.rb8
-rw-r--r--lib/forwardable.rb62
-rw-r--r--lib/getoptlong.rb3
-rw-r--r--lib/gserver.rb310
-rw-r--r--lib/ipaddr.rb282
-rw-r--r--lib/irb.rb45
-rw-r--r--lib/irb/cmd/chws.rb7
-rw-r--r--lib/irb/cmd/fork.rb30
-rw-r--r--lib/irb/cmd/help.rb1
-rw-r--r--lib/irb/cmd/load.rb49
-rw-r--r--lib/irb/cmd/nop.rb12
-rw-r--r--lib/irb/cmd/pushws.rb11
-rw-r--r--lib/irb/cmd/subirb.rb9
-rw-r--r--lib/irb/completion.rb265
-rw-r--r--lib/irb/context.rb176
-rw-r--r--lib/irb/ext/change-ws.rb35
-rw-r--r--lib/irb/ext/history.rb59
-rw-r--r--lib/irb/ext/loader.rb119
-rw-r--r--lib/irb/ext/math-mode.rb9
-rw-r--r--lib/irb/ext/multi-irb.rb176
-rw-r--r--lib/irb/ext/save-history.rb69
-rw-r--r--lib/irb/ext/tracer.rb27
-rw-r--r--lib/irb/ext/use-loader.rb29
-rw-r--r--lib/irb/ext/workspaces.rb27
-rw-r--r--lib/irb/extend-command.rb219
-rw-r--r--lib/irb/frame.rb5
-rw-r--r--lib/irb/help.rb19
-rw-r--r--lib/irb/init.rb213
-rw-r--r--lib/irb/input-method.rb37
-rw-r--r--lib/irb/inspector.rb15
-rw-r--r--lib/irb/lc/error.rb1
-rw-r--r--lib/irb/lc/ja/encoding_aliases.rb1
-rw-r--r--lib/irb/lc/ja/error.rb1
-rw-r--r--lib/irb/locale.rb72
-rw-r--r--lib/irb/magic-file.rb1
-rw-r--r--lib/irb/notifier.rb81
-rw-r--r--lib/irb/output-method.rb7
-rw-r--r--lib/irb/ruby-lex.rb704
-rw-r--r--lib/irb/ruby-token.rb30
-rw-r--r--lib/irb/slex.rb262
-rw-r--r--lib/irb/src_encoding.rb1
-rw-r--r--lib/irb/version.rb1
-rw-r--r--lib/irb/workspace.rb115
-rw-r--r--lib/irb/ws-for-case-2.rb1
-rw-r--r--lib/irb/xmp.rb39
-rw-r--r--lib/logger.rb310
-rw-r--r--lib/mathn.rb152
-rw-r--r--lib/matrix.rb345
-rw-r--r--lib/matrix/eigenvalue_decomposition.rb215
-rw-r--r--lib/matrix/lup_decomposition.rb1
-rw-r--r--lib/minitest/.document2
-rw-r--r--lib/minitest/autorun.rb19
-rw-r--r--lib/minitest/hell.rb20
-rw-r--r--lib/minitest/parallel_each.rb80
-rw-r--r--lib/minitest/pride.rb119
-rw-r--r--lib/minitest/spec.rb551
-rw-r--r--lib/mkmf.rb207
-rw-r--r--lib/monitor.rb3
-rw-r--r--lib/mutex_m.rb1
-rw-r--r--lib/net/ftp.rb464
-rw-r--r--lib/net/http.rb75
-rw-r--r--lib/net/http/backward.rb1
-rw-r--r--lib/net/http/exceptions.rb1
-rw-r--r--lib/net/http/generic_request.rb69
-rw-r--r--lib/net/http/header.rb37
-rw-r--r--lib/net/http/proxy_delta.rb1
-rw-r--r--lib/net/http/request.rb1
-rw-r--r--lib/net/http/requests.rb3
-rw-r--r--lib/net/http/response.rb20
-rw-r--r--lib/net/http/responses.rb6
-rw-r--r--lib/net/https.rb3
-rw-r--r--lib/net/imap.rb552
-rw-r--r--lib/net/pop.rb1
-rw-r--r--lib/net/protocol.rb56
-rw-r--r--lib/net/smtp.rb29
-rw-r--r--lib/net/telnet.rb763
-rw-r--r--lib/observer.rb3
-rw-r--r--lib/open-uri.rb31
-rw-r--r--lib/open3.rb60
-rw-r--r--lib/optionparser.rb2
-rw-r--r--lib/optparse.rb356
-rw-r--r--lib/optparse/ac.rb1
-rw-r--r--lib/optparse/date.rb1
-rw-r--r--lib/optparse/shellwords.rb1
-rw-r--r--lib/optparse/time.rb1
-rw-r--r--lib/optparse/uri.rb1
-rw-r--r--lib/optparse/version.rb3
-rw-r--r--lib/ostruct.rb60
-rw-r--r--lib/pp.rb12
-rw-r--r--lib/prettyprint.rb30
-rw-r--r--lib/prime.rb132
-rw-r--r--lib/profile.rb1
-rw-r--r--lib/profiler.rb1
-rw-r--r--lib/pstore.rb25
-rw-r--r--lib/racc/parser.rb3
-rw-r--r--lib/racc/rdoc/grammar.en.rdoc8
-rw-r--r--lib/rake.rb73
-rw-r--r--lib/rake/alt_system.rb108
-rw-r--r--lib/rake/application.rb728
-rw-r--r--lib/rake/backtrace.rb20
-rw-r--r--lib/rake/clean.rb55
-rw-r--r--lib/rake/cloneable.rb16
-rw-r--r--lib/rake/contrib/compositepublisher.rb21
-rw-r--r--lib/rake/contrib/ftptools.rb139
-rw-r--r--lib/rake/contrib/publisher.rb73
-rw-r--r--lib/rake/contrib/rubyforgepublisher.rb16
-rw-r--r--lib/rake/contrib/sshpublisher.rb50
-rw-r--r--lib/rake/contrib/sys.rb2
-rw-r--r--lib/rake/default_loader.rb10
-rw-r--r--lib/rake/dsl_definition.rb157
-rw-r--r--lib/rake/early_time.rb18
-rw-r--r--lib/rake/ext/core.rb28
-rw-r--r--lib/rake/ext/module.rb1
-rw-r--r--lib/rake/ext/string.rb166
-rw-r--r--lib/rake/ext/time.rb15
-rw-r--r--lib/rake/file_creation_task.rb24
-rw-r--r--lib/rake/file_list.rb416
-rw-r--r--lib/rake/file_task.rb46
-rw-r--r--lib/rake/file_utils.rb116
-rw-r--r--lib/rake/file_utils_ext.rb144
-rw-r--r--lib/rake/gempackagetask.rb2
-rw-r--r--lib/rake/invocation_chain.rb57
-rw-r--r--lib/rake/invocation_exception_mixin.rb16
-rw-r--r--lib/rake/lib/.document1
-rw-r--r--lib/rake/lib/project.rake21
-rw-r--r--lib/rake/linked_list.rb103
-rw-r--r--lib/rake/loaders/makefile.rb40
-rw-r--r--lib/rake/multi_task.rb13
-rw-r--r--lib/rake/name_space.rb25
-rw-r--r--lib/rake/packagetask.rb190
-rw-r--r--lib/rake/pathmap.rb1
-rw-r--r--lib/rake/phony.rb15
-rw-r--r--lib/rake/private_reader.rb20
-rw-r--r--lib/rake/promise.rb99
-rw-r--r--lib/rake/pseudo_status.rb29
-rw-r--r--lib/rake/rake_module.rb37
-rw-r--r--lib/rake/rake_test_loader.rb22
-rw-r--r--lib/rake/rdoctask.rb2
-rw-r--r--lib/rake/ruby182_test_unit_fix.rb27
-rw-r--r--lib/rake/rule_recursion_overflow_error.rb20
-rw-r--r--lib/rake/runtest.rb22
-rw-r--r--lib/rake/scope.rb42
-rw-r--r--lib/rake/task.rb378
-rw-r--r--lib/rake/task_argument_error.rb7
-rw-r--r--lib/rake/task_arguments.rb89
-rw-r--r--lib/rake/task_manager.rb297
-rw-r--r--lib/rake/tasklib.rb22
-rw-r--r--lib/rake/testtask.rb201
-rw-r--r--lib/rake/thread_history_display.rb48
-rw-r--r--lib/rake/thread_pool.rb161
-rw-r--r--lib/rake/trace_output.rb22
-rw-r--r--lib/rake/version.rb9
-rw-r--r--lib/rake/win32.rb56
-rw-r--r--lib/rational.rb23
-rw-r--r--lib/rbconfig/datadir.rb1
-rw-r--r--lib/rbconfig/obsolete.rb38
-rw-r--r--lib/rdoc.rb7
-rw-r--r--lib/rdoc/alias.rb1
-rw-r--r--lib/rdoc/anon_class.rb1
-rw-r--r--lib/rdoc/any_method.rb11
-rw-r--r--lib/rdoc/attr.rb1
-rw-r--r--lib/rdoc/class_module.rb1
-rw-r--r--lib/rdoc/code_object.rb1
-rw-r--r--lib/rdoc/code_objects.rb1
-rw-r--r--lib/rdoc/comment.rb1
-rw-r--r--lib/rdoc/constant.rb1
-rw-r--r--lib/rdoc/context.rb12
-rw-r--r--lib/rdoc/context/section.rb1
-rw-r--r--lib/rdoc/cross_reference.rb1
-rw-r--r--lib/rdoc/encoding.rb5
-rw-r--r--lib/rdoc/erb_partial.rb1
-rw-r--r--lib/rdoc/erbio.rb1
-rw-r--r--lib/rdoc/extend.rb1
-rw-r--r--lib/rdoc/generator.rb2
-rw-r--r--lib/rdoc/generator/darkfish.rb6
-rw-r--r--lib/rdoc/generator/json_index.rb50
-rw-r--r--lib/rdoc/generator/markup.rb1
-rw-r--r--lib/rdoc/generator/pot.rb98
-rw-r--r--lib/rdoc/generator/pot/message_extractor.rb68
-rw-r--r--lib/rdoc/generator/pot/po.rb84
-rw-r--r--lib/rdoc/generator/pot/po_entry.rb141
-rw-r--r--lib/rdoc/generator/ri.rb1
-rw-r--r--lib/rdoc/generator/template/darkfish/_footer.rhtml4
-rw-r--r--lib/rdoc/generator/template/darkfish/_head.rhtml21
-rw-r--r--lib/rdoc/generator/template/darkfish/css/fonts.css (renamed from lib/rdoc/generator/template/darkfish/fonts.css)0
-rw-r--r--lib/rdoc/generator/template/darkfish/css/rdoc.css (renamed from lib/rdoc/generator/template/darkfish/rdoc.css)12
-rw-r--r--[-rwxr-xr-x]lib/rdoc/generator/template/darkfish/images/add.pngbin733 -> 733 bytes-rw-r--r--[-rwxr-xr-x]lib/rdoc/generator/template/darkfish/images/arrow_up.pngbin372 -> 372 bytes-rw-r--r--[-rwxr-xr-x]lib/rdoc/generator/template/darkfish/images/delete.pngbin715 -> 715 bytes-rw-r--r--[-rwxr-xr-x]lib/rdoc/generator/template/darkfish/images/tag_blue.pngbin1880 -> 1880 bytes-rw-r--r--lib/rdoc/generator/template/darkfish/js/darkfish.js43
-rw-r--r--lib/rdoc/generator/template/darkfish/js/jquery.js22
-rw-r--r--lib/rdoc/generator/template/json_index/js/searcher.js4
-rw-r--r--lib/rdoc/ghost_method.rb1
-rw-r--r--lib/rdoc/i18n.rb10
-rw-r--r--lib/rdoc/i18n/locale.rb102
-rw-r--r--lib/rdoc/i18n/text.rb126
-rw-r--r--lib/rdoc/include.rb1
-rw-r--r--lib/rdoc/known_classes.rb2
-rw-r--r--lib/rdoc/markdown.rb177
-rw-r--r--lib/rdoc/markdown/entities.rb1
-rw-r--r--lib/rdoc/markdown/literals_1_9.rb1
-rw-r--r--lib/rdoc/markup.rb5
-rw-r--r--lib/rdoc/markup/attr_changer.rb1
-rw-r--r--lib/rdoc/markup/attr_span.rb1
-rw-r--r--lib/rdoc/markup/attribute_manager.rb3
-rw-r--r--lib/rdoc/markup/attributes.rb1
-rw-r--r--lib/rdoc/markup/blank_line.rb1
-rw-r--r--lib/rdoc/markup/block_quote.rb1
-rw-r--r--lib/rdoc/markup/document.rb1
-rw-r--r--lib/rdoc/markup/formatter.rb1
-rw-r--r--lib/rdoc/markup/formatter_test_case.rb1
-rw-r--r--lib/rdoc/markup/hard_break.rb1
-rw-r--r--lib/rdoc/markup/heading.rb1
-rw-r--r--lib/rdoc/markup/include.rb1
-rw-r--r--lib/rdoc/markup/indented_paragraph.rb1
-rw-r--r--lib/rdoc/markup/inline.rb1
-rw-r--r--lib/rdoc/markup/list.rb1
-rw-r--r--lib/rdoc/markup/list_item.rb1
-rw-r--r--lib/rdoc/markup/paragraph.rb1
-rw-r--r--lib/rdoc/markup/parser.rb1
-rw-r--r--lib/rdoc/markup/pre_process.rb1
-rw-r--r--lib/rdoc/markup/raw.rb1
-rw-r--r--lib/rdoc/markup/rule.rb1
-rw-r--r--lib/rdoc/markup/special.rb1
-rw-r--r--lib/rdoc/markup/text_formatter_test_case.rb1
-rw-r--r--lib/rdoc/markup/to_ansi.rb1
-rw-r--r--lib/rdoc/markup/to_bs.rb1
-rw-r--r--lib/rdoc/markup/to_html.rb10
-rw-r--r--lib/rdoc/markup/to_html_crossref.rb1
-rw-r--r--lib/rdoc/markup/to_html_snippet.rb1
-rw-r--r--lib/rdoc/markup/to_joined_paragraph.rb1
-rw-r--r--lib/rdoc/markup/to_label.rb3
-rw-r--r--lib/rdoc/markup/to_markdown.rb1
-rw-r--r--lib/rdoc/markup/to_rdoc.rb1
-rw-r--r--lib/rdoc/markup/to_table_of_contents.rb1
-rw-r--r--lib/rdoc/markup/to_test.rb1
-rw-r--r--lib/rdoc/markup/to_tt_only.rb1
-rw-r--r--lib/rdoc/markup/verbatim.rb1
-rw-r--r--lib/rdoc/meta_method.rb1
-rw-r--r--lib/rdoc/method_attr.rb15
-rw-r--r--lib/rdoc/mixin.rb1
-rw-r--r--lib/rdoc/normal_class.rb1
-rw-r--r--lib/rdoc/normal_module.rb1
-rw-r--r--lib/rdoc/options.rb59
-rw-r--r--lib/rdoc/parser.rb3
-rw-r--r--lib/rdoc/parser/c.rb19
-rw-r--r--lib/rdoc/parser/changelog.rb11
-rw-r--r--lib/rdoc/parser/markdown.rb1
-rw-r--r--lib/rdoc/parser/rd.rb1
-rw-r--r--lib/rdoc/parser/ruby.rb25
-rw-r--r--lib/rdoc/parser/ruby_tools.rb1
-rw-r--r--lib/rdoc/parser/simple.rb1
-rw-r--r--lib/rdoc/parser/text.rb1
-rw-r--r--lib/rdoc/rd.rb1
-rw-r--r--lib/rdoc/rd/block_parser.rb7
-rw-r--r--lib/rdoc/rd/inline.rb1
-rw-r--r--lib/rdoc/rd/inline_parser.rb3
-rw-r--r--lib/rdoc/rdoc.gemspec7
-rw-r--r--lib/rdoc/rdoc.rb15
-rw-r--r--lib/rdoc/require.rb1
-rw-r--r--lib/rdoc/ri.rb1
-rw-r--r--lib/rdoc/ri/driver.rb1
-rw-r--r--lib/rdoc/ri/formatter.rb1
-rw-r--r--lib/rdoc/ri/paths.rb1
-rw-r--r--lib/rdoc/ri/store.rb1
-rw-r--r--lib/rdoc/ri/task.rb72
-rw-r--r--lib/rdoc/ruby_lex.rb7
-rw-r--r--lib/rdoc/ruby_token.rb15
-rw-r--r--lib/rdoc/rubygems_hook.rb9
-rw-r--r--lib/rdoc/servlet.rb3
-rw-r--r--lib/rdoc/single_class.rb5
-rw-r--r--lib/rdoc/stats.rb5
-rw-r--r--lib/rdoc/stats/normal.rb34
-rw-r--r--lib/rdoc/stats/quiet.rb1
-rw-r--r--lib/rdoc/stats/verbose.rb1
-rw-r--r--lib/rdoc/store.rb1
-rw-r--r--lib/rdoc/task.rb3
-rw-r--r--lib/rdoc/test_case.rb3
-rw-r--r--lib/rdoc/text.rb19
-rw-r--r--lib/rdoc/token_stream.rb3
-rw-r--r--lib/rdoc/tom_doc.rb1
-rw-r--r--lib/rdoc/top_level.rb1
-rw-r--r--lib/resolv-replace.rb2
-rw-r--r--lib/resolv.rb105
-rw-r--r--lib/rexml/attlistdecl.rb3
-rw-r--r--lib/rexml/attribute.rb5
-rw-r--r--lib/rexml/cdata.rb1
-rw-r--r--lib/rexml/child.rb1
-rw-r--r--lib/rexml/comment.rb2
-rw-r--r--lib/rexml/doctype.rb1
-rw-r--r--lib/rexml/document.rb7
-rw-r--r--lib/rexml/dtd/attlistdecl.rb1
-rw-r--r--lib/rexml/dtd/dtd.rb6
-rw-r--r--lib/rexml/dtd/elementdecl.rb5
-rw-r--r--lib/rexml/dtd/entitydecl.rb1
-rw-r--r--lib/rexml/dtd/notationdecl.rb1
-rw-r--r--lib/rexml/element.rb7
-rw-r--r--lib/rexml/encoding.rb1
-rw-r--r--lib/rexml/entity.rb8
-rw-r--r--lib/rexml/formatters/default.rb1
-rw-r--r--lib/rexml/formatters/pretty.rb1
-rw-r--r--lib/rexml/formatters/transitive.rb1
-rw-r--r--lib/rexml/functions.rb32
-rw-r--r--lib/rexml/instruction.rb1
-rw-r--r--lib/rexml/light/node.rb1
-rw-r--r--lib/rexml/namespace.rb1
-rw-r--r--lib/rexml/node.rb1
-rw-r--r--lib/rexml/output.rb1
-rw-r--r--lib/rexml/parent.rb3
-rw-r--r--lib/rexml/parseexception.rb1
-rw-r--r--lib/rexml/parsers/baseparser.rb1
-rw-r--r--lib/rexml/parsers/lightparser.rb1
-rw-r--r--lib/rexml/parsers/pullparser.rb1
-rw-r--r--lib/rexml/parsers/sax2parser.rb2
-rw-r--r--lib/rexml/parsers/streamparser.rb9
-rw-r--r--lib/rexml/parsers/treeparser.rb1
-rw-r--r--lib/rexml/parsers/ultralightparser.rb1
-rw-r--r--lib/rexml/parsers/xpathparser.rb44
-rw-r--r--lib/rexml/quickpath.rb1
-rw-r--r--lib/rexml/rexml.rb1
-rw-r--r--lib/rexml/sax2listener.rb1
-rw-r--r--lib/rexml/security.rb1
-rw-r--r--lib/rexml/source.rb7
-rw-r--r--lib/rexml/streamlistener.rb3
-rw-r--r--lib/rexml/syncenumerator.rb1
-rw-r--r--lib/rexml/text.rb1
-rw-r--r--lib/rexml/undefinednamespaceexception.rb1
-rw-r--r--lib/rexml/validation/relaxng.rb22
-rw-r--r--lib/rexml/validation/validation.rb13
-rw-r--r--lib/rexml/validation/validationexception.rb1
-rw-r--r--lib/rexml/xmldecl.rb1
-rw-r--r--lib/rexml/xmltokens.rb77
-rw-r--r--lib/rexml/xpath.rb1
-rw-r--r--lib/rexml/xpath_parser.rb109
-rw-r--r--lib/rinda/rinda.rb1
-rw-r--r--lib/rinda/ring.rb57
-rw-r--r--lib/rinda/tuplespace.rb4
-rw-r--r--lib/rss.rb1
-rw-r--r--lib/rss/0.9.rb1
-rw-r--r--lib/rss/1.0.rb1
-rw-r--r--lib/rss/2.0.rb1
-rw-r--r--lib/rss/atom.rb1
-rw-r--r--lib/rss/content.rb1
-rw-r--r--lib/rss/content/1.0.rb1
-rw-r--r--lib/rss/content/2.0.rb1
-rw-r--r--lib/rss/converter.rb1
-rw-r--r--lib/rss/dublincore.rb1
-rw-r--r--lib/rss/dublincore/1.0.rb1
-rw-r--r--lib/rss/dublincore/2.0.rb1
-rw-r--r--lib/rss/dublincore/atom.rb1
-rw-r--r--lib/rss/image.rb1
-rw-r--r--lib/rss/itunes.rb1
-rw-r--r--lib/rss/maker.rb1
-rw-r--r--lib/rss/maker/0.9.rb1
-rw-r--r--lib/rss/maker/1.0.rb1
-rw-r--r--lib/rss/maker/2.0.rb1
-rw-r--r--lib/rss/maker/atom.rb1
-rw-r--r--lib/rss/maker/base.rb3
-rw-r--r--lib/rss/maker/content.rb1
-rw-r--r--lib/rss/maker/dublincore.rb1
-rw-r--r--lib/rss/maker/entry.rb1
-rw-r--r--lib/rss/maker/feed.rb1
-rw-r--r--lib/rss/maker/image.rb1
-rw-r--r--lib/rss/maker/itunes.rb1
-rw-r--r--lib/rss/maker/slash.rb1
-rw-r--r--lib/rss/maker/syndication.rb1
-rw-r--r--lib/rss/maker/taxonomy.rb1
-rw-r--r--lib/rss/maker/trackback.rb1
-rw-r--r--lib/rss/parser.rb1
-rw-r--r--lib/rss/rexmlparser.rb1
-rw-r--r--lib/rss/rss.rb9
-rw-r--r--lib/rss/slash.rb1
-rw-r--r--lib/rss/syndication.rb3
-rw-r--r--lib/rss/taxonomy.rb1
-rw-r--r--lib/rss/trackback.rb1
-rw-r--r--lib/rss/utils.rb3
-rw-r--r--lib/rss/xml-stylesheet.rb1
-rw-r--r--lib/rss/xml.rb1
-rw-r--r--lib/rss/xmlparser.rb3
-rw-r--r--lib/rss/xmlscanner.rb1
-rw-r--r--lib/rubygems.rb111
-rw-r--r--lib/rubygems/available_set.rb3
-rw-r--r--lib/rubygems/basic_specification.rb164
-rw-r--r--lib/rubygems/command.rb14
-rw-r--r--lib/rubygems/command_manager.rb4
-rw-r--r--lib/rubygems/commands/build_command.rb5
-rw-r--r--lib/rubygems/commands/cert_command.rb25
-rw-r--r--lib/rubygems/commands/check_command.rb1
-rw-r--r--lib/rubygems/commands/cleanup_command.rb5
-rw-r--r--lib/rubygems/commands/contents_command.rb29
-rw-r--r--lib/rubygems/commands/dependency_command.rb49
-rw-r--r--lib/rubygems/commands/environment_command.rb15
-rw-r--r--lib/rubygems/commands/fetch_command.rb1
-rw-r--r--lib/rubygems/commands/generate_index_command.rb1
-rw-r--r--lib/rubygems/commands/help_command.rb230
-rw-r--r--lib/rubygems/commands/install_command.rb61
-rw-r--r--lib/rubygems/commands/list_command.rb9
-rw-r--r--lib/rubygems/commands/lock_command.rb1
-rw-r--r--lib/rubygems/commands/mirror_command.rb33
-rw-r--r--lib/rubygems/commands/open_command.rb77
-rw-r--r--lib/rubygems/commands/outdated_command.rb1
-rw-r--r--lib/rubygems/commands/owner_command.rb5
-rw-r--r--lib/rubygems/commands/pristine_command.rb29
-rw-r--r--lib/rubygems/commands/push_command.rb1
-rw-r--r--lib/rubygems/commands/query_command.rb24
-rw-r--r--lib/rubygems/commands/rdoc_command.rb1
-rw-r--r--lib/rubygems/commands/search_command.rb11
-rw-r--r--lib/rubygems/commands/server_command.rb1
-rw-r--r--lib/rubygems/commands/setup_command.rb3
-rw-r--r--lib/rubygems/commands/sources_command.rb3
-rw-r--r--lib/rubygems/commands/specification_command.rb1
-rw-r--r--lib/rubygems/commands/stale_command.rb1
-rw-r--r--lib/rubygems/commands/uninstall_command.rb17
-rw-r--r--lib/rubygems/commands/unpack_command.rb1
-rw-r--r--lib/rubygems/commands/update_command.rb25
-rw-r--r--lib/rubygems/commands/which_command.rb1
-rw-r--r--lib/rubygems/commands/yank_command.rb41
-rw-r--r--lib/rubygems/compatibility.rb4
-rw-r--r--lib/rubygems/config_file.rb37
-rw-r--r--lib/rubygems/core_ext/kernel_gem.rb19
-rwxr-xr-xlib/rubygems/core_ext/kernel_require.rb41
-rw-r--r--lib/rubygems/defaults.rb25
-rw-r--r--lib/rubygems/dependency.rb71
-rw-r--r--lib/rubygems/dependency_installer.rb72
-rw-r--r--lib/rubygems/dependency_list.rb10
-rw-r--r--lib/rubygems/deprecate.rb1
-rw-r--r--lib/rubygems/doctor.rb3
-rw-r--r--lib/rubygems/errors.rb31
-rw-r--r--lib/rubygems/exceptions.rb28
-rw-r--r--lib/rubygems/ext.rb1
-rw-r--r--lib/rubygems/ext/build_error.rb1
-rw-r--r--lib/rubygems/ext/builder.rb5
-rw-r--r--lib/rubygems/ext/cmake_builder.rb1
-rw-r--r--lib/rubygems/ext/configure_builder.rb1
-rw-r--r--lib/rubygems/ext/ext_conf_builder.rb44
-rw-r--r--lib/rubygems/ext/rake_builder.rb1
-rw-r--r--lib/rubygems/gem_runner.rb1
-rw-r--r--lib/rubygems/gemcutter_utilities.rb14
-rw-r--r--lib/rubygems/indexer.rb120
-rw-r--r--lib/rubygems/install_default_message.rb1
-rw-r--r--lib/rubygems/install_message.rb1
-rw-r--r--lib/rubygems/install_update_options.rb23
-rw-r--r--lib/rubygems/installer.rb187
-rw-r--r--lib/rubygems/installer_test_case.rb7
-rw-r--r--lib/rubygems/local_remote_options.rb7
-rw-r--r--lib/rubygems/mock_gem_ui.rb1
-rw-r--r--lib/rubygems/name_tuple.rb7
-rw-r--r--lib/rubygems/package.rb69
-rw-r--r--lib/rubygems/package/digest_io.rb1
-rw-r--r--lib/rubygems/package/file_source.rb34
-rw-r--r--lib/rubygems/package/io_source.rb46
-rw-r--r--lib/rubygems/package/old.rb28
-rw-r--r--lib/rubygems/package/source.rb4
-rw-r--r--lib/rubygems/package/tar_header.rb2
-rw-r--r--lib/rubygems/package/tar_reader.rb2
-rw-r--r--lib/rubygems/package/tar_reader/entry.rb11
-rw-r--r--lib/rubygems/package/tar_test_case.rb16
-rw-r--r--lib/rubygems/package/tar_writer.rb33
-rw-r--r--lib/rubygems/package_task.rb1
-rw-r--r--lib/rubygems/path_support.rb27
-rw-r--r--lib/rubygems/platform.rb9
-rw-r--r--lib/rubygems/psych_additions.rb3
-rw-r--r--lib/rubygems/psych_tree.rb1
-rw-r--r--lib/rubygems/rdoc.rb7
-rw-r--r--lib/rubygems/remote_fetcher.rb117
-rw-r--r--lib/rubygems/request.rb180
-rw-r--r--lib/rubygems/request/connection_pools.rb88
-rw-r--r--lib/rubygems/request/http_pool.rb48
-rw-r--r--lib/rubygems/request/https_pool.rb11
-rw-r--r--lib/rubygems/request_set.rb178
-rw-r--r--lib/rubygems/request_set/gem_dependency_api.rb392
-rw-r--r--lib/rubygems/request_set/lockfile.rb490
-rw-r--r--lib/rubygems/request_set/lockfile/parser.rb354
-rw-r--r--lib/rubygems/request_set/lockfile/tokenizer.rb112
-rw-r--r--lib/rubygems/requirement.rb23
-rw-r--r--lib/rubygems/resolver.rb332
-rw-r--r--lib/rubygems/resolver/activation_request.rb33
-rw-r--r--lib/rubygems/resolver/api_set.rb15
-rw-r--r--lib/rubygems/resolver/api_specification.rb9
-rw-r--r--lib/rubygems/resolver/best_set.rb29
-rw-r--r--lib/rubygems/resolver/composed_set.rb17
-rw-r--r--lib/rubygems/resolver/conflict.rb54
-rw-r--r--lib/rubygems/resolver/current_set.rb1
-rw-r--r--lib/rubygems/resolver/dependency_request.rb27
-rw-r--r--lib/rubygems/resolver/git_set.rb3
-rw-r--r--lib/rubygems/resolver/git_specification.rb30
-rw-r--r--lib/rubygems/resolver/index_set.rb7
-rw-r--r--lib/rubygems/resolver/index_specification.rb1
-rw-r--r--lib/rubygems/resolver/installed_specification.rb21
-rw-r--r--lib/rubygems/resolver/installer_set.rb95
-rw-r--r--lib/rubygems/resolver/local_specification.rb26
-rw-r--r--lib/rubygems/resolver/lock_set.rb25
-rw-r--r--lib/rubygems/resolver/lock_specification.rb36
-rw-r--r--lib/rubygems/resolver/molinillo.rb2
-rw-r--r--lib/rubygems/resolver/molinillo/lib/molinillo.rb10
-rw-r--r--lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb287
-rw-r--r--lib/rubygems/resolver/molinillo/lib/molinillo/errors.rb75
-rw-r--r--lib/rubygems/resolver/molinillo/lib/molinillo/gem_metadata.rb5
-rw-r--r--lib/rubygems/resolver/molinillo/lib/molinillo/modules/specification_provider.rb100
-rw-r--r--lib/rubygems/resolver/molinillo/lib/molinillo/modules/ui.rb64
-rw-r--r--lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb436
-rw-r--r--lib/rubygems/resolver/molinillo/lib/molinillo/resolver.rb45
-rw-r--r--lib/rubygems/resolver/molinillo/lib/molinillo/state.rb52
-rw-r--r--lib/rubygems/resolver/requirement_list.rb1
-rw-r--r--lib/rubygems/resolver/set.rb15
-rw-r--r--lib/rubygems/resolver/source_set.rb48
-rw-r--r--lib/rubygems/resolver/spec_specification.rb3
-rw-r--r--lib/rubygems/resolver/specification.rb28
-rw-r--r--lib/rubygems/resolver/stats.rb1
-rw-r--r--lib/rubygems/resolver/vendor_set.rb5
-rw-r--r--lib/rubygems/resolver/vendor_specification.rb3
-rw-r--r--lib/rubygems/safe_yaml.rb48
-rw-r--r--lib/rubygems/security.rb5
-rw-r--r--lib/rubygems/security/policies.rb1
-rw-r--r--lib/rubygems/security/policy.rb5
-rw-r--r--lib/rubygems/security/signer.rb3
-rw-r--r--lib/rubygems/security/trust_dir.rb1
-rw-r--r--lib/rubygems/server.rb38
-rw-r--r--lib/rubygems/source.rb21
-rw-r--r--lib/rubygems/source/git.rb17
-rw-r--r--lib/rubygems/source/installed.rb8
-rw-r--r--lib/rubygems/source/local.rb1
-rw-r--r--lib/rubygems/source/lock.rb1
-rw-r--r--lib/rubygems/source/specific_file.rb8
-rw-r--r--lib/rubygems/source/vendor.rb1
-rw-r--r--lib/rubygems/source_list.rb3
-rw-r--r--lib/rubygems/source_local.rb1
-rw-r--r--lib/rubygems/source_specific_file.rb1
-rw-r--r--lib/rubygems/spec_fetcher.rb20
-rw-r--r--lib/rubygems/specification.rb673
-rw-r--r--lib/rubygems/ssl_certs/AddTrustExternalCARoot-2048.pem25
-rw-r--r--lib/rubygems/ssl_certs/AddTrustExternalCARoot.pem32
-rw-r--r--lib/rubygems/ssl_certs/GlobalSignRootCA.pem21
-rw-r--r--lib/rubygems/stub_specification.rb185
-rw-r--r--lib/rubygems/syck_hack.rb1
-rw-r--r--lib/rubygems/test_case.rb184
-rw-r--r--lib/rubygems/test_utilities.rb39
-rw-r--r--lib/rubygems/text.rb39
-rw-r--r--lib/rubygems/uninstaller.rb8
-rw-r--r--lib/rubygems/uri_formatter.rb1
-rw-r--r--lib/rubygems/user_interaction.rb28
-rw-r--r--lib/rubygems/util.rb24
-rw-r--r--lib/rubygems/util/licenses.rb343
-rw-r--r--lib/rubygems/util/list.rb31
-rw-r--r--lib/rubygems/util/stringio.rb34
-rw-r--r--lib/rubygems/validator.rb1
-rw-r--r--lib/rubygems/version.rb52
-rw-r--r--lib/rubygems/version_option.rb1
-rw-r--r--lib/scanf.rb8
-rw-r--r--lib/securerandom.rb227
-rw-r--r--lib/set.rb126
-rw-r--r--lib/shell.rb48
-rw-r--r--lib/shell/builtin-command.rb15
-rw-r--r--lib/shell/command-processor.rb6
-rw-r--r--lib/shell/error.rb1
-rw-r--r--lib/shell/filter.rb1
-rw-r--r--lib/shell/process-controller.rb10
-rw-r--r--lib/shell/system-command.rb2
-rw-r--r--lib/shell/version.rb1
-rw-r--r--lib/shellwords.rb32
-rw-r--r--lib/singleton.rb1
-rw-r--r--lib/sync.rb1
-rw-r--r--lib/tempfile.rb144
-rw-r--r--lib/test/unit/assertions.rb403
-rw-r--r--lib/test/unit/test-unit.gemspec14
-rw-r--r--lib/thwait.rb5
-rw-r--r--lib/time.rb120
-rw-r--r--lib/timeout.rb34
-rw-r--r--lib/tmpdir.rb44
-rw-r--r--lib/tracer.rb1
-rw-r--r--lib/tsort.rb16
-rw-r--r--lib/ubygems.rb1
-rw-r--r--lib/un.rb9
-rw-r--r--lib/unicode_normalize.rb79
-rw-r--r--lib/unicode_normalize/normalize.rb161
-rw-r--r--lib/unicode_normalize/tables.rb1160
-rw-r--r--lib/uri.rb3
-rw-r--r--lib/uri/common.rb574
-rw-r--r--lib/uri/ftp.rb26
-rw-r--r--lib/uri/generic.rb278
-rw-r--r--lib/uri/http.rb17
-rw-r--r--lib/uri/https.rb1
-rw-r--r--lib/uri/ldap.rb1
-rw-r--r--lib/uri/ldaps.rb1
-rw-r--r--lib/uri/mailto.rb164
-rw-r--r--lib/uri/rfc2396_parser.rb544
-rw-r--r--lib/uri/rfc3986_parser.rb125
-rw-r--r--lib/weakref.rb12
-rw-r--r--lib/webrick.rb3
-rw-r--r--lib/webrick/accesslog.rb1
-rw-r--r--lib/webrick/cgi.rb1
-rw-r--r--lib/webrick/compat.rb1
-rw-r--r--lib/webrick/config.rb1
-rw-r--r--lib/webrick/cookie.rb1
-rw-r--r--lib/webrick/htmlutils.rb1
-rw-r--r--lib/webrick/httpauth.rb1
-rw-r--r--lib/webrick/httpauth/authenticator.rb1
-rw-r--r--lib/webrick/httpauth/basicauth.rb4
-rw-r--r--lib/webrick/httpauth/digestauth.rb4
-rw-r--r--lib/webrick/httpauth/htdigest.rb1
-rw-r--r--lib/webrick/httpauth/htgroup.rb1
-rw-r--r--lib/webrick/httpauth/htpasswd.rb1
-rw-r--r--lib/webrick/httpauth/userdb.rb1
-rw-r--r--lib/webrick/httpproxy.rb9
-rw-r--r--lib/webrick/httprequest.rb3
-rw-r--r--lib/webrick/httpresponse.rb3
-rw-r--r--lib/webrick/https.rb1
-rw-r--r--lib/webrick/httpserver.rb12
-rw-r--r--lib/webrick/httpservlet.rb1
-rw-r--r--lib/webrick/httpservlet/abstract.rb1
-rw-r--r--lib/webrick/httpservlet/cgi_runner.rb1
-rw-r--r--lib/webrick/httpservlet/cgihandler.rb5
-rw-r--r--lib/webrick/httpservlet/erbhandler.rb3
-rw-r--r--lib/webrick/httpservlet/filehandler.rb4
-rw-r--r--lib/webrick/httpservlet/prochandler.rb1
-rw-r--r--lib/webrick/httpstatus.rb7
-rw-r--r--lib/webrick/httputils.rb1
-rw-r--r--lib/webrick/httpversion.rb1
-rw-r--r--lib/webrick/log.rb5
-rw-r--r--lib/webrick/server.rb151
-rw-r--r--lib/webrick/ssl.rb6
-rw-r--r--lib/webrick/utils.rb111
-rw-r--r--lib/webrick/version.rb1
-rw-r--r--lib/xmlrpc.rb15
-rw-r--r--lib/xmlrpc/base64.rb1
-rw-r--r--lib/xmlrpc/client.rb29
-rw-r--r--lib/xmlrpc/config.rb2
-rw-r--r--lib/xmlrpc/create.rb1
-rw-r--r--lib/xmlrpc/datetime.rb1
-rw-r--r--lib/xmlrpc/httpserver.rb173
-rw-r--r--lib/xmlrpc/marshal.rb1
-rw-r--r--lib/xmlrpc/parser.rb35
-rw-r--r--lib/xmlrpc/server.rb1
-rw-r--r--lib/xmlrpc/utils.rb1
-rw-r--r--lib/yaml.rb41
-rw-r--r--lib/yaml/dbm.rb1
-rw-r--r--lib/yaml/store.rb1
-rw-r--r--load.c310
-rw-r--r--localeinit.c69
-rw-r--r--man/erb.12
-rw-r--r--man/goruby.12
-rw-r--r--man/irb.16
-rw-r--r--man/rake.1205
-rw-r--r--man/ri.12
-rw-r--r--man/ruby.1173
-rw-r--r--marshal.c586
-rw-r--r--math.c294
-rw-r--r--method.h195
-rw-r--r--miniinit.c21
-rw-r--r--misc/README2
-rw-r--r--misc/rdoc-mode.el40
-rw-r--r--misc/ruby-additional.el18
-rw-r--r--misc/ruby-electric.el280
-rw-r--r--misc/ruby-mode.el4
-rw-r--r--missing/crypt.c91
-rw-r--r--missing/explicit_bzero.c88
-rw-r--r--missing/lgamma_r.c2
-rw-r--r--missing/nextafter.c77
-rw-r--r--missing/os2.c138
-rw-r--r--missing/setproctitle.c7
-rw-r--r--nacl/GNUmakefile.in49
-rw-r--r--nacl/README.nacl23
-rw-r--r--nacl/ioctl.h7
-rwxr-xr-x[-rw-r--r--]nacl/nacl-config.rb16
-rw-r--r--nacl/package.rb6
-rw-r--r--nacl/pepper_main.c248
-rw-r--r--node.c343
-rw-r--r--node.h67
-rw-r--r--numeric.c684
-rw-r--r--object.c979
-rw-r--r--pack.c468
-rw-r--r--parse.y4717
-rw-r--r--prelude.rb125
-rw-r--r--probes.d6
-rw-r--r--probes_helper.h70
-rw-r--r--proc.c1285
-rw-r--r--process.c2188
-rw-r--r--random.c497
-rw-r--r--range.c200
-rw-r--r--rational.c103
-rw-r--r--re.c285
-rw-r--r--regcomp.c291
-rw-r--r--regenc.c76
-rw-r--r--regenc.h32
-rw-r--r--regerror.c24
-rw-r--r--regexec.c815
-rw-r--r--regint.h116
-rw-r--r--regparse.c490
-rw-r--r--regparse.h10
-rw-r--r--ruby.c576
-rw-r--r--ruby_atomic.h79
-rw-r--r--safe.c33
-rw-r--r--sample/benchmark.rb19
-rw-r--r--sample/cgi-session-pstore.rb11
-rw-r--r--sample/delegate.rb31
-rw-r--r--sample/drb/acl.rb15
-rw-r--r--sample/drb/ring_place.rb6
-rw-r--r--sample/exyacc.rb2
-rw-r--r--sample/iseq_loader.rb243
-rw-r--r--sample/list.rb2
-rw-r--r--sample/net-imap.rb167
-rw-r--r--sample/open3.rb12
-rw-r--r--sample/pstore.rb19
-rw-r--r--sample/pty/shl.rb47
-rw-r--r--sample/rinda-ring.rb22
-rw-r--r--sample/simple-bench.rb140
-rw-r--r--sample/tempfile.rb8
-rwxr-xr-xsample/test.rb14
-rw-r--r--sample/timeout.rb2
-rw-r--r--sample/trick2013/README.md2
-rw-r--r--sample/trick2013/kinaba/entry.rb2
-rw-r--r--sample/trick2013/kinaba/remarks.markdown6
-rw-r--r--sample/trick2013/mame/entry.rb2
-rw-r--r--sample/trick2015/README.md16
-rw-r--r--sample/trick2015/eregon/authors.markdown3
-rw-r--r--sample/trick2015/eregon/entry.rb16
-rw-r--r--sample/trick2015/eregon/remarks.markdown70
-rw-r--r--sample/trick2015/kinaba/authors.markdown4
-rw-r--r--sample/trick2015/kinaba/entry.rb150
-rw-r--r--sample/trick2015/kinaba/remarks.markdown85
-rw-r--r--sample/trick2015/ksk_1/authors.markdown3
-rw-r--r--sample/trick2015/ksk_1/entry.rb1
-rw-r--r--sample/trick2015/ksk_1/remarks.markdown120
-rw-r--r--sample/trick2015/ksk_2/abnormal.cnf6
-rw-r--r--sample/trick2015/ksk_2/authors.markdown3
-rw-r--r--sample/trick2015/ksk_2/entry.rb1
-rw-r--r--sample/trick2015/ksk_2/quinn.cnf21
-rw-r--r--sample/trick2015/ksk_2/remarks.markdown204
-rw-r--r--sample/trick2015/ksk_2/sample.cnf9
-rw-r--r--sample/trick2015/ksk_2/uf20-01.cnf99
-rw-r--r--sample/trick2015/ksk_2/unsat.cnf11
-rw-r--r--sample/trick2015/monae/authors.markdown1
-rw-r--r--sample/trick2015/monae/entry.rb26
-rw-r--r--sample/trick2015/monae/remarks.markdown25
-rw-r--r--sample/weakref.rb9
-rw-r--r--signal.c477
-rw-r--r--siphash.c1
-rw-r--r--spec/default.mspec11
-rw-r--r--sprintf.c353
-rw-r--r--st.c535
-rw-r--r--strftime.c2
-rw-r--r--string.c2849
-rw-r--r--struct.c476
-rw-r--r--symbian/README.SYMBIAN93
-rw-r--r--symbian/configure.bat123
-rw-r--r--symbian/missing-aeabi.c18
-rw-r--r--symbian/missing-pips.c65
-rw-r--r--symbian/pre-build83
-rw-r--r--symbian/setup440
-rw-r--r--symbol.c1134
-rw-r--r--symbol.h108
-rw-r--r--template/Doxyfile.tmpl2
-rw-r--r--template/fake.rb.in77
-rw-r--r--template/id.c.tmpl16
-rw-r--r--template/id.h.tmpl66
-rw-r--r--template/insns.inc.tmpl2
-rw-r--r--template/insns_info.inc.tmpl2
-rw-r--r--template/known_errors.inc.tmpl2
-rw-r--r--template/minsns.inc.tmpl2
-rw-r--r--template/opt_sc.inc.tmpl2
-rw-r--r--template/optinsn.inc.tmpl2
-rw-r--r--template/optunifs.inc.tmpl2
-rw-r--r--template/prelude.c.tmpl (renamed from tool/compile_prelude.rb)125
-rw-r--r--template/ruby-runner.c.in37
-rw-r--r--template/sizes.c.tmpl6
-rw-r--r--template/unicode_norm_gen.tmpl222
-rw-r--r--template/verconf.h.tmpl (renamed from template/verconf.h.in)12
-rw-r--r--template/vm.inc.tmpl2
-rw-r--r--test/-ext-/array/test_resize.rb1
-rw-r--r--test/-ext-/bignum/test_big2str.rb3
-rw-r--r--test/-ext-/bignum/test_bigzero.rb1
-rw-r--r--test/-ext-/bignum/test_div.rb3
-rw-r--r--test/-ext-/bignum/test_mul.rb3
-rw-r--r--test/-ext-/bignum/test_pack.rb25
-rw-r--r--test/-ext-/bignum/test_str2big.rb3
-rw-r--r--test/-ext-/bug_reporter/test_bug_reporter.rb21
-rw-r--r--test/-ext-/class/test_class2name.rb1
-rw-r--r--test/-ext-/debug/test_debug.rb1
-rw-r--r--test/-ext-/debug/test_profile_frames.rb26
-rw-r--r--test/-ext-/exception/test_data_error.rb2
-rw-r--r--test/-ext-/exception/test_enc_raise.rb1
-rw-r--r--test/-ext-/exception/test_ensured.rb2
-rw-r--r--test/-ext-/file/test_stat.rb1
-rw-r--r--test/-ext-/float/test_nextafter.rb65
-rw-r--r--test/-ext-/funcall/test_passing_block.rb1
-rw-r--r--test/-ext-/gvl/test_last_thread.rb23
-rw-r--r--test/-ext-/hash/test_delete.rb20
-rw-r--r--test/-ext-/iseq_load/test_iseq_load.rb117
-rw-r--r--test/-ext-/iter/test_iter_break.rb1
-rw-r--r--test/-ext-/iter/test_yield_block.rb1
-rw-r--r--test/-ext-/load/test_dot_dot.rb1
-rw-r--r--test/-ext-/marshal/test_internal_ivar.rb20
-rw-r--r--test/-ext-/marshal/test_usrmarshal.rb2
-rw-r--r--test/-ext-/method/test_arity.rb1
-rw-r--r--test/-ext-/num2int/test_num2int.rb1
-rw-r--r--test/-ext-/old_thread_select/test_old_thread_select.rb103
-rw-r--r--test/-ext-/path_to_class/test_path_to_class.rb1
-rw-r--r--test/-ext-/popen_deadlock/test_popen_deadlock.rb36
-rw-r--r--test/-ext-/postponed_job/test_postponed_job.rb1
-rw-r--r--test/-ext-/proc/test_bmethod.rb38
-rw-r--r--test/-ext-/rational/test_rat.rb1
-rw-r--r--test/-ext-/st/test_foreach.rb16
-rw-r--r--test/-ext-/st/test_numhash.rb1
-rw-r--r--test/-ext-/st/test_update.rb1
-rw-r--r--test/-ext-/string/test_coderange.rb60
-rw-r--r--test/-ext-/string/test_cstr.rb124
-rw-r--r--test/-ext-/string/test_ellipsize.rb3
-rw-r--r--test/-ext-/string/test_enc_associate.rb14
-rw-r--r--test/-ext-/string/test_enc_str_buf_cat.rb3
-rw-r--r--test/-ext-/string/test_fstring.rb74
-rw-r--r--test/-ext-/string/test_modify_expand.rb17
-rw-r--r--test/-ext-/string/test_nofree.rb13
-rw-r--r--test/-ext-/string/test_normalize.rb14
-rw-r--r--test/-ext-/string/test_qsort.rb3
-rw-r--r--test/-ext-/string/test_set_len.rb3
-rw-r--r--test/-ext-/struct/test_duplicate.rb22
-rw-r--r--test/-ext-/struct/test_member.rb16
-rw-r--r--test/-ext-/symbol/test_inadvertent_creation.rb265
-rw-r--r--test/-ext-/symbol/test_type.rb23
-rw-r--r--test/-ext-/test_bug-3571.rb2
-rw-r--r--test/-ext-/test_bug-3662.rb10
-rw-r--r--test/-ext-/test_bug-5832.rb1
-rw-r--r--test/-ext-/test_notimplement.rb15
-rw-r--r--test/-ext-/test_printf.rb11
-rw-r--r--test/-ext-/test_recursion.rb2
-rw-r--r--test/-ext-/thread_fd_close/test_thread_fd_close.rb23
-rw-r--r--test/-ext-/time/test_new.rb44
-rw-r--r--test/-ext-/tracepoint/test_tracepoint.rb6
-rw-r--r--test/-ext-/typeddata/test_typeddata.rb15
-rw-r--r--test/-ext-/vm/test_at_exit.rb19
-rw-r--r--test/-ext-/wait_for_single_fd/test_wait_for_single_fd.rb1
-rw-r--r--test/-ext-/win32/test_console_attr.rb44
-rw-r--r--test/-ext-/win32/test_dln.rb24
-rw-r--r--test/-ext-/win32/test_fd_setsize.rb2
-rw-r--r--test/base64/test_base64.rb15
-rw-r--r--test/benchmark/test_benchmark.rb137
-rw-r--r--test/bigdecimal/test_bigdecimal.rb48
-rw-r--r--test/bigdecimal/test_bigdecimal_util.rb1
-rw-r--r--test/bigdecimal/test_bigmath.rb18
-rw-r--r--test/bigdecimal/testbase.rb1
-rw-r--r--test/cgi/test_cgi_cookie.rb20
-rw-r--r--test/cgi/test_cgi_core.rb136
-rw-r--r--test/cgi/test_cgi_header.rb19
-rw-r--r--test/cgi/test_cgi_modruby.rb11
-rw-r--r--test/cgi/test_cgi_multipart.rb78
-rw-r--r--test/cgi/test_cgi_session.rb47
-rw-r--r--test/cgi/test_cgi_tag_helper.rb28
-rw-r--r--test/cgi/test_cgi_util.rb80
-rw-r--r--test/cgi/update_env.rb9
-rw-r--r--test/colors3
-rw-r--r--test/coverage/test_coverage.rb61
-rw-r--r--test/csv/base.rb3
-rwxr-xr-xtest/csv/test_csv_parsing.rb1
-rwxr-xr-xtest/csv/test_csv_writing.rb1
-rwxr-xr-xtest/csv/test_data_converters.rb5
-rwxr-xr-xtest/csv/test_encodings.rb39
-rwxr-xr-xtest/csv/test_features.rb55
-rwxr-xr-xtest/csv/test_headers.rb35
-rwxr-xr-xtest/csv/test_interface.rb13
-rwxr-xr-xtest/csv/test_row.rb48
-rwxr-xr-xtest/csv/test_table.rb28
-rw-r--r--test/csv/ts_all.rb1
-rw-r--r--test/date/test_date.rb6
-rw-r--r--test/date/test_date_arith.rb31
-rw-r--r--test/date/test_date_attr.rb10
-rw-r--r--test/date/test_date_base.rb1
-rw-r--r--test/date/test_date_compat.rb1
-rw-r--r--test/date/test_date_conv.rb1
-rw-r--r--test/date/test_date_marshal.rb1
-rw-r--r--test/date/test_date_new.rb1
-rw-r--r--test/date/test_date_parse.rb14
-rw-r--r--test/date/test_date_strftime.rb9
-rw-r--r--test/date/test_date_strptime.rb23
-rw-r--r--test/date/test_switch_hitter.rb3
-rw-r--r--test/dbm/test_dbm.rb19
-rw-r--r--test/digest/digest/foo.rb11
-rw-r--r--[-rwxr-xr-x]test/digest/test_digest.rb79
-rw-r--r--test/digest/test_digest_extend.rb5
-rw-r--r--test/digest/test_digest_hmac.rb2
-rw-r--r--test/dl/test_base.rb146
-rw-r--r--test/dl/test_c_struct_entry.rb55
-rw-r--r--test/dl/test_c_union_entity.rb31
-rw-r--r--test/dl/test_callback.rb72
-rw-r--r--test/dl/test_cfunc.rb80
-rw-r--r--test/dl/test_cparser.rb33
-rw-r--r--test/dl/test_cptr.rb226
-rw-r--r--test/dl/test_dl2.rb140
-rw-r--r--test/dl/test_func.rb184
-rw-r--r--test/dl/test_handle.rb191
-rw-r--r--test/dl/test_import.rb165
-rw-r--r--test/dl/test_win32.rb54
-rw-r--r--test/drb/drbtest.rb70
-rw-r--r--test/drb/ignore_test_drb.rb4
-rw-r--r--test/drb/test_acl.rb5
-rw-r--r--test/drb/test_drb.rb38
-rw-r--r--test/drb/test_drbssl.rb15
-rw-r--r--test/drb/test_drbunix.rb14
-rw-r--r--test/drb/ut_array.rb2
-rw-r--r--test/drb/ut_array_drbssl.rb12
-rw-r--r--test/drb/ut_array_drbunix.rb2
-rw-r--r--test/drb/ut_drb.rb9
-rw-r--r--test/drb/ut_drb_drbssl.rb14
-rw-r--r--test/drb/ut_drb_drbunix.rb4
-rw-r--r--test/drb/ut_eq.rb9
-rw-r--r--test/drb/ut_eval.rb8
-rw-r--r--test/drb/ut_large.rb8
-rw-r--r--test/drb/ut_port.rb2
-rw-r--r--test/drb/ut_safe1.rb2
-rw-r--r--test/drb/ut_timerholder.rb75
-rw-r--r--test/dtrace/dummy.rb1
-rw-r--r--test/dtrace/helper.rb12
-rw-r--r--test/dtrace/test_array_create.rb1
-rw-r--r--test/dtrace/test_cmethod.rb1
-rw-r--r--test/dtrace/test_function_entry.rb1
-rw-r--r--test/dtrace/test_gc.rb1
-rw-r--r--test/dtrace/test_hash_create.rb1
-rw-r--r--test/dtrace/test_load.rb1
-rw-r--r--test/dtrace/test_method_cache.rb1
-rw-r--r--test/dtrace/test_object_create_start.rb1
-rw-r--r--test/dtrace/test_raise.rb1
-rw-r--r--test/dtrace/test_require.rb1
-rw-r--r--test/dtrace/test_singleton_function.rb1
-rw-r--r--test/dtrace/test_string.rb1
-rw-r--r--test/erb/test_erb.rb44
-rw-r--r--test/erb/test_erb_command.rb12
-rw-r--r--test/erb/test_erb_m17n.rb3
-rw-r--r--test/etc/test_etc.rb71
-rw-r--r--test/excludes/TestException.rb9
-rw-r--r--test/excludes/TestIO_Console.rb2
-rw-r--r--test/excludes/TestISeq.rb1
-rw-r--r--test/excludes/TestThread.rb2
-rw-r--r--test/fiddle/helper.rb5
-rw-r--r--test/fiddle/test_c_struct_entry.rb1
-rw-r--r--test/fiddle/test_c_union_entity.rb1
-rw-r--r--test/fiddle/test_closure.rb1
-rw-r--r--test/fiddle/test_cparser.rb178
-rw-r--r--test/fiddle/test_fiddle.rb1
-rw-r--r--test/fiddle/test_func.rb1
-rw-r--r--test/fiddle/test_function.rb40
-rw-r--r--test/fiddle/test_handle.rb100
-rw-r--r--test/fiddle/test_import.rb11
-rw-r--r--test/fiddle/test_pointer.rb10
-rw-r--r--test/fileutils/clobber.rb1
-rw-r--r--test/fileutils/fileasserts.rb19
-rw-r--r--test/fileutils/test_dryrun.rb1
-rw-r--r--test/fileutils/test_fileutils.rb456
-rw-r--r--test/fileutils/test_nowrite.rb1
-rw-r--r--test/fileutils/test_verbose.rb1
-rw-r--r--test/fileutils/visibility_tests.rb1
-rw-r--r--test/gdbm/test_gdbm.rb26
-rw-r--r--test/inlinetest.rb55
-rw-r--r--test/io/console/test_io_console.rb133
-rw-r--r--test/io/nonblock/test_flush.rb17
-rw-r--r--test/io/wait/test_io_wait.rb19
-rw-r--r--test/irb/test_completion.rb2
-rw-r--r--test/irb/test_option.rb2
-rw-r--r--test/irb/test_raise_no_backtrace_exception.rb14
-rw-r--r--test/json/setup_variant.rb1
-rwxr-xr-xtest/json/test_json.rb102
-rw-r--r--[-rwxr-xr-x]test/json/test_json_addition.rb5
-rw-r--r--test/json/test_json_encoding.rb3
-rw-r--r--[-rwxr-xr-x]test/json/test_json_fixtures.rb3
-rw-r--r--[-rwxr-xr-x]test/json/test_json_generate.rb88
-rw-r--r--test/json/test_json_generic_object.rb1
-rw-r--r--test/json/test_json_string_matching.rb1
-rw-r--r--[-rwxr-xr-x]test/json/test_json_unicode.rb1
-rw-r--r--test/lib/envutil.rb267
-rw-r--r--test/lib/find_executable.rb22
-rw-r--r--test/lib/iseq_loader_checker.rb75
-rw-r--r--test/lib/leakchecker.rb201
-rw-r--r--test/lib/memory_status.rb (renamed from test/ruby/memory_status.rb)63
-rw-r--r--test/lib/minitest/README.txt (renamed from lib/minitest/README.txt)0
-rw-r--r--test/lib/minitest/autorun.rb14
-rw-r--r--test/lib/minitest/benchmark.rb (renamed from lib/minitest/benchmark.rb)7
-rw-r--r--test/lib/minitest/mock.rb (renamed from lib/minitest/mock.rb)6
-rw-r--r--test/lib/minitest/unit.rb (renamed from lib/minitest/unit.rb)70
-rw-r--r--test/lib/profile_test_all.rb (renamed from test/profile_test_all.rb)1
-rw-r--r--test/lib/test/unit.rb (renamed from lib/test/unit.rb)753
-rw-r--r--test/lib/test/unit/assertions.rb854
-rw-r--r--test/lib/test/unit/parallel.rb (renamed from lib/test/unit/parallel.rb)22
-rw-r--r--test/lib/test/unit/testcase.rb (renamed from lib/test/unit/testcase.rb)2
-rw-r--r--test/lib/tracepointchecker.rb119
-rw-r--r--test/lib/with_different_ofs.rb (renamed from test/with_different_ofs.rb)1
-rw-r--r--test/lib/zombie_hunter.rb9
-rw-r--r--test/logger/test_logdevice.rb655
-rw-r--r--test/logger/test_logger.rb455
-rw-r--r--test/logger/test_severity.rb16
-rw-r--r--test/matrix/test_matrix.rb194
-rw-r--r--test/matrix/test_vector.rb71
-rw-r--r--test/minitest/metametameta.rb9
-rw-r--r--test/minitest/test_minitest_benchmark.rb6
-rw-r--r--test/minitest/test_minitest_mock.rb10
-rw-r--r--test/minitest/test_minitest_spec.rb811
-rw-r--r--test/minitest/test_minitest_unit.rb93
-rw-r--r--test/misc/test_ruby_mode.rb12
-rw-r--r--test/mkmf/base.rb18
-rw-r--r--test/mkmf/test_config.rb2
-rw-r--r--test/mkmf/test_constant.rb1
-rw-r--r--test/mkmf/test_convertible.rb1
-rw-r--r--test/mkmf/test_find_executable.rb1
-rw-r--r--test/mkmf/test_flags.rb22
-rw-r--r--test/mkmf/test_framework.rb13
-rw-r--r--test/mkmf/test_have_func.rb1
-rw-r--r--test/mkmf/test_have_library.rb1
-rw-r--r--test/mkmf/test_have_macro.rb1
-rw-r--r--test/mkmf/test_libs.rb1
-rw-r--r--test/mkmf/test_signedness.rb1
-rw-r--r--test/mkmf/test_sizeof.rb1
-rw-r--r--test/monitor/test_monitor.rb158
-rw-r--r--test/net/ftp/test_buffered_socket.rb42
-rw-r--r--test/net/ftp/test_ftp.rb1174
-rw-r--r--test/net/ftp/test_mlsx_entry.rb98
-rw-r--r--test/net/http/test_buffered_io.rb1
-rw-r--r--test/net/http/test_http.rb166
-rw-r--r--test/net/http/test_http_request.rb1
-rw-r--r--test/net/http/test_httpheader.rb20
-rw-r--r--test/net/http/test_httpresponse.rb141
-rw-r--r--test/net/http/test_httpresponses.rb1
-rw-r--r--test/net/http/test_https.rb46
-rw-r--r--test/net/http/test_https_proxy.rb32
-rw-r--r--test/net/http/utils.rb22
-rw-r--r--test/net/imap/test_imap.rb475
-rw-r--r--test/net/imap/test_imap_response_parser.rb53
-rw-r--r--test/net/pop/test_pop.rb31
-rw-r--r--test/net/protocol/test_protocol.rb10
-rw-r--r--test/net/smtp/test_response.rb5
-rw-r--r--test/net/smtp/test_smtp.rb125
-rw-r--r--test/net/smtp/test_ssl_socket.rb12
-rw-r--r--test/nkf/test_kconv.rb1
-rw-r--r--test/nkf/test_nkf.rb1
-rw-r--r--test/objspace/test_objspace.rb133
-rw-r--r--test/open-uri/test_open-uri.rb206
-rw-r--r--test/open-uri/test_ssl.rb144
-rw-r--r--test/openssl/ssl_server.rb81
-rw-r--r--test/openssl/test_asn1.rb28
-rw-r--r--test/openssl/test_bn.rb38
-rw-r--r--test/openssl/test_buffering.rb5
-rw-r--r--test/openssl/test_cipher.rb39
-rw-r--r--test/openssl/test_config.rb7
-rw-r--r--test/openssl/test_digest.rb18
-rw-r--r--test/openssl/test_engine.rb3
-rw-r--r--test/openssl/test_fips.rb3
-rw-r--r--test/openssl/test_hmac.rb12
-rw-r--r--test/openssl/test_ns_spki.rb3
-rw-r--r--test/openssl/test_ocsp.rb3
-rw-r--r--test/openssl/test_pair.rb286
-rw-r--r--test/openssl/test_partial_record_read.rb35
-rw-r--r--test/openssl/test_pkcs12.rb9
-rw-r--r--test/openssl/test_pkcs5.rb3
-rw-r--r--test/openssl/test_pkcs7.rb144
-rw-r--r--test/openssl/test_pkey_dh.rb26
-rw-r--r--test/openssl/test_pkey_dsa.rb3
-rw-r--r--test/openssl/test_pkey_ec.rb3
-rw-r--r--test/openssl/test_pkey_rsa.rb7
-rw-r--r--test/openssl/test_random.rb17
-rw-r--r--test/openssl/test_ssl.rb651
-rw-r--r--test/openssl/test_ssl_session.rb128
-rw-r--r--test/openssl/test_x509cert.rb38
-rw-r--r--test/openssl/test_x509crl.rb3
-rw-r--r--test/openssl/test_x509ext.rb27
-rw-r--r--test/openssl/test_x509name.rb3
-rw-r--r--test/openssl/test_x509req.rb33
-rw-r--r--test/openssl/test_x509store.rb30
-rw-r--r--test/openssl/utils.rb129
-rw-r--r--test/optparse/test_acceptable.rb46
-rw-r--r--test/optparse/test_autoconf.rb1
-rw-r--r--test/optparse/test_bash_completion.rb1
-rw-r--r--test/optparse/test_cclass.rb18
-rw-r--r--test/optparse/test_getopts.rb1
-rw-r--r--test/optparse/test_noarg.rb1
-rw-r--r--test/optparse/test_optarg.rb1
-rw-r--r--test/optparse/test_optparse.rb1
-rw-r--r--test/optparse/test_placearg.rb1
-rw-r--r--test/optparse/test_reqarg.rb1
-rw-r--r--test/optparse/test_summary.rb1
-rw-r--r--test/optparse/test_zsh_completion.rb1
-rw-r--r--test/ostruct/test_ostruct.rb56
-rw-r--r--test/pathname/test_pathname.rb128
-rw-r--r--test/psych/handlers/test_recorder.rb1
-rw-r--r--test/psych/helper.rb12
-rw-r--r--test/psych/json/test_stream.rb3
-rw-r--r--test/psych/nodes/test_enumerable.rb1
-rw-r--r--test/psych/test_alias_and_anchor.rb1
-rw-r--r--test/psych/test_array.rb1
-rw-r--r--test/psych/test_boolean.rb1
-rw-r--r--test/psych/test_class.rb1
-rw-r--r--test/psych/test_coder.rb23
-rw-r--r--test/psych/test_date_time.rb1
-rw-r--r--test/psych/test_deprecated.rb1
-rw-r--r--test/psych/test_document.rb1
-rw-r--r--test/psych/test_emitter.rb22
-rw-r--r--test/psych/test_encoding.rb10
-rw-r--r--test/psych/test_engine_manager.rb47
-rw-r--r--test/psych/test_exception.rb7
-rw-r--r--test/psych/test_hash.rb51
-rw-r--r--test/psych/test_json_tree.rb3
-rw-r--r--test/psych/test_marshalable.rb55
-rw-r--r--test/psych/test_merge_keys.rb31
-rw-r--r--test/psych/test_nil.rb1
-rw-r--r--test/psych/test_null.rb1
-rw-r--r--test/psych/test_numeric.rb1
-rw-r--r--test/psych/test_object.rb1
-rw-r--r--test/psych/test_object_references.rb5
-rw-r--r--test/psych/test_omap.rb1
-rw-r--r--test/psych/test_parser.rb1
-rw-r--r--test/psych/test_psych.rb18
-rw-r--r--test/psych/test_safe_load.rb1
-rw-r--r--test/psych/test_scalar.rb1
-rw-r--r--test/psych/test_scalar_scanner.rb1
-rw-r--r--test/psych/test_serialize_subclasses.rb1
-rw-r--r--test/psych/test_set.rb1
-rw-r--r--test/psych/test_stream.rb1
-rw-r--r--test/psych/test_string.rb71
-rw-r--r--test/psych/test_struct.rb1
-rw-r--r--test/psych/test_symbol.rb9
-rw-r--r--test/psych/test_tainted.rb1
-rw-r--r--test/psych/test_to_yaml_properties.rb3
-rw-r--r--test/psych/test_tree_builder.rb1
-rw-r--r--test/psych/test_yaml.rb8
-rw-r--r--test/psych/test_yamldbm.rb6
-rw-r--r--test/psych/test_yamlstore.rb3
-rw-r--r--test/psych/visitors/test_depth_first.rb1
-rw-r--r--test/psych/visitors/test_emitter.rb1
-rw-r--r--test/psych/visitors/test_to_ruby.rb24
-rw-r--r--test/psych/visitors/test_yaml_tree.rb7
-rw-r--r--test/rake/file_creation.rb34
-rw-r--r--test/rake/helper.rb128
-rw-r--r--test/rake/support/rakefile_definitions.rb444
-rw-r--r--test/rake/support/ruby_runner.rb33
-rw-r--r--test/rake/test_private_reader.rb42
-rw-r--r--test/rake/test_rake.rb40
-rw-r--r--test/rake/test_rake_application.rb517
-rw-r--r--test/rake/test_rake_application_options.rb457
-rw-r--r--test/rake/test_rake_backtrace.rb113
-rw-r--r--test/rake/test_rake_clean.rb52
-rw-r--r--test/rake/test_rake_definitions.rb79
-rw-r--r--test/rake/test_rake_directory_task.rb57
-rw-r--r--test/rake/test_rake_dsl.rb40
-rw-r--r--test/rake/test_rake_early_time.rb31
-rw-r--r--test/rake/test_rake_extension.rb59
-rw-r--r--test/rake/test_rake_file_creation_task.rb56
-rw-r--r--test/rake/test_rake_file_list.rb627
-rw-r--r--test/rake/test_rake_file_list_path_map.rb8
-rw-r--r--test/rake/test_rake_file_task.rb122
-rw-r--r--test/rake/test_rake_file_utils.rb309
-rw-r--r--test/rake/test_rake_ftp_file.rb74
-rw-r--r--test/rake/test_rake_functional.rb466
-rw-r--r--test/rake/test_rake_invocation_chain.rb64
-rw-r--r--test/rake/test_rake_linked_list.rb84
-rw-r--r--test/rake/test_rake_makefile_loader.rb46
-rw-r--r--test/rake/test_rake_multi_task.rb58
-rw-r--r--test/rake/test_rake_name_space.rb43
-rw-r--r--test/rake/test_rake_package_task.rb79
-rw-r--r--test/rake/test_rake_path_map.rb168
-rw-r--r--test/rake/test_rake_path_map_explode.rb34
-rw-r--r--test/rake/test_rake_path_map_partial.rb18
-rw-r--r--test/rake/test_rake_pseudo_status.rb21
-rw-r--r--test/rake/test_rake_rake_test_loader.rb20
-rw-r--r--test/rake/test_rake_reduce_compat.rb26
-rw-r--r--test/rake/test_rake_require.rb40
-rw-r--r--test/rake/test_rake_rules.rb362
-rw-r--r--test/rake/test_rake_scope.rb44
-rw-r--r--test/rake/test_rake_task.rb376
-rw-r--r--test/rake/test_rake_task_argument_parsing.rb103
-rw-r--r--test/rake/test_rake_task_arguments.rb121
-rw-r--r--test/rake/test_rake_task_lib.rb9
-rw-r--r--test/rake/test_rake_task_manager.rb158
-rw-r--r--test/rake/test_rake_task_manager_argument_resolution.rb19
-rw-r--r--test/rake/test_rake_task_with_arguments.rb171
-rw-r--r--test/rake/test_rake_test_task.rb119
-rw-r--r--test/rake/test_rake_thread_pool.rb142
-rw-r--r--test/rake/test_rake_top_level_functions.rb71
-rw-r--r--test/rake/test_rake_win32.rb72
-rw-r--r--test/rake/test_thread_history_display.rb101
-rw-r--r--test/rake/test_trace_output.rb52
-rw-r--r--test/rdoc/test.ja.large.rdoc3
-rw-r--r--test/rdoc/test_attribute_manager.rb120
-rw-r--r--test/rdoc/test_rdoc_alias.rb1
-rw-r--r--test/rdoc/test_rdoc_any_method.rb30
-rw-r--r--test/rdoc/test_rdoc_attr.rb1
-rw-r--r--test/rdoc/test_rdoc_class_module.rb1
-rw-r--r--test/rdoc/test_rdoc_code_object.rb1
-rw-r--r--test/rdoc/test_rdoc_comment.rb1
-rw-r--r--test/rdoc/test_rdoc_constant.rb31
-rw-r--r--test/rdoc/test_rdoc_context.rb3
-rw-r--r--test/rdoc/test_rdoc_context_section.rb1
-rw-r--r--test/rdoc/test_rdoc_cross_reference.rb1
-rw-r--r--test/rdoc/test_rdoc_encoding.rb24
-rw-r--r--test/rdoc/test_rdoc_extend.rb1
-rw-r--r--test/rdoc/test_rdoc_generator_darkfish.rb5
-rw-r--r--test/rdoc/test_rdoc_generator_json_index.rb61
-rw-r--r--test/rdoc/test_rdoc_generator_markup.rb3
-rw-r--r--test/rdoc/test_rdoc_generator_pot.rb92
-rw-r--r--test/rdoc/test_rdoc_generator_pot_po.rb52
-rw-r--r--test/rdoc/test_rdoc_generator_pot_po_entry.rb140
-rw-r--r--test/rdoc/test_rdoc_generator_ri.rb1
-rw-r--r--test/rdoc/test_rdoc_i18n_locale.rb74
-rw-r--r--test/rdoc/test_rdoc_i18n_text.rb124
-rw-r--r--test/rdoc/test_rdoc_include.rb1
-rw-r--r--test/rdoc/test_rdoc_markdown.rb1
-rw-r--r--test/rdoc/test_rdoc_markdown_test.rb1
-rw-r--r--test/rdoc/test_rdoc_markup.rb1
-rw-r--r--test/rdoc/test_rdoc_markup_attribute_manager.rb7
-rw-r--r--test/rdoc/test_rdoc_markup_attributes.rb1
-rw-r--r--test/rdoc/test_rdoc_markup_document.rb1
-rw-r--r--test/rdoc/test_rdoc_markup_formatter.rb1
-rw-r--r--test/rdoc/test_rdoc_markup_hard_break.rb1
-rw-r--r--test/rdoc/test_rdoc_markup_heading.rb9
-rw-r--r--test/rdoc/test_rdoc_markup_include.rb1
-rw-r--r--test/rdoc/test_rdoc_markup_indented_paragraph.rb1
-rw-r--r--test/rdoc/test_rdoc_markup_paragraph.rb1
-rw-r--r--test/rdoc/test_rdoc_markup_parser.rb1
-rw-r--r--test/rdoc/test_rdoc_markup_pre_process.rb3
-rw-r--r--test/rdoc/test_rdoc_markup_raw.rb1
-rw-r--r--test/rdoc/test_rdoc_markup_to_ansi.rb1
-rw-r--r--test/rdoc/test_rdoc_markup_to_bs.rb1
-rw-r--r--test/rdoc/test_rdoc_markup_to_html.rb72
-rw-r--r--test/rdoc/test_rdoc_markup_to_html_crossref.rb1
-rw-r--r--test/rdoc/test_rdoc_markup_to_html_snippet.rb16
-rw-r--r--test/rdoc/test_rdoc_markup_to_joined_paragraph.rb1
-rw-r--r--test/rdoc/test_rdoc_markup_to_label.rb9
-rw-r--r--test/rdoc/test_rdoc_markup_to_markdown.rb1
-rw-r--r--test/rdoc/test_rdoc_markup_to_rdoc.rb1
-rw-r--r--test/rdoc/test_rdoc_markup_to_table_of_contents.rb1
-rw-r--r--test/rdoc/test_rdoc_markup_to_tt_only.rb1
-rw-r--r--test/rdoc/test_rdoc_markup_verbatim.rb1
-rw-r--r--test/rdoc/test_rdoc_method_attr.rb33
-rw-r--r--test/rdoc/test_rdoc_normal_class.rb9
-rw-r--r--test/rdoc/test_rdoc_normal_module.rb1
-rw-r--r--test/rdoc/test_rdoc_options.rb20
-rw-r--r--test/rdoc/test_rdoc_parser.rb18
-rw-r--r--test/rdoc/test_rdoc_parser_c.rb74
-rw-r--r--test/rdoc/test_rdoc_parser_changelog.rb3
-rw-r--r--test/rdoc/test_rdoc_parser_markdown.rb3
-rw-r--r--test/rdoc/test_rdoc_parser_rd.rb3
-rw-r--r--test/rdoc/test_rdoc_parser_ruby.rb63
-rw-r--r--test/rdoc/test_rdoc_parser_simple.rb3
-rw-r--r--test/rdoc/test_rdoc_rd.rb1
-rw-r--r--test/rdoc/test_rdoc_rd_block_parser.rb5
-rw-r--r--test/rdoc/test_rdoc_rd_inline.rb1
-rw-r--r--test/rdoc/test_rdoc_rd_inline_parser.rb1
-rw-r--r--test/rdoc/test_rdoc_rdoc.rb28
-rw-r--r--test/rdoc/test_rdoc_require.rb1
-rw-r--r--test/rdoc/test_rdoc_ri_driver.rb1
-rw-r--r--test/rdoc/test_rdoc_ri_paths.rb1
-rw-r--r--test/rdoc/test_rdoc_ruby_lex.rb12
-rw-r--r--test/rdoc/test_rdoc_ruby_token.rb1
-rw-r--r--test/rdoc/test_rdoc_rubygems_hook.rb4
-rw-r--r--test/rdoc/test_rdoc_servlet.rb4
-rw-r--r--test/rdoc/test_rdoc_single_class.rb19
-rw-r--r--test/rdoc/test_rdoc_stats.rb56
-rw-r--r--test/rdoc/test_rdoc_store.rb1
-rw-r--r--test/rdoc/test_rdoc_task.rb58
-rw-r--r--test/rdoc/test_rdoc_text.rb4
-rw-r--r--test/rdoc/test_rdoc_token_stream.rb1
-rw-r--r--test/rdoc/test_rdoc_tom_doc.rb1
-rw-r--r--test/rdoc/test_rdoc_top_level.rb1
-rw-r--r--test/rdoc/xref_data.rb1
-rw-r--r--test/rdoc/xref_test_case.rb1
-rw-r--r--test/readline/test_readline.rb18
-rw-r--r--test/readline/test_readline_history.rb1
-rw-r--r--test/resolv/test_addr.rb4
-rw-r--r--test/resolv/test_dns.rb196
-rw-r--r--test/resolv/test_resource.rb22
-rw-r--r--test/rexml/data/utf16.xml (renamed from test/rexml/data/ticket_110_utf16.xml)bin207464 -> 207464 bytes-rw-r--r--test/rexml/listener.rb95
-rw-r--r--test/rexml/parse/test_document_type_declaration.rb57
-rw-r--r--test/rexml/parse/test_notation_declaration.rb119
-rw-r--r--test/rexml/parser/test_sax2.rb3
-rw-r--r--test/rexml/parser/test_stream.rb32
-rw-r--r--test/rexml/parser/test_tree.rb3
-rw-r--r--test/rexml/parser/test_ultra_light.rb3
-rw-r--r--test/rexml/rexml_test_utils.rb1
-rw-r--r--test/rexml/test_attributes.rb343
-rw-r--r--test/rexml/test_attributes_mixin.rb49
-rw-r--r--test/rexml/test_changing_encoding.rb68
-rw-r--r--test/rexml/test_comment.rb3
-rw-r--r--test/rexml/test_contrib.rb882
-rw-r--r--test/rexml/test_core.rb2458
-rw-r--r--test/rexml/test_doctype.rb191
-rw-r--r--test/rexml/test_document.rb475
-rw-r--r--test/rexml/test_elements.rb197
-rw-r--r--test/rexml/test_encoding.rb162
-rw-r--r--test/rexml/test_encoding_2.rb59
-rw-r--r--test/rexml/test_entity.rb329
-rw-r--r--test/rexml/test_functions.rb415
-rw-r--r--test/rexml/test_functions_number.rb53
-rw-r--r--test/rexml/test_jaxen.rb210
-rw-r--r--test/rexml/test_light.rb171
-rw-r--r--test/rexml/test_lightparser.rb18
-rw-r--r--test/rexml/test_listener.rb202
-rw-r--r--test/rexml/test_martin_fowler.rb41
-rw-r--r--test/rexml/test_namespace.rb55
-rw-r--r--test/rexml/test_order.rb175
-rw-r--r--test/rexml/test_preceding_sibling.rb57
-rw-r--r--test/rexml/test_pullparser.rb161
-rw-r--r--test/rexml/test_rexml_issuezilla.rb21
-rw-r--r--test/rexml/test_sax.rb484
-rw-r--r--test/rexml/test_stream.rb195
-rw-r--r--test/rexml/test_text.rb29
-rw-r--r--test/rexml/test_ticket_80.rb47
-rw-r--r--test/rexml/test_validation_rng.rb617
-rw-r--r--test/rexml/test_xml_declaration.rb43
-rw-r--r--test/rexml/test_xpath.rb1079
-rw-r--r--test/rexml/test_xpath_attribute_query.rb89
-rw-r--r--test/rexml/test_xpath_msw.rb38
-rw-r--r--test/rexml/test_xpath_pred.rb80
-rw-r--r--test/rexml/test_xpathtext.rb72
-rw-r--r--test/rexml/xpath/test_attribute.rb30
-rw-r--r--test/rexml/xpath/test_axis_preceding_sibling.rb40
-rw-r--r--test/rexml/xpath/test_base.rb1090
-rw-r--r--test/rexml/xpath/test_node.rb43
-rw-r--r--test/rexml/xpath/test_predicate.rb83
-rw-r--r--test/rexml/xpath/test_text.rb75
-rw-r--r--test/rinda/test_rinda.rb95
-rw-r--r--test/rinda/test_tuplebag.rb1
-rw-r--r--test/ripper/dummyparser.rb9
-rw-r--r--test/ripper/test_files.rb10
-rw-r--r--test/ripper/test_filter.rb3
-rw-r--r--test/ripper/test_lexer.rb35
-rw-r--r--test/ripper/test_parser_events.rb212
-rw-r--r--test/ripper/test_ripper.rb34
-rw-r--r--test/ripper/test_scanner_events.rb36
-rw-r--r--test/ripper/test_sexp.rb85
-rw-r--r--test/rss/rss-assertions.rb3
-rw-r--r--test/rss/rss-testcase.rb1
-rw-r--r--test/rss/test_1.0.rb1
-rw-r--r--test/rss/test_2.0.rb1
-rw-r--r--test/rss/test_accessor.rb1
-rw-r--r--test/rss/test_atom.rb1
-rw-r--r--test/rss/test_content.rb1
-rw-r--r--test/rss/test_dublincore.rb1
-rw-r--r--test/rss/test_image.rb1
-rw-r--r--test/rss/test_inherit.rb1
-rw-r--r--test/rss/test_itunes.rb1
-rw-r--r--test/rss/test_maker_0.9.rb1
-rw-r--r--test/rss/test_maker_1.0.rb1
-rw-r--r--test/rss/test_maker_2.0.rb1
-rw-r--r--test/rss/test_maker_atom_entry.rb1
-rw-r--r--test/rss/test_maker_atom_feed.rb1
-rw-r--r--test/rss/test_maker_content.rb1
-rw-r--r--test/rss/test_maker_dc.rb1
-rw-r--r--test/rss/test_maker_image.rb1
-rw-r--r--test/rss/test_maker_itunes.rb5
-rw-r--r--test/rss/test_maker_slash.rb1
-rw-r--r--test/rss/test_maker_sy.rb1
-rw-r--r--test/rss/test_maker_taxo.rb1
-rw-r--r--test/rss/test_maker_trackback.rb1
-rw-r--r--test/rss/test_maker_xml-stylesheet.rb1
-rw-r--r--test/rss/test_parser.rb1
-rw-r--r--test/rss/test_parser_1.0.rb1
-rw-r--r--test/rss/test_parser_2.0.rb1
-rw-r--r--test/rss/test_parser_atom_entry.rb1
-rw-r--r--test/rss/test_parser_atom_feed.rb1
-rw-r--r--test/rss/test_setup_maker_0.9.rb1
-rw-r--r--test/rss/test_setup_maker_1.0.rb1
-rw-r--r--test/rss/test_setup_maker_2.0.rb1
-rw-r--r--test/rss/test_setup_maker_atom_entry.rb1
-rw-r--r--test/rss/test_setup_maker_atom_feed.rb1
-rw-r--r--test/rss/test_setup_maker_itunes.rb2
-rw-r--r--test/rss/test_setup_maker_slash.rb1
-rw-r--r--test/rss/test_slash.rb1
-rw-r--r--test/rss/test_syndication.rb1
-rw-r--r--test/rss/test_taxonomy.rb1
-rw-r--r--test/rss/test_to_s.rb31
-rw-r--r--test/rss/test_trackback.rb1
-rw-r--r--test/rss/test_version.rb1
-rw-r--r--test/rss/test_xml-stylesheet.rb1
-rw-r--r--test/ruby/allpairs.rb1
-rw-r--r--test/ruby/beginmainend.rb5
-rw-r--r--test/ruby/bug-11928.rb14
-rw-r--r--test/ruby/bug-13526.rb20
-rw-r--r--test/ruby/enc/test_big5.rb1
-rw-r--r--test/ruby/enc/test_cp949.rb1
-rw-r--r--test/ruby/enc/test_emoji.rb1
-rw-r--r--test/ruby/enc/test_euc_jp.rb1
-rw-r--r--test/ruby/enc/test_euc_kr.rb9
-rw-r--r--test/ruby/enc/test_euc_tw.rb1
-rw-r--r--test/ruby/enc/test_gb18030.rb1
-rw-r--r--test/ruby/enc/test_gbk.rb1
-rw-r--r--test/ruby/enc/test_iso_8859.rb1
-rw-r--r--test/ruby/enc/test_koi8.rb1
-rw-r--r--test/ruby/enc/test_shift_jis.rb1
-rw-r--r--test/ruby/enc/test_utf16.rb1
-rw-r--r--test/ruby/enc/test_utf32.rb69
-rw-r--r--test/ruby/enc/test_windows_1251.rb1
-rw-r--r--test/ruby/enc/test_windows_1252.rb26
-rw-r--r--test/ruby/endblockwarn_rb12
-rw-r--r--test/ruby/envutil.rb458
-rw-r--r--test/ruby/lbtest.rb1
-rw-r--r--test/ruby/marshaltestlib.rb1
-rw-r--r--test/ruby/sentence.rb1
-rw-r--r--test/ruby/test_alias.rb73
-rw-r--r--test/ruby/test_argf.rb71
-rw-r--r--test/ruby/test_arity.rb45
-rw-r--r--test/ruby/test_array.rb300
-rw-r--r--test/ruby/test_assignment.rb74
-rw-r--r--test/ruby/test_autoload.rb152
-rw-r--r--test/ruby/test_backtrace.rb112
-rw-r--r--test/ruby/test_basicinstructions.rb1
-rw-r--r--test/ruby/test_beginendblock.rb182
-rw-r--r--test/ruby/test_bignum.rb15
-rw-r--r--test/ruby/test_call.rb82
-rw-r--r--test/ruby/test_case.rb23
-rw-r--r--test/ruby/test_class.rb219
-rw-r--r--test/ruby/test_clone.rb1
-rw-r--r--test/ruby/test_comparable.rb17
-rw-r--r--test/ruby/test_complex.rb433
-rw-r--r--test/ruby/test_complex2.rb1
-rw-r--r--test/ruby/test_complexrational.rb1
-rw-r--r--test/ruby/test_condition.rb1
-rw-r--r--test/ruby/test_const.rb20
-rw-r--r--test/ruby/test_continuation.rb4
-rw-r--r--test/ruby/test_defined.rb48
-rw-r--r--test/ruby/test_dir.rb89
-rw-r--r--test/ruby/test_dir_m17n.rb131
-rw-r--r--test/ruby/test_econv.rb18
-rw-r--r--test/ruby/test_encoding.rb9
-rw-r--r--test/ruby/test_enum.rb416
-rw-r--r--test/ruby/test_enumerator.rb24
-rw-r--r--test/ruby/test_env.rb101
-rw-r--r--test/ruby/test_eval.rb58
-rw-r--r--test/ruby/test_exception.rb432
-rw-r--r--test/ruby/test_extlibs.rb87
-rw-r--r--test/ruby/test_fiber.rb12
-rw-r--r--test/ruby/test_file.rb89
-rw-r--r--test/ruby/test_file_exhaustive.rb1116
-rw-r--r--test/ruby/test_fixnum.rb25
-rw-r--r--test/ruby/test_flip.rb2
-rw-r--r--test/ruby/test_float.rb107
-rw-r--r--test/ruby/test_fnmatch.rb2
-rw-r--r--test/ruby/test_gc.rb152
-rw-r--r--test/ruby/test_hash.rb187
-rw-r--r--test/ruby/test_ifunless.rb1
-rw-r--r--test/ruby/test_integer.rb1
-rw-r--r--test/ruby/test_integer_comb.rb5
-rw-r--r--test/ruby/test_io.rb804
-rw-r--r--test/ruby/test_io_m17n.rb163
-rw-r--r--test/ruby/test_iseq.rb124
-rw-r--r--test/ruby/test_iterator.rb1
-rw-r--r--test/ruby/test_keyword.rb210
-rw-r--r--test/ruby/test_lambda.rb51
-rw-r--r--test/ruby/test_lazy_enumerator.rb59
-rw-r--r--test/ruby/test_literal.rb73
-rw-r--r--test/ruby/test_m17n.rb154
-rw-r--r--test/ruby/test_m17n_comb.rb99
-rw-r--r--test/ruby/test_marshal.rb172
-rw-r--r--test/ruby/test_math.rb166
-rw-r--r--test/ruby/test_metaclass.rb1
-rw-r--r--test/ruby/test_method.rb279
-rw-r--r--test/ruby/test_mixed_unicode_escapes.rb3
-rw-r--r--test/ruby/test_module.rb338
-rw-r--r--test/ruby/test_not.rb1
-rw-r--r--test/ruby/test_notimp.rb1
-rw-r--r--test/ruby/test_numeric.rb230
-rw-r--r--test/ruby/test_object.rb126
-rw-r--r--test/ruby/test_objectspace.rb107
-rw-r--r--test/ruby/test_optimization.rb379
-rw-r--r--test/ruby/test_pack.rb126
-rw-r--r--test/ruby/test_parse.rb105
-rw-r--r--test/ruby/test_path.rb4
-rw-r--r--test/ruby/test_pipe.rb14
-rw-r--r--test/ruby/test_primitive.rb1
-rw-r--r--test/ruby/test_proc.rb71
-rw-r--r--test/ruby/test_process.rb680
-rw-r--r--test/ruby/test_rand.rb24
-rw-r--r--test/ruby/test_range.rb68
-rw-r--r--test/ruby/test_rational.rb396
-rw-r--r--test/ruby/test_rational2.rb1
-rw-r--r--test/ruby/test_readpartial.rb9
-rw-r--r--test/ruby/test_refinement.rb573
-rw-r--r--test/ruby/test_regexp.rb112
-rw-r--r--test/ruby/test_require.rb141
-rw-r--r--test/ruby/test_rubyoptions.rb318
-rw-r--r--test/ruby/test_rubyvm.rb2
-rw-r--r--test/ruby/test_settracefunc.rb600
-rw-r--r--test/ruby/test_signal.rb86
-rw-r--r--test/ruby/test_sleep.rb15
-rw-r--r--test/ruby/test_sprintf.rb121
-rw-r--r--test/ruby/test_sprintf_comb.rb1
-rw-r--r--test/ruby/test_string.rb212
-rw-r--r--test/ruby/test_stringchar.rb1
-rw-r--r--test/ruby/test_struct.rb80
-rw-r--r--test/ruby/test_super.rb127
-rw-r--r--test/ruby/test_symbol.rb215
-rw-r--r--test/ruby/test_syntax.rb450
-rw-r--r--test/ruby/test_system.rb4
-rw-r--r--test/ruby/test_thread.rb211
-rw-r--r--test/ruby/test_threadgroup.rb11
-rw-r--r--test/ruby/test_time.rb60
-rw-r--r--test/ruby/test_time_tz.rb174
-rw-r--r--test/ruby/test_trace.rb16
-rw-r--r--test/ruby/test_transcode.rb65
-rw-r--r--test/ruby/test_undef.rb1
-rw-r--r--test/ruby/test_unicode_escape.rb2
-rw-r--r--test/ruby/test_variable.rb62
-rw-r--r--test/ruby/test_weakmap.rb10
-rw-r--r--test/ruby/test_whileuntil.rb2
-rw-r--r--test/ruby/test_yield.rb50
-rw-r--r--test/ruby/ut_eof.rb1
-rw-r--r--test/rubygems/bad_rake.rb1
-rw-r--r--test/rubygems/bogussources.rb1
-rw-r--r--test/rubygems/fake_certlib/openssl.rb1
-rw-r--r--test/rubygems/fix_openssl_warnings.rb1
-rw-r--r--test/rubygems/foo/discover.rb1
-rw-r--r--test/rubygems/good_rake.rb1
-rw-r--r--test/rubygems/plugin/exception/rubygems_plugin.rb1
-rw-r--r--test/rubygems/plugin/load/rubygems_plugin.rb1
-rw-r--r--test/rubygems/plugin/standarderror/rubygems_plugin.rb1
-rw-r--r--test/rubygems/rubygems/commands/crash_command.rb1
-rw-r--r--test/rubygems/rubygems_plugin.rb1
-rw-r--r--test/rubygems/sff/discover.rb1
-rw-r--r--test/rubygems/simple_gem.rb3
-rw-r--r--test/rubygems/specifications/foo-0.0.1-x86-mswin32.gemspec (renamed from test/rubygems/specifications/foo-0.0.1.gemspec)bin269 -> 269 bytes-rw-r--r--test/rubygems/test_bundled_ca.rb79
-rw-r--r--test/rubygems/test_config.rb12
-rw-r--r--test/rubygems/test_deprecate.rb1
-rw-r--r--test/rubygems/test_gem.rb303
-rw-r--r--test/rubygems/test_gem_available_set.rb23
-rw-r--r--test/rubygems/test_gem_command.rb56
-rw-r--r--test/rubygems/test_gem_command_manager.rb1
-rw-r--r--test/rubygems/test_gem_commands_build_command.rb11
-rw-r--r--test/rubygems/test_gem_commands_cert_command.rb2
-rw-r--r--test/rubygems/test_gem_commands_check_command.rb1
-rw-r--r--test/rubygems/test_gem_commands_cleanup_command.rb12
-rw-r--r--test/rubygems/test_gem_commands_contents_command.rb58
-rw-r--r--test/rubygems/test_gem_commands_dependency_command.rb11
-rw-r--r--test/rubygems/test_gem_commands_environment_command.rb2
-rw-r--r--test/rubygems/test_gem_commands_fetch_command.rb1
-rw-r--r--test/rubygems/test_gem_commands_generate_index_command.rb1
-rw-r--r--test/rubygems/test_gem_commands_help_command.rb8
-rw-r--r--test/rubygems/test_gem_commands_install_command.rb149
-rw-r--r--test/rubygems/test_gem_commands_list_command.rb1
-rw-r--r--test/rubygems/test_gem_commands_lock_command.rb1
-rw-r--r--test/rubygems/test_gem_commands_mirror.rb14
-rw-r--r--test/rubygems/test_gem_commands_open_command.rb53
-rw-r--r--test/rubygems/test_gem_commands_outdated_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_owner_command.rb1
-rw-r--r--test/rubygems/test_gem_commands_pristine_command.rb129
-rw-r--r--test/rubygems/test_gem_commands_push_command.rb28
-rw-r--r--test/rubygems/test_gem_commands_query_command.rb299
-rw-r--r--test/rubygems/test_gem_commands_search_command.rb1
-rw-r--r--test/rubygems/test_gem_commands_server_command.rb5
-rw-r--r--test/rubygems/test_gem_commands_setup_command.rb25
-rw-r--r--test/rubygems/test_gem_commands_sources_command.rb1
-rw-r--r--test/rubygems/test_gem_commands_specification_command.rb9
-rw-r--r--test/rubygems/test_gem_commands_stale_command.rb3
-rw-r--r--test/rubygems/test_gem_commands_uninstall_command.rb46
-rw-r--r--test/rubygems/test_gem_commands_unpack_command.rb15
-rw-r--r--test/rubygems/test_gem_commands_update_command.rb139
-rw-r--r--test/rubygems/test_gem_commands_which_command.rb2
-rw-r--r--test/rubygems/test_gem_commands_yank_command.rb27
-rw-r--r--test/rubygems/test_gem_config_file.rb52
-rw-r--r--test/rubygems/test_gem_dependency.rb147
-rw-r--r--test/rubygems/test_gem_dependency_installer.rb277
-rw-r--r--test/rubygems/test_gem_dependency_list.rb1
-rw-r--r--test/rubygems/test_gem_dependency_resolution_error.rb1
-rw-r--r--test/rubygems/test_gem_doctor.rb3
-rw-r--r--test/rubygems/test_gem_ext_builder.rb24
-rw-r--r--test/rubygems/test_gem_ext_cmake_builder.rb3
-rw-r--r--test/rubygems/test_gem_ext_configure_builder.rb13
-rw-r--r--test/rubygems/test_gem_ext_ext_conf_builder.rb47
-rw-r--r--test/rubygems/test_gem_ext_rake_builder.rb1
-rw-r--r--test/rubygems/test_gem_gem_runner.rb1
-rw-r--r--test/rubygems/test_gem_gemcutter_utilities.rb10
-rw-r--r--test/rubygems/test_gem_impossible_dependencies_error.rb33
-rw-r--r--test/rubygems/test_gem_indexer.rb9
-rw-r--r--test/rubygems/test_gem_install_update_options.rb51
-rw-r--r--test/rubygems/test_gem_installer.rb182
-rw-r--r--test/rubygems/test_gem_local_remote_options.rb14
-rw-r--r--test/rubygems/test_gem_name_tuple.rb8
-rw-r--r--test/rubygems/test_gem_package.rb81
-rw-r--r--test/rubygems/test_gem_package_old.rb1
-rw-r--r--test/rubygems/test_gem_package_tar_header.rb3
-rw-r--r--test/rubygems/test_gem_package_tar_reader.rb13
-rw-r--r--test/rubygems/test_gem_package_tar_reader_entry.rb31
-rw-r--r--test/rubygems/test_gem_package_tar_writer.rb29
-rw-r--r--test/rubygems/test_gem_package_task.rb8
-rw-r--r--test/rubygems/test_gem_path_support.rb1
-rw-r--r--test/rubygems/test_gem_platform.rb12
-rw-r--r--test/rubygems/test_gem_rdoc.rb1
-rw-r--r--test/rubygems/test_gem_remote_fetcher.rb249
-rw-r--r--test/rubygems/test_gem_request.rb139
-rw-r--r--test/rubygems/test_gem_request_connection_pools.rb130
-rw-r--r--test/rubygems/test_gem_request_set.rb272
-rw-r--r--test/rubygems/test_gem_request_set_gem_dependency_api.rb275
-rw-r--r--test/rubygems/test_gem_request_set_lockfile.rb599
-rw-r--r--test/rubygems/test_gem_request_set_lockfile_parser.rb549
-rw-r--r--test/rubygems/test_gem_request_set_lockfile_tokenizer.rb306
-rw-r--r--test/rubygems/test_gem_requirement.rb24
-rw-r--r--test/rubygems/test_gem_resolver.rb164
-rw-r--r--test/rubygems/test_gem_resolver_activation_request.rb11
-rw-r--r--test/rubygems/test_gem_resolver_api_set.rb5
-rw-r--r--test/rubygems/test_gem_resolver_api_specification.rb45
-rw-r--r--test/rubygems/test_gem_resolver_best_set.rb58
-rw-r--r--test/rubygems/test_gem_resolver_composed_set.rb28
-rw-r--r--test/rubygems/test_gem_resolver_conflict.rb33
-rw-r--r--test/rubygems/test_gem_resolver_dependency_request.rb65
-rw-r--r--test/rubygems/test_gem_resolver_git_set.rb27
-rw-r--r--test/rubygems/test_gem_resolver_git_specification.rb14
-rw-r--r--test/rubygems/test_gem_resolver_index_set.rb31
-rw-r--r--test/rubygems/test_gem_resolver_index_specification.rb1
-rw-r--r--test/rubygems/test_gem_resolver_installed_specification.rb1
-rw-r--r--test/rubygems/test_gem_resolver_installer_set.rb166
-rw-r--r--test/rubygems/test_gem_resolver_local_specification.rb1
-rw-r--r--test/rubygems/test_gem_resolver_lock_set.rb19
-rw-r--r--test/rubygems/test_gem_resolver_lock_specification.rb29
-rw-r--r--test/rubygems/test_gem_resolver_requirement_list.rb1
-rw-r--r--test/rubygems/test_gem_resolver_specification.rb33
-rw-r--r--test/rubygems/test_gem_resolver_vendor_set.rb19
-rw-r--r--test/rubygems/test_gem_resolver_vendor_specification.rb1
-rw-r--r--test/rubygems/test_gem_security.rb1
-rw-r--r--test/rubygems/test_gem_security_policy.rb5
-rw-r--r--test/rubygems/test_gem_security_signer.rb1
-rw-r--r--test/rubygems/test_gem_security_trust_dir.rb3
-rw-r--r--test/rubygems/test_gem_server.rb78
-rw-r--r--test/rubygems/test_gem_silent_ui.rb6
-rw-r--r--test/rubygems/test_gem_source.rb33
-rw-r--r--test/rubygems/test_gem_source_fetch_problem.rb1
-rw-r--r--test/rubygems/test_gem_source_git.rb39
-rw-r--r--test/rubygems/test_gem_source_installed.rb9
-rw-r--r--test/rubygems/test_gem_source_list.rb1
-rw-r--r--test/rubygems/test_gem_source_local.rb1
-rw-r--r--test/rubygems/test_gem_source_lock.rb5
-rw-r--r--test/rubygems/test_gem_source_specific_file.rb5
-rw-r--r--test/rubygems/test_gem_source_vendor.rb5
-rw-r--r--test/rubygems/test_gem_spec_fetcher.rb1
-rw-r--r--test/rubygems/test_gem_specification.rb859
-rw-r--r--test/rubygems/test_gem_stream_ui.rb13
-rw-r--r--test/rubygems/test_gem_stub_specification.rb132
-rw-r--r--test/rubygems/test_gem_text.rb30
-rw-r--r--test/rubygems/test_gem_uninstaller.rb31
-rw-r--r--test/rubygems/test_gem_unsatisfiable_dependency_error.rb33
-rw-r--r--test/rubygems/test_gem_uri_formatter.rb1
-rw-r--r--test/rubygems/test_gem_util.rb9
-rw-r--r--test/rubygems/test_gem_validator.rb1
-rw-r--r--test/rubygems/test_gem_version.rb1
-rw-r--r--test/rubygems/test_gem_version_option.rb1
-rw-r--r--test/rubygems/test_kernel.rb31
-rw-r--r--test/rubygems/test_require.rb357
-rw-r--r--test/runner.rb32
-rw-r--r--test/scanf/test_scanf.rb39
-rw-r--r--test/scanf/test_scanfblocks.rb1
-rw-r--r--test/scanf/test_scanfio.rb1
-rw-r--r--test/sdbm/test_sdbm.rb4
-rw-r--r--test/shell/test_command_processor.rb2
-rw-r--r--test/socket/test_addrinfo.rb26
-rw-r--r--test/socket/test_ancdata.rb2
-rw-r--r--test/socket/test_basicsocket.rb89
-rw-r--r--test/socket/test_nonblock.rb117
-rw-r--r--test/socket/test_socket.rb113
-rw-r--r--test/socket/test_sockopt.rb29
-rw-r--r--test/socket/test_tcp.rb63
-rw-r--r--test/socket/test_udp.rb33
-rw-r--r--test/socket/test_unix.rb226
-rw-r--r--test/stringio/test_stringio.rb125
-rw-r--r--test/strscan/test_stringscanner.rb14
-rw-r--r--test/syslog/test_syslog_logger.rb1
-rw-r--r--test/test_abbrev.rb1
-rw-r--r--test/test_cmath.rb68
-rw-r--r--test/test_delegate.rb1
-rw-r--r--test/test_find.rb56
-rw-r--r--test/test_forwardable.rb296
-rw-r--r--test/test_ipaddr.rb277
-rw-r--r--test/test_mathn.rb18
-rw-r--r--test/test_mutex_m.rb1
-rw-r--r--test/test_observer.rb66
-rw-r--r--test/test_open3.rb46
-rw-r--r--test/test_pp.rb58
-rw-r--r--test/test_prettyprint.rb14
-rw-r--r--test/test_prime.rb119
-rw-r--r--test/test_pstore.rb22
-rw-r--r--test/test_pty.rb46
-rw-r--r--test/test_rbconfig.rb1
-rw-r--r--test/test_securerandom.rb30
-rw-r--r--test/test_set.rb216
-rw-r--r--test/test_shellwords.rb73
-rw-r--r--test/test_singleton.rb13
-rw-r--r--test/test_syslog.rb113
-rw-r--r--test/test_tempfile.rb43
-rw-r--r--test/test_time.rb302
-rw-r--r--test/test_timeout.rb51
-rw-r--r--test/test_tmpdir.rb26
-rw-r--r--test/test_tracer.rb11
-rw-r--r--test/test_tsort.rb15
-rw-r--r--test/test_unicode_normalize.rb185
-rw-r--r--test/test_weakref.rb10
-rw-r--r--test/test_win32api.rb24
-rw-r--r--test/testunit/test4test_hideskip.rb3
-rw-r--r--test/testunit/test4test_redefinition.rb3
-rw-r--r--test/testunit/test4test_sorting.rb3
-rw-r--r--test/testunit/test_assertion.rb1
-rw-r--r--test/testunit/test_hideskip.rb3
-rw-r--r--test/testunit/test_parallel.rb45
-rw-r--r--test/testunit/test_rake_integration.rb35
-rw-r--r--test/testunit/test_redefinition.rb5
-rw-r--r--test/testunit/test_sorting.rb3
-rw-r--r--test/testunit/tests_for_parallel/ptest_first.rb1
-rw-r--r--test/testunit/tests_for_parallel/ptest_forth.rb9
-rw-r--r--test/testunit/tests_for_parallel/ptest_second.rb1
-rw-r--r--test/testunit/tests_for_parallel/ptest_third.rb1
-rw-r--r--test/testunit/tests_for_parallel/runner.rb4
-rw-r--r--test/thread/test_cv.rb37
-rw-r--r--test/thread/test_queue.rb359
-rw-r--r--test/thread/test_sync.rb7
-rw-r--r--test/uri/test_common.rb60
-rw-r--r--test/uri/test_ftp.rb1
-rw-r--r--test/uri/test_generic.rb71
-rw-r--r--test/uri/test_http.rb1
-rw-r--r--test/uri/test_ldap.rb1
-rw-r--r--test/uri/test_mailto.rb81
-rw-r--r--test/uri/test_parser.rb7
-rw-r--r--test/webrick/test_cgi.rb45
-rw-r--r--test/webrick/test_cookie.rb1
-rw-r--r--test/webrick/test_do_not_reverse_lookup.rb71
-rw-r--r--test/webrick/test_filehandler.rb68
-rw-r--r--test/webrick/test_htmlutils.rb1
-rw-r--r--test/webrick/test_httpauth.rb72
-rw-r--r--test/webrick/test_httpproxy.rb7
-rw-r--r--test/webrick/test_httprequest.rb3
-rw-r--r--test/webrick/test_httpresponse.rb91
-rw-r--r--test/webrick/test_httpserver.rb125
-rw-r--r--test/webrick/test_httputils.rb1
-rw-r--r--test/webrick/test_httpversion.rb1
-rw-r--r--test/webrick/test_server.rb112
-rw-r--r--test/webrick/test_ssl_server.rb60
-rw-r--r--test/webrick/test_utils.rb91
-rw-r--r--test/webrick/utils.rb55
-rw-r--r--test/webrick/webrick.cgi6
-rw-r--r--test/webrick/webrick_long_filename.cgi2
-rw-r--r--test/win32ole/err_in_callback.rb1
-rw-r--r--test/win32ole/test_err_in_callback.rb5
-rw-r--r--test/win32ole/test_folderitem2_invokeverb.rb1
-rw-r--r--test/win32ole/test_nil2vtempty.rb1
-rw-r--r--test/win32ole/test_ole_methods.rb1
-rw-r--r--test/win32ole/test_propertyputref.rb1
-rw-r--r--test/win32ole/test_thread.rb1
-rw-r--r--test/win32ole/test_win32ole.rb48
-rw-r--r--test/win32ole/test_win32ole_event.rb169
-rw-r--r--test/win32ole/test_win32ole_method.rb9
-rw-r--r--test/win32ole/test_win32ole_param.rb1
-rw-r--r--test/win32ole/test_win32ole_record.rb213
-rw-r--r--test/win32ole/test_win32ole_type.rb1
-rw-r--r--test/win32ole/test_win32ole_typelib.rb3
-rw-r--r--test/win32ole/test_win32ole_variable.rb1
-rw-r--r--test/win32ole/test_win32ole_variant.rb86
-rw-r--r--test/win32ole/test_win32ole_variant_m.rb1
-rw-r--r--test/win32ole/test_win32ole_variant_outarg.rb3
-rw-r--r--test/win32ole/test_word.rb18
-rw-r--r--test/xmlrpc/test_client.rb19
-rw-r--r--test/xmlrpc/test_cookie.rb22
-rw-r--r--test/xmlrpc/test_datetime.rb1
-rw-r--r--test/xmlrpc/test_features.rb5
-rw-r--r--test/xmlrpc/test_marshal.rb1
-rw-r--r--test/xmlrpc/test_parser.rb1
-rw-r--r--test/xmlrpc/test_webrick_server.rb35
-rw-r--r--test/xmlrpc/webrick_testing.rb36
-rw-r--r--test/zlib/test_zlib.rb66
-rw-r--r--thread.c1702
-rw-r--r--thread_native.h23
-rw-r--r--thread_pthread.c649
-rw-r--r--thread_pthread.h12
-rw-r--r--thread_sync.c1313
-rw-r--r--thread_win32.c99
-rw-r--r--thread_win32.h9
-rw-r--r--time.c364
-rw-r--r--timev.h20
-rwxr-xr-xtool/bisect.sh2
-rwxr-xr-xtool/checksum.rb72
-rw-r--r--tool/config_files.rb8
-rw-r--r--tool/downloader.rb200
-rwxr-xr-xtool/enc-unicode.rb104
-rwxr-xr-xtool/expand-config.rb33
-rwxr-xr-xtool/extlibs.rb143
-rw-r--r--tool/fake.rb64
-rwxr-xr-xtool/file2lastrev.rb63
-rwxr-xr-xtool/gem-unpack.rb15
-rw-r--r--tool/generic_erb.rb21
-rwxr-xr-xtool/get-config_files7
-rwxr-xr-xtool/ifchange30
-rwxr-xr-xtool/instruction.rb17
-rwxr-xr-xtool/make-snapshot232
-rw-r--r--tool/make_hgraph.rb95
-rwxr-xr-xtool/mdoc2man.rb8
-rwxr-xr-xtool/merger.rb99
-rw-r--r--tool/mk_call_iseq_optimized.rb72
-rwxr-xr-xtool/mkconfig.rb65
-rwxr-xr-xtool/mkrunnable.rb11
-rwxr-xr-xtool/rbinstall.rb295
-rwxr-xr-xtool/redmine-backporter.rb583
-rwxr-xr-xtool/release.sh38
-rwxr-xr-xtool/runruby.rb15
-rw-r--r--tool/transcode-tblgen.rb60
-rwxr-xr-xtool/update-deps544
-rw-r--r--tool/vcs.rb294
-rw-r--r--tool/vpath.rb5
-rwxr-xr-xtool/ytab.sed26
-rw-r--r--transcode.c105
-rw-r--r--transcode_data.h30
-rw-r--r--util.c93
-rw-r--r--variable.c1447
-rw-r--r--version.c25
-rw-r--r--version.h17
-rw-r--r--vm.c1754
-rw-r--r--vm_args.c828
-rw-r--r--vm_backtrace.c201
-rw-r--r--vm_core.h743
-rw-r--r--vm_dump.c433
-rw-r--r--vm_eval.c1062
-rw-r--r--vm_exec.c20
-rw-r--r--vm_insnhelper.c2519
-rw-r--r--vm_insnhelper.h150
-rw-r--r--vm_method.c1412
-rw-r--r--vm_opts.h13
-rw-r--r--vm_trace.c164
-rw-r--r--vsnprintf.c92
-rw-r--r--win32/Makefile.sub168
-rwxr-xr-xwin32/configure.bat56
-rw-r--r--win32/dir.h15
-rw-r--r--win32/file.c293
-rw-r--r--win32/file.h45
-rwxr-xr-xwin32/mkexports.rb6
-rwxr-xr-xwin32/resource.rb2
-rwxr-xr-xwin32/rmall.bat6
-rwxr-xr-xwin32/rmdirs.bat1
-rw-r--r--win32/rtname.cmd33
-rw-r--r--win32/setup.mak66
-rw-r--r--win32/stub.c24
-rw-r--r--win32/win32.c1599
3299 files changed, 208460 insertions, 108042 deletions
diff --git a/.document b/.document
index 9a5067bc52..fb27ba325d 100644
--- a/.document
+++ b/.document
@@ -20,9 +20,7 @@ ChangeLog
NEWS
-README
-README.EXT
-README.EXT.ja
-README.ja
+README.md
+README.ja.md
doc
diff --git a/.gdbinit b/.gdbinit
index 17be7d8779..03c2b653cb 100644
--- a/.gdbinit
+++ b/.gdbinit
@@ -50,7 +50,7 @@ define rp
end
else
set $flags = ((struct RBasic*)($arg0))->flags
- if ($flags & RUBY_FL_PROMOTED)
+ if ($flags & RUBY_FL_PROMOTED) == RUBY_FL_PROMOTED
printf "[PROMOTED] "
end
if ($flags & RUBY_T_MASK) == RUBY_T_NONE
@@ -211,12 +211,46 @@ define rp
else
if ($flags & RUBY_T_MASK) == RUBY_T_SYMBOL
printf "%sT_SYMBOL%s: ", $color_type, $color_end
- print (struct RBasic *)($arg0)
+ print (struct RSymbol *)($arg0)
+ set $id_type = ((struct RSymbol *)($arg0))->id & RUBY_ID_SCOPE_MASK
+ if $id_type == RUBY_ID_LOCAL
+ printf "l"
+ else
+ if $id_type == RUBY_ID_INSTANCE
+ printf "i"
+ else
+ if $id_type == RUBY_ID_GLOBAL
+ printf "G"
+ else
+ if $id_type == RUBY_ID_ATTRSET
+ printf "a"
+ else
+ if $id_type == RUBY_ID_CONST
+ printf "C"
+ else
+ if $id_type == RUBY_ID_CLASS
+ printf "c"
+ else
+ printf "j"
+ end
+ end
+ end
+ end
+ end
+ end
+ set $id_fstr = ((struct RSymbol *)($arg0))->fstr
+ rp_string $id_fstr
else
if ($flags & RUBY_T_MASK) == RUBY_T_UNDEF
printf "%sT_UNDEF%s: ", $color_type, $color_end
print (struct RBasic *)($arg0)
else
+ if ($flags & RUBY_T_MASK) == RUBY_T_IMEMO
+ printf "%sT_IMEMO%s(", $color_type, $color_end
+ output (enum imemo_type)(($flags>>RUBY_FL_USHIFT)&imemo_mask)
+ printf "): "
+ rp_imemo $arg0
+ else
if ($flags & RUBY_T_MASK) == RUBY_T_NODE
printf "%sT_NODE%s(", $color_type, $color_end
output (enum node_type)(($flags&RUBY_NODE_TYPEMASK)>>RUBY_NODE_TYPESHIFT)
@@ -261,6 +295,7 @@ define rp
end
end
end
+ end
end
document rp
Print a Ruby's VALUE.
@@ -350,9 +385,9 @@ define rp_id
end
end
printf "(%ld): ", $id
- rb_numtable_entry global_symbols.id_str $id
- if $rb_numtable_rec
- rp_string $rb_numtable_rec
+ set $str = lookup_id_str($id)
+ if $str
+ rp_string $str
else
echo undef\n
end
@@ -420,8 +455,8 @@ end
define rp_class
printf "(struct RClass *) %p", (void*)$arg0
- if ((struct RClass *)($arg0))->ptr.origin != $arg0
- printf " -> %p", ((struct RClass *)($arg0))->ptr.origin
+ if ((struct RClass *)($arg0))->ptr.origin_ != $arg0
+ printf " -> %p", ((struct RClass *)($arg0))->ptr.origin_
end
printf "\n"
rb_classname $arg0
@@ -432,6 +467,40 @@ document rp_class
Print the content of a Class/Module.
end
+define rp_imemo
+ set $flags = (((struct RBasic *)($arg0))->flags >> RUBY_FL_USHIFT) & imemo_mask
+ if $flags == imemo_cref
+ printf "(rb_cref_t *) %p\n", (void*)$arg0
+ print *(rb_cref_t *)$arg0
+ else
+ if $flags == imemo_svar
+ printf "(struct vm_svar *) %p\n", (void*)$arg0
+ print *(struct vm_svar *)$arg0
+ else
+ if $flags == imemo_throw_data
+ printf "(struct vm_throw_data *) %p\n", (void*)$arg0
+ print *(struct vm_throw_data *)$arg0
+ else
+ if $flags == imemo_ifunc
+ printf "(struct vm_ifunc *) %p\n", (void*)$arg0
+ print *(struct vm_ifunc *)$arg0
+ else
+ if $flags == imemo_memo
+ printf "(struct MEMO *) %p\n", (void*)$arg0
+ print *(struct MEMO *)$arg0
+ else
+ printf "(struct RIMemo *) %p\n", (void*)$arg0
+ print *(struct RIMemo *)$arg0
+ end
+ end
+ end
+ end
+ end
+end
+document rp_imemo
+ Print the content of a memo
+end
+
define nd_type
print (enum node_type)((((NODE*)($arg0))->flags&RUBY_NODE_TYPEMASK)>>RUBY_NODE_TYPESHIFT)
end
@@ -710,6 +779,12 @@ define nd_tval
rp ($arg0).u2.value
end
+define nd_tree
+ set $buf = (struct RString *)rb_str_buf_new(0)
+ call dump_node((VALUE)($buf), rb_str_new(0, 0), 0, ($arg0))
+ printf "%s\n", $buf->as.heap.ptr
+end
+
define rb_p
call rb_p($arg0)
end
@@ -731,7 +806,7 @@ define rb_numtable_entry
end
end
else
- set $rb_numtable_p = $rb_numtable_tbl->as.big.bins[$rb_numtable_id % $rb_numtable_tbl->num_bins]
+ set $rb_numtable_p = $rb_numtable_tbl->as.big.bins[st_numhash($rb_numtable_id) % $rb_numtable_tbl->num_bins]
while $rb_numtable_p
if $rb_numtable_p->key == $rb_numtable_id
set $rb_numtable_key = $rb_numtable_p->key
@@ -761,7 +836,7 @@ define rb_method_entry
rb_numtable_entry $rb_method_entry_klass->m_tbl_wrapper->tbl $rb_method_entry_id
set $rb_method_entry_me = (rb_method_entry_t *)$rb_numtable_rec
if !$rb_method_entry_me
- set $rb_method_entry_klass = (struct RClass *)$rb_method_entry_klass->ptr->super
+ set $rb_method_entry_klass = (struct RClass *)RCLASS_SUPER($rb_method_entry_klass)
end
end
if $rb_method_entry_me
@@ -790,7 +865,7 @@ define rb_ancestors
set $rb_ancestors_module = $arg0
while $rb_ancestors_module
rp_class $rb_ancestors_module
- set $rb_ancestors_module = ((struct RClass *)($rb_ancestors_module))->ptr.super
+ set $rb_ancestors_module = RCLASS_SUPER($rb_ancestors_module)
end
end
document rb_ancestors
@@ -835,23 +910,16 @@ end
define rb_ps_vm
print $ps_vm = (rb_vm_t*)$arg0
- set $ps_threads = (st_table*)$ps_vm->living_threads
- if $ps_threads->entries_packed
- set $ps_threads_i = 0
- while $ps_threads_i < $ps_threads->num_entries
- set $ps_threads_key = (st_data_t)$ps_threads->as.packed.entries[$ps_threads_i].key
- set $ps_threads_val = (st_data_t)$ps_threads->as.packed.entries[$ps_threads_i].val
- rb_ps_thread $ps_threads_key $ps_threads_val
- set $ps_threads_i = $ps_threads_i + 1
- end
- else
- set $ps_threads_ptr = (st_table_entry*)$ps_threads->head
- while $ps_threads_ptr
- set $ps_threads_key = (st_data_t)$ps_threads_ptr->key
- set $ps_threads_val = (st_data_t)$ps_threads_ptr->record
- rb_ps_thread $ps_threads_key $ps_threads_val
- set $ps_threads_ptr = (st_table_entry*)$ps_threads_ptr->fore
+ set $ps_thread_ln = $ps_vm->living_threads.n.next
+ set $ps_thread_ln_last = $ps_vm->living_threads.n.prev
+ while 1
+ set $ps_thread_th = (rb_thread_t *)$ps_thread_ln
+ set $ps_thread = (VALUE)($ps_thread_th->self)
+ rb_ps_thread $ps_thread
+ if $ps_thread_ln == $ps_thread_ln_last
+ loop_break
end
+ set $ps_thread_ln = $ps_thread_ln->next
end
end
document rb_ps_vm
@@ -860,8 +928,9 @@ end
define rb_ps_thread
set $ps_thread = (struct RTypedData*)$arg0
- set $ps_thread_id = $arg1
- print $ps_thread_th = (rb_thread_t*)$ps_thread->data
+ set $ps_thread_th = (rb_thread_t*)$ps_thread->data
+ printf "* #<Thread:%p rb_thread_t:%p native_thread:%p>\n", \
+ $ps_thread, $ps_thread_th, $ps_thread_th->thread_id
end
# Details: https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/MachineInstructionsTraceWithGDB
@@ -880,3 +949,18 @@ define SDR
call rb_vmdebug_stack_dump_raw_current()
end
+define rbi
+ if ((LINK_ELEMENT*)$arg0)->type == ISEQ_ELEMENT_LABEL
+ p *(LABEL*)$arg0
+ else
+ if ((LINK_ELEMENT*)$arg0)->type == ISEQ_ELEMENT_INSN
+ p *(INSN*)$arg0
+ else
+ if ((LINK_ELEMENT*)$arg0)->type == ISEQ_ELEMENT_ADJUST
+ p *(ADJUST*)$arg0
+ else
+ print *$arg0
+ end
+ end
+ end
+end
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000000..d9785fad00
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,5 @@
+*.gemspec diff=ruby
+*.rb diff=ruby
+bin/* diff=ruby
+tool/update-deps diff=ruby
+tool/make-snapshot diff=ruby
diff --git a/.gitignore b/.gitignore
index dee365b3c6..80c12594dd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,6 @@
*-*-*.def
+*-*-*.exp
+*-*-*.lib
*.a
*.bak
*.dSYM
@@ -8,10 +10,13 @@
*.inc
*.log
*.o
+*.obj
*.orig
+*.pdb
*.rej
*.sav
*.swp
+*.yarb
*~
.*-*
.*.list
@@ -24,15 +29,21 @@
.svn
Makefile
Makefile.old
+cygruby*.def
extconf.h
y.output
y.tab.c
# /
+/*-fake.rb
+/*.dll
+/*.exe
+/*.res
/*.pc
+/*.rc
/*_prelude.c
/COPYING.LIB
-/ChangeLog-1.8.0
+/ChangeLog-*
/ChangeLog.pre-alpha
/ChangeLog.pre1_1
/Doxyfile
@@ -46,6 +57,7 @@ y.tab.c
/autom4te*.cache
/automake
/beos
+/bmlog-*
/breakpoints.gdb
/config.cache
/config.h
@@ -53,6 +65,13 @@ y.tab.c
/config.status
/config.status.lineno
/configure
+/coverage/simplecov
+/coverage/simplecov-html
+/coverage/doclie
+/coverage/.last_run.json
+/coverage/.resultset.json*
+/coverage/assets
+/coverage/index.html
/doc/capi
/enc.mk
/encdb.h
@@ -83,6 +102,8 @@ y.tab.c
/riscos
/rubicon
/ruby
+/ruby-runner
+/ruby-runner.c
/ruby-man.rd.gz
/sizes.c
/test.rb
@@ -90,22 +111,44 @@ y.tab.c
/transdb.h
/uncommon.mk
/verconf.h
+/verconf.mk
/web
/yasmdata.rb
# /benchmark/
/benchmark/bmx_*.rb
+/benchmark/fasta.output.*
+/benchmark/wc.input
+
+/enc/*.def
+/enc/*.exp
+/enc/*.lib
+/enc/unicode/data
# /enc/trans/
/enc/trans/*.c
+/enc/trans/*.def
+/enc/trans/*.exp
+/enc/trans/*.lib
+/enc/trans/.time
# /ext/
/ext/extinit.c
+# /ext/-test-/win32/dln/
+/ext/-test-/win32/dln/dlntest.exp
+/ext/-test-/win32/dln/dlntest.lib
+
# /ext/dl/callback/
/ext/dl/callback/callback-*.c
/ext/dl/callback/callback.c
+# /ext/etc/
+/ext/etc/constdefs.h
+
+# /ext/fiddle/
+/ext/fiddle/libffi-*
+
# /ext/rbconfig/
/ext/rbconfig/sizeof/sizes.c
@@ -124,6 +167,9 @@ y.tab.c
# /ext/tk/
/ext/tk/config_list
+# /gems
+/gems/*.gem
+
# /spec/
/spec/mspec
/spec/rubyspec
diff --git a/.travis.yml b/.travis.yml
index 8db00587d6..f87ffd3483 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -18,45 +18,56 @@
# Language specification.
language: c
+sudo: false
# Compilers. Several compilers are provided in Travis, so we try them all.
# The value set here is visible via $CC environment variable.
compiler:
- gcc
- - clang
+
+os:
+ - linux
# Dependencies. Some header files are missing in a Travis' worker VM, so we
# have to install them. The "1.9.1" here is OK. It is the most adopted
# version string for Debian/Ubuntu, and no dependencies have been changed so
# far since the 1.9.1 release.
before_install:
- - "sudo apt-get -qq update"
- - "sudo apt-get -qq install $CC" # upgrade if any
-install: "sudo apt-get -qq build-dep ruby1.9.1 2>/dev/null"
+ - "CONFIG_FLAG="
+ - "JOBS='-j 4'"
# Script is where the test runs. Note we just do "make test", not other tests
# like test-all, test-rubyspec. This is because they take too much time,
# enough for Travis to shut down the VM as being stalled.
before_script:
- - "make -f common.mk BASERUBY=ruby srcdir=. update-config_files"
+ - "uname -a"
+ - "uname -r"
+ - "rm -fr .ext autom4te.cache"
+ - "echo $TERM"
+ - "make -f common.mk BASERUBY=ruby MAKEDIRS='mkdir -p' srcdir=. update-config_files"
- "autoconf"
- "mkdir config_1st config_2nd"
- - "./configure -C --with-gcc=$CC"
+ - "./configure -C --disable-install-doc --with-gcc=$CC $CONFIG_FLAG"
- "cp -pr config.status .ext/include config_1st"
- "make reconfig"
- "cp -pr config.status .ext/include config_2nd"
- "diff -ru config_1st config_2nd"
- - "make -sj encs"
- - "make -sj exts"
+ - "make after-update BASERUBY=ruby"
+ - "make -s $JOBS"
+ - "make update-rubyspec"
script:
- - "make test OPTS=-v"
-# - "make test-all TESTS='-v'"
+ - "make test TESTOPTS=--color=never"
+ - "make test-all TESTOPTS='-q -j3 --color=never --job-status=normal'"
+ - "make test-rubyspec MSPECOPT=-fm"
# Branch matrix. Not all branches are Travis-ready so we limit branches here.
branches:
only:
- trunk
- - ruby_1_9_3
+ - ruby_2_0_0
+ - ruby_2_1
+ - ruby_2_2
+ - ruby_2_3
# We want to be notified when something happens.
notifications:
@@ -65,7 +76,7 @@ notifications:
- "irc.freenode.org#ruby-core"
- "irc.freenode.org#ruby-ja"
on_success: change # [always|never|change] # default: always
- on_failure: change # [always|never|change] # default: always
+ on_failure: always # [always|never|change] # default: always
template:
- "%{message} by @%{author}: See %{build_url}"
@@ -76,6 +87,10 @@ notifications:
on_success: always
on_failure: never
+ email:
+ - ko1c-failure@atdot.net
+ - shibata.hiroshi@gmail.com
+
# Local Variables:
# mode: YAML
# coding: utf-8-unix
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000000..ffdf2dd4b8
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,4 @@
+Please see the [official issue tracker] and wiki [HowToContribute].
+
+[official issue tracker]: https://bugs.ruby-lang.org
+[HowToContribute]: https://bugs.ruby-lang.org/projects/ruby/wiki/HowToContribute
diff --git a/ChangeLog b/ChangeLog
index 1d4751abf4..2d26904f0b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,18820 +1,14543 @@
-Thu May 8 01:13:10 2014 NARUSE, Yui <naruse@ruby-lang.org>
+Thu Dec 14 23:53:41 2017 NAKAMURA Usaku <usa@ruby-lang.org>
- * configure.in: correct pthread_setname_np's prototype on NetBSD.
- [Bug #9586]
+ * test/net/ftp/test_ftp.rb (process_port_or_eprt): merge a part of
+ r56973 to pass the test introduced at previous commit.
-Tue May 6 00:54:56 2014 Narihiro Nakamura <authornari@gmail.com>
+Thu Dec 14 22:55:05 2017 Shugo Maeda <shugo@ruby-lang.org>
- * gc.c (gc_after_sweep): suppress unnecessary expanding heap.
- Tomb heap pages are freed pages here, so expanding heap is
- not required.
+ Fix a command injection vulnerability in Net::FTP.
-Mon May 5 02:35:20 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Dec 14 22:35:19 2017 Eric Wong <normalperson@yhbt.net>
- * ext/openssl/ossl_pkey.c (ossl_pkey_verify): as EVP_VerifyFinal()
- finalizes only a copy of the digest context, the context must be
- cleaned up after initialization by EVP_MD_CTX_cleanup() or a
- memory leak will occur. [ruby-core:62038] [Bug #9743]
+ webrick: compile RE correctly for beginning and end match
-Mon May 5 02:21:48 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ Using ^ and $ in regexps means we can accidentally get fooled
+ by "%0a" in HTTP request paths being decoded to newline
+ characters. Use \A and \z to match beginning and end-of-string
+ respectively, instead.
- * ext/dl/cptr.c (dlptr_free), ext/dl/handle.c (dlhandle_free),
- ext/fiddle/handle.c (fiddle_handle_free),
- ext/fiddle/pointer.c (fiddle_ptr_free): fix memory leak.
- based on the patch Heesob Park at [ruby-dev:48021] [Bug #9599].
+ Thanks to mame and hsbt for reporting.
-Mon May 5 01:20:27 2014 Eric Wong <e@80x24.org>
+ * lib/webrick/httpserver.rb (MountTable#compile):
+ use \A and \z instead of ^ and $
+ * lib/webrick/httpserver.rb (MountTable#normalize): use \z instead of $
+ * test/webrick/test_httpserver.rb (test_cntrl_in_path): new test
- * gc.c (rb_gc_writebarrier): drop special case for big hash/array
- [Bug #9518]
+Thu Dec 14 22:29:04 2017 Eric Wong <normalperson@yhbt.net>
-Mon May 5 01:13:00 2014 Koichi Sasada <ko1@atdot.net>
+ webrick: do not hang acceptor on slow TLS connections
- * gc.c (gc_before_sweep): cap `malloc_limit' to
- gc_params.malloc_limit_max. It can grow and grow with such case:
- `loop{"a" * (1024 ** 2)}'
- [Bug #9687]
+ OpenSSL::SSL::SSLSocket#accept may block indefinitely on clients
+ which negotiate the TCP connection, but fail (or are slow) to
+ negotiate the subsequent TLS handshake. This prevents the
+ multi-threaded WEBrick server from accepting other connections.
- This issue is pointed by Tim Robertson.
- http://www.omniref.com/blog/blog/2014/03/27/ruby-garbage-collection-still-not-ready-for-production/
+ Since the TLS handshake (via OpenSSL::SSL::SSLSocket#accept)
+ consists of normal read/write traffic over TCP, handle it in the
+ per-client thread, instead.
-Mon May 5 00:52:18 2014 Kenta Murata <mrkn@mrkn.jp>
+ Furthermore, using non-blocking accept() is useful for non-TLS
+ sockets anyways because spurious wakeups are possible from
+ select(2).
- * ext/bigdecimal/bigdecimal.c (BigDecimal_initialize): Insert GC guard.
+ * lib/webrick/server.rb (accept_client): use TCPServer#accept_nonblock
+ and remove OpenSSL::SSL::SSLSocket#accept call
+ * lib/webrick/server.rb (start_thread): call OpenSSL::SSL::SSLSocket#acc
+ept
+ * test/webrick/test_ssl_server.rb (test_slow_connect): new test
+ [ruby-core:83221] [Bug #14005]
- * ext/bigdecimal/bigdecimal.c (BigDecimal_global_new): ditto.
+ webrick: fix up r60172
-Mon May 5 00:42:35 2014 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
+ By making the socket non-blocking in r60172, TLS/SSL negotiation
+ via the SSL_accept function must handle non-blocking sockets
+ properly and retry on SSL_ERROR_WANT_READ/SSL_ERROR_WANT_WRITE.
+ OpenSSL::SSL::SSLSocket#accept cannot do that properly with a
+ non-blocking socket, so it must use non-blocking logic of
+ OpenSSL::SSL::SSLSocket#accept_nonblock.
- * ext/psych/psych.gemspec: update gemspec for psych-2.0.5
+ Thanks to MSP-Greg (Greg L) for finding this.
-Mon May 5 00:42:35 2014 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
+ * lib/webrick/server.rb (start_thread): use SSL_accept properly
+ with non-blocking socket.
+ [Bug #14013] [Bug #14005]
- * ext/psych/lib/psych.rb: Merge psych-2.0.5. bump version to
- libyaml-0.1.6 for CVE-2014-2525.
- * ext/psych/yaml/config.h: ditto.
- * ext/psych/yaml/scanner.c: ditto.
- * ext/psych/yaml/yaml_private.h: ditto.
+ webrick: fix up r60172 and revert r60189
-Mon May 5 00:35:20 2014 Aaron Patterson <aaron@tenderlovemaking.com>
+ Thanks to MSP-Greg (Greg L) for helping with this.
- * ext/psych/lib/psych/visitors/yaml_tree.rb: support dumping Encoding
- objects.
-
- * ext/psych/lib/psych/visitors/to_ruby.rb: support loading Encoding
- objects.
-
- * test/psych/test_encoding.rb: add test
-
- * ext/psych/lib/psych.rb: add version
-
-Mon May 5 00:16:35 2014 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
-
- * gc.c: Fix up default GC params by @csfrancis [fix GH-556]
-
-Fri May 2 00:19:36 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/openssl/ossl.c (ossl_make_error): check NULL for unknown
- error reasons with old OpenSSL, and insert a colon iff formatted
- message is not empty.
-
-Thu May 1 20:56:56 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/readline/extconf.rb (rl_hook_func_t): check pointer type.
- [ruby-dev:48089] [Bug #9702]
-
-Thu May 1 20:47:08 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/readline/extconf.rb: fix typo, `$defs` not `$DEFS`.
- [ruby-core:61756] [Bug #9578]
-
-Thu May 1 20:47:08 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/readline/extconf.rb (rl_hook_func_t): define as Function for
- very old readline versions. [ruby-core:61209] [Bug #9578]
-
-Thu May 1 20:47:08 2014 Tanaka Akira <akr@fsij.org>
-
- * ext/readline/readline.c (Init_readline): Use rl_hook_func_t instead
- of Function to support readline-6.3. (rl_hook_func_t is available
- since readline-4.2.)
- Reported by Dmitry Medvinsky. [ruby-core:61141] [Bug #9578]
-
-Sat Mar 1 21:00:27 2014 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * proc.c: Having optional keyword arguments makes maximum arity +1,
- not unlimited [#8072]
-
-Sat Mar 1 17:25:12 2014 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * proc.c: Having any mandatory keyword argument increases min arity
- [#9299]
-
-Mon Feb 24 14:56:41 2014 WATANABE Hirofumi <eban@ruby-lang.org>
-
- * tool/make-snapshot: needs CXXFLAGS. [ruby-core:59393][Bug #9320]
-
-Mon Feb 24 14:56:41 2014 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * tool/make-snapshot: support new version scheme.
-
-Mon Feb 24 13:05:48 2014 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych.rb: New release of psych.
- * ext/psych/psych.gemspec: ditto
-
-Mon Feb 24 13:05:48 2014 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/yaml/emitter.c: merge libyaml 0.1.5
- * ext/psych/yaml/loader.c: ditto
- * ext/psych/yaml/parser.c: ditto
- * ext/psych/yaml/reader.c: ditto
- * ext/psych/yaml/scanner.c: ditto
- * ext/psych/yaml/writer.c: ditto
- * ext/psych/yaml/yaml_private.h: ditto
-
-Sat Feb 22 22:26:43 2014 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * ext/io/console/console.c (console_dev): need read access for conout$
- because some functions need it. [Bug#9554]
-
-Sat Feb 22 21:56:26 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * compile.c (iseq_set_arguments): set arg_keyword_check from
- nd_cflag, which is set by parser. internal ID is used for
- unnamed keyword rest argument, which should be separated from no
- keyword check.
-
- * iseq.c (rb_iseq_parameters): if no keyword check, keyword rest is
- present.
-
- * parse.y (new_args_tail_gen): set keywords check to nd_cflag, which
- equals to that keyword rest is not present.
-
-Sat Feb 22 21:56:26 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * iseq.c (rb_iseq_parameters): push argument type symbol only for
- unnamed rest keywords argument.
-
-Sat Feb 22 21:56:26 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * proc.c (rb_iseq_min_max_arity): maximum argument is unlimited if
- having rest keywords argument. [ruby-core:53298] [Bug #8072]
-
-Sat Feb 22 18:55:08 2014 Shugo Maeda <shugo@ruby-lang.org>
-
- * ext/socket/init.c (wait_connectable): break if the socket is
- writable to avoid infinite loops on FreeBSD and other platforms
- which conforms to SUSv3. This problem cannot be reproduced with
- loopback interfaces, so it's hard to write test code.
- rsock_connect() and wait_connectable() are overly complicated, so
- they should be refactored, but I commit this fix as a workaround
- for the release of Ruby 1.9.3 scheduled on Feb 24.
- [ruby-core:60940] [Bug #9547]
-
-Sat Feb 22 18:48:57 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * class.c (rb_mod_init_copy): do nothing if copying self.
- [ruby-dev:47989] [Bug #9535]
-
- * hash.c (rb_hash_initialize_copy): ditto.
-
-Sat Feb 22 18:20:58 2014 Masaki Matsushita <glass.saga@gmail.com>
-
- * hash.c (rb_hash_flatten): fix behavior of flatten(-1).
- [ruby-dev:47988] [Bug #9533]
-
- * test/ruby/test_array.rb: test for above.
-
-Sat Feb 22 17:46:32 2014 Tanaka Akira <akr@fsij.org>
-
- * lib/open-uri.rb: Make proxy disabling working again.
- Fixed by Christophe Philemotte. [ruby-core:59650] [Bug #9385]
-
-Sat Feb 22 17:33:39 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * eval.c (rb_mod_s_constants): return its own constants for other
- than Module itself. [ruby-core:59763] [Bug #9413]
-
-Sat Feb 22 16:51:36 2014 Eric Wong <e@80x24.org>
-
- * ext/json/generator/depend: add build dependencies for json extension
- [Bug #9374] [ruby-core:59609]
- * ext/json/parser/depend: ditto
-
-Sat Feb 22 16:34:12 2014 Yusuke Endoh <mame@tsg.ne.jp>
-
- * ext/fiddle/closure.c: use sizeof(*pcl) for correct sizeof value.
- [ruby-core:57599] [Bug #8978].
-
-Sat Feb 22 16:34:12 2014 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/fiddle/closure.c: use sizeof(*pcl) for correct sizeof value.
- [ruby-core:57599] [Bug #8978]. Thanks mame!
-
-Sat Feb 22 16:17:54 2014 Eric Wong <e@80x24.org>
-
- * ext/socket/ancdata.c (bsock_sendmsg_internal): only retry on error
- (bsock_recvmsg_internal): ditto
- * test/socket/test_unix.rb: test above for infinite loop
-
-Sat Feb 22 15:56:53 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * thread_pthread.c (rb_thread_create_timer_thread): fix for platforms
- where PTHREAD_STACK_MIN is a dynamic value and not a compile-time
- constant. [ruby-dev:47911] [Bug #9436]
-
-Sat Feb 22 15:56:53 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * thread_pthread.c (rb_thread_create_timer_thread): expand timer
- thread stack size to get rid of segfault on FreeBSD/powerpc64.
- based on the patch by Steve Wills at [ruby-core:59923].
- [ruby-core:56590] [Bug #8783]
-
-Sat Feb 22 15:13:38 2014 Benoit Daloze <eregontp@gmail.com>
-
- * range.c (Range#size): [DOC] improve description and add examples.
- Patch by @skade. [Fixes GH-501]
-
-Sat Feb 22 15:07:58 2014 Zachary Scott <e@zzak.io>
-
- * lib/racc/rdoc/grammar.en.rdoc: [DOC] Correct grammar and typos
- Patch by Giorgos Tsiftsis [Bug #9429] [ci skip]
-
-Sat Feb 22 15:06:32 2014 Zachary Scott <e@zzak.io>
-
- * lib/open-uri.rb: [DOC] use lower case version of core classes, same
- as commit r44878, based on patch by Jonathan Jackson [Bug #9483]
-
-Sat Feb 22 15:06:32 2014 Zachary Scott <e@zzak.io>
-
- * ext/ripper/lib/ripper/lexer.rb: [DOC] use lower case version of core
- classes when referring to return value, since we aren't directly
- talking about the class. Patch by Jonathan Jackson [Bug #9483]
-
-Sat Feb 22 15:03:05 2014 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * variable.c: adding extra example in docs.
- patched by Steve Klabnik. [Bug #9210]
-
-Sat Feb 22 15:01:21 2014 Tanaka Akira <akr@fsij.org>
-
- * lib/resolv.rb (Resolv::DNS::Resource::TXT#data): Return concatenated
- string.
- Patch by Ryan Brunner. [ruby-core:58220] [Bug #9093]
-
-Sat Feb 22 14:52:55 2014 Zachary Scott <e@zzak.io>
-
- * ext/openssl/ossl_pkey_dh.c: Fixed typo by Sandor Szuecs [Bug #9243]
-
-Sat Feb 22 14:45:36 2014 Zachary Scott <e@zzak.io>
-
- * lib/xmlrpc/client.rb: [DOC] Remove note about SSL package on RAA
- Since RAA has been deprecated, and the SSL package has been replaced
- with net/https this statement is entirely false and should be
- deleted. [Bug #9152]
-
-Sat Feb 22 14:31:23 2014 Zachary Scott <e@zzak.io>
-
- * lib/net/smtp.rb: [DOC] Remove dead link to RAA by Giorgos Tsiftsis
- Fixes the following bugs: [Bug #9152] [Bug #9268] [Bug #9394]
- * lib/open-uri.rb: ditto
-
-Sat Feb 22 14:18:35 2014 Tanaka Akira <akr@fsij.org>
-
- * lib/resolv.rb: Ignore name servers which cause EAFNOSUPPORT on
- socket creation.
- Reported by Bjoern Rennhak. [ruby-core:60442] [Bug #9477]
-
-Sat Feb 22 14:07:04 2014 Tanaka Akira <akr@fsij.org>
-
- * lib/resolv.rb (Resolv::DNS::Message::MessageDecoder): Raise
- DecodeError if no data before the limit.
- Reported by Will Bryant. [ruby-core:60557] [Bug #9498]
-
-Sat Feb 22 13:49:30 2014 Shugo Maeda <shugo@ruby-lang.org>
-
- * vm_insnhelper.c (vm_call_method): should check ci->me->flag of
- a refining method in case the method is private.
- [ruby-core:60111] [Bug #9452]
-
- * vm_method.c (make_method_entry_refined): set me->flag of a refined
- method entry to NOEX_PUBLIC in case the original method is private
- and it is refined as a public method. The original flag is stored
- in me->def->body.orig_me, so it's OK to make a refined method
- entry public. [ruby-core:60111] [Bug #9452]
-
- * test/ruby/test_refinement.rb: related tests.
-
-Sat Feb 22 13:26:57 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * iseq.c (iseq_load): keep type_map to get rid of memory leak.
- based on a patch by Eric Wong at [ruby-core:59699]. [Bug #9399]
-
-Sat Feb 22 13:17:32 2014 Masaki Matsushita <glass.saga@gmail.com>
-
- * ext/thread/thread.c (rb_szqueue_clear): notify SZQUEUE_WAITERS
- on SizedQueue#clear. [ruby-core:59462] [Bug #9342]
-
- * test/thread/test_queue.rb: add test. the patch is from
- Justin Collins.
-
-Sat Feb 22 01:35:02 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in: check if pthread_setname_np is available.
-
- * thread_pthread.c: pthread_setname_np is not available on old
- Darwins. [ruby-core:60524] [Bug #9492]
-
-Sat Feb 22 00:21:50 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * parse.y (local_push_gen, local_pop_gen): save cmdarg_stack to
- isolate command argument state from outer scope.
- [ruby-core:59342] [Bug #9308]
-
-Fri Feb 21 23:51:38 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * encoding.c (must_encindex, rb_enc_from_index, rb_obj_encoding): mask
- encoding index and ignore dummy flags. [ruby-core:59354] [Bug #9314]
-
-Fri Feb 21 23:10:12 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/mkmf.rb (RbConfig): expand RUBY_SO_NAME for extensions
- backward compatibility. [ruby-core:59426] [Bug #9329]
-
-Fri Feb 21 23:07:56 2014 Akio Tajima <artonx@yahoo.co.jp>
+ * lib/webrick/server.rb (start_thread): ignore ECONNRESET, ECONNABORTED,
+ EPROTO, and EINVAL on TLS negotiation errors the same way they
+ were ignored before r60172 in the accept_client method of the
+ main acceptor thread.
+ [Bug #14013] [Bug #14005]
- * win32/Makefile.sub: remove HAVE_FSEEKO because fseeko removed from win32/win32.c
- Fixed [Bug #9333].
+ webrick: fix up r60172 and r60208
-Fri Feb 21 23:00:34 2014 Aaron Patterson <aaron@tenderlovemaking.com>
+ Thanks to MSP-Greg (Greg L) for helping with this.
- * ext/psych/lib/psych/visitors/yaml_tree.rb: dumping strings with
- quotes should not have changed. [ruby-core:59316] [Bug #9300]
+ * lib/webrick/server.rb (start_thread): fix non-local return
+ introduced in r60208
- * ext/psych/lib/psych.rb: fixed missing require.
+ webrick: fix up r60172 and r60210
- * test/psych/test_string.rb: test
+ Thanks to MSP-Greg (Greg L) for helping with this.
-Sun Feb 2 05:48:42 2014 Eric Wong <e@80x24.org>
+ * lib/webrick/server.rb (start_thread): properly fix non-local return
+ introduced in r60208 and r60210
- * io.c (rb_io_syswrite): add RB_GC_GUARD
- [Bug #9472][ruby-core:60407]
+Thu Nov 30 23:37:08 2017 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Feb 21 17:42:42 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ parse.y: fix line in rescue
- * lib/resolv.rb (Resolv::Hosts#lazy_initialize): should not
- consider encodings in hosts file. [ruby-core:59239] [Bug #9273]
+ * parse.y (set_line_body, primary): fix line number of bodystmt as the
+ beginning of the block. [Bug #13181]
- * lib/resolv.rb (Resolv::Config.parse_resolv_conf): ditto.
+Thu Nov 30 23:29:00 2017 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Fri Feb 21 16:47:20 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ Merge rubygems-2.6.14 changes.
- * string.c (get_encoding): respect BOM on pseudo encodings.
- [ruby-dev:47895] [Bug #9415]
+ It fixed http://blog.rubygems.org/2017/10/09/unsafe-object-deserialization-vulnerability.html
-Fri Feb 21 16:47:20 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Sep 15 05:40:40 2017 URABE Shyouhei <shyouhei@ruby-lang.org>
- * string.c (get_actual_encoding): get actual encoding according to
- the BOM if exists.
+ fix --with-gmp (broken by r57490)
- * string.c (rb_str_inspect): use according encoding, instead of
- pseudo encodings, UTF-{16,32}. [ruby-core:59757] [Bug #8940]
+ Looking at the generated shell script (also the autoconf manual), it
+ seems AC_SEARCH_LIBS() m4 macro does not define HAVE_LIBsomething C
+ preprocessor macros, unlike AC_CHECK_LIB() which does define them.
+ This previous change effectively killed building with GMP because
+ building that mode depends on existence of HAVE_LIBGMP. [Bug #13402]
-Fri Feb 21 13:39:21 2014 Charlie Somerville <charliesome@ruby-lang.org>
+Thu Sep 14 20:25:55 2017 Yusuke Endoh <mame@ruby-lang.org>
- * compile.c (iseq_build_from_ary_body): Use :blockptr instead of :block
- as hash key when loading serialized instruction sequences from arrays.
- [Bug #9455] [ruby-core:60146]
+ lib/webrick/log.rb: sanitize any type of logs
-Thu Feb 20 12:58:45 2014 Tanaka Akira <akr@fsij.org>
+ It had failed to sanitize some type of exception messages. Reported and
+ patched by Yusuke Endoh (mame) at https://hackerone.com/reports/223363
- * process.c (READ_FROM_CHILD): Apply the last hunk of
- 0001-process.c-avoid-EINTR-from-Process.spawn.patch written by
- Eric Wong in [Bug #8770].
+Thu Sep 14 13:32:39 2017 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Feb 20 12:58:45 2014 Eric Wong <normalperson@yhbt.net>
+ parse.y: empty hash in defined
- * process.c (send_child_error): retry write on EINTR to fix
- occasional Errno::EINTR from Process.spawn.
+ * parse.y (command): NODE_ARRAY with NULL is invalid. traversal
+ in defined_expr0 is simplified than iseq_compile_each0.
+ [ruby-core:82113] [Bug #13756]
- * process.c (recv_child_error): retry read on EINTR to fix
- occasional Errno::EINTR from Process.spawn.
+Thu Sep 14 13:26:31 2017 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Feb 20 12:24:59 2014 Eric Hodel <drbrain@segment7.net>
+ string.c: fix false coderange
- * lib/rinda/ring.rb (Rinda::RingFinger#make_socket): Use
- ipv4_multicast_ttl option for portability.
+ * string.c (rb_enc_str_scrub): enc can differ from the actual encoding
+ of the string, the cached coderange is useless then. [Bug #13874]
-Thu Feb 20 10:19:40 2014 Tanaka Akira <akr@fsij.org>
+Thu Sep 14 13:24:51 2017 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/socket/option.c: IP_MULTICAST_LOOP and IP_MULTICAST_TTL socket
- option takes a byte on OpenBSD.
- Fixed by Jeremy Evans. [ruby-core:59496] [Bug #9350]
+ parse.y: primary should not be 0
-Wed Feb 19 15:25:13 2014 Koichi Sasada <ko1@atdot.net>
+ * parse.y (primary): should not be 0, since it can be a receiver.
+ [ruby-core:82447] [Bug #13836]
- * gc.c (ruby_gc_set_params): don't show obsolete warnings for
- RUBY_FREE_MIN/RUBY_HEAP_MIN_SLOTS if
- RUBY_GC_HEAP_FREE_SLOTS/RUBY_GC_HEAP_INIT_SLOTS are given.
- [Bug #9276]
+Thu Sep 14 13:19:30 2017 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Feb 19 14:25:55 2014 Koichi Sasada <ko1@atdot.net>
+ vm_method.c: alias warning at refined method
- * test/ruby/test_gc.rb: ignore warning messages for running with -w
- option such as chkbuild.
+ * vm_method.c (rb_method_entry_make): suppress a warning at
+ refined method which will not be redefined.
+ [ruby-core:82385] [Bug #13817]
-Wed Feb 19 14:25:55 2014 Koichi Sasada <ko1@atdot.net>
+Thu Sep 14 13:14:19 2017 NAKAMURA Usaku <usa@ruby-lang.org>
- * gc.c (get_envparam_double): fix a warning message.
+ * ext/bigdecimal/bigdecimal.c (BigDecimal_hash): st_index_t may not be
+ fixable on 64bit mswin/mingw.
-Wed Feb 19 14:25:55 2014 Koichi Sasada <ko1@atdot.net>
+ * ext/date/date_core.c (d_lite_hash): ditto.
+ [Backport #13877]
- * gc.c: introduce new environment variable
- "RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR" to control major/minor GC
- frequency.
+ * ext/openssl/ossl_bn.c (ossl_bn_hash): ditto.
- Do full GC when the number of old objects is more than R * N
- where R is this factor and
- N is the number of old objects just after last full GC.
+Sat Sep 9 23:05:31 2017 Kazuki Yamaguchi <k@rhe.jp>
- * test/ruby/test_gc.rb: add a test.
-
-Wed Feb 19 07:51:02 2014 Eric Hodel <drbrain@segment7.net>
-
- * lib/rinda/ring.rb (Rinda::RingFinger#make_socket): Use
- ipv4_multicast_loop option for portability. Patch by Jeremy Evans.
- [ruby-trunk - Bug #9351]
-
-Mon Feb 17 05:43:20 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in: reset LDFLAGS and DLDFLAGS for opt-dir again after
- LIBPATHFLAG and RPATHFLAG are set. [ruby-dev:47868] [Bug #9317]
-
-Sun Feb 16 07:13:36 2014 Tanaka Akira <akr@fsij.org>
-
- * configure.in: Fix compilation error.
- https://bugs.ruby-lang.org/issues/8358#note-16
-
-Sun Feb 16 07:13:36 2014 Vit Ondruch <vondruch@redhat.com>
-
- * configure.in: add qouting brackets and append wildcard for the
- rest after target_cpu, to properly detect platform for SSE2
- instructions. [ruby-core:60576] [Bug #8358]
-
-Sun Feb 16 07:13:36 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in: -mstackrealign is necessary for -msse2 working.
- [ruby-core:54716] [Bug #8349]
-
-Sun Feb 16 07:13:36 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in: -mstackrealign is necessary for -msse2 working.
- [ruby-core:54716] [Bug #8349]
-
- * configure.in: use SSE2 instructions to drop unexpected precisions on
- other than mingw. [ruby-core:59472] [Bug #8358]
-
-Sun Feb 16 07:13:36 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in: use SSE2 instructions for drop unexpected
- precisions. [ruby-core:54738] [Bug #8358]
-
-Fri Feb 7 04:19:19 2014 Koichi Sasada <ko1@atdot.net>
-
- * gc.c (get_envparam_int): correct warning messsages.
-
- * gc.c (get_envparam_double): ditto.
-
-Fri Feb 7 04:19:19 2014 Koichi Sasada <ko1@atdot.net>
-
- * gc.c (get_envparam_int): don't accept a value equals to lowerbound
- (changed by last commit) because "" or "foo" (not a number) strings
- are parsed as 0. They should be rejected.
-
- * gc.c (get_envparam_double): ditto.
-
-Thu Feb 6 08:23:28 2014 Eric Wong <e@80x24.org>
-
- * ext/thread/thread.c (rb_szqueue_max_set): use correct queue and
- limit wakeups. [Bug #9343][ruby-core:60517]
- * test/thread/test_queue.rb (test_sized_queue_assign_max):
- test for bug
-
-Thu Feb 6 11:27:39 2014 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems: RubyGems 2.2.2 which contains the following bug fixes:
- http://rubygems.rubyforge.org/rubygems-update/History_txt.html#label-2.2.2+%2F+2014-02-05
- https://bugs.ruby-lang.org/issues/9489
-
-Thu Feb 6 11:23:59 2014 Koichi Sasada <ko1@atdot.net>
-
- * gc.c (ruby_gc_set_params): if RUBY_GC_OLDMALLOC_LIMIT is provided,
- then set objspace->rgengc.oldmalloc_increase_limit.
- Without this fix, the env variable RUBY_GC_OLDMALLOC_LIMIT
- does not work.
-
- * gc.c (get_envparam_int): accept a value equals to lowerbound.
-
- * gc.c (get_envparam_double): ditto.
-
-Wed Feb 5 23:57:05 2014 Charlie Somerville <charliesome@ruby-lang.org>
-
- * ext/thread/thread.c (rb_szqueue_push): check GET_SZQUEUE_WAITERS
- instead of GET_QUEUE_WAITERS to prevent deadlock. Patch by Eric Wong.
- [Bug #9302] [ruby-core:59324]
-
- * test/thread/test_queue.rb: add test
-
-Wed Feb 5 23:43:30 2014 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * hash.c (rb_objid_hash): should return `long'. brushup r44534.
-
- * object.c (rb_obj_hash): follow above change.
-
-Wed Feb 5 23:43:30 2014 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * hash.c (rb_any_hash): should treat the return value of rb_objid_hash()
- as `long', because ruby assumes the hash value of the object id of
- an object is `long'.
- this fixes test failures on mswin64 introduced at r44525.
-
-Wed Feb 5 23:43:30 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * hash.c (rb_objid_hash): return hash value from object ID with a
- salt, extract from rb_any_hash().
-
- * object.c (rb_obj_hash): return same value as rb_any_hash().
- fix r44125. [ruby-core:59638] [Bug #9381]
-
-Wed Feb 5 22:28:41 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm_insnhelper.c (vm_search_super_method): allow bound method from a
- module, yet another method transplanting.
-
-Wed Feb 5 22:28:41 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm_insnhelper.c (vm_search_super_method): when super called in a
- bound UnboundMethod generated from a module, no superclass is
- found since the current defined class is the module, then call
- method_missing in that case. [ruby-core:59619] [Bug #9377]
-
-Wed Feb 5 21:57:40 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/socket/socket.c (rsock_syserr_fail_host_port): add errno
- argument version anduse rb_syserr_fail_str() instead of
- rb_sys_fail_str() with restoring errno.
-
- * ext/socket/socket.c (rsock_syserr_fail_path): ditto, and
- rb_syserr_fail().
-
- * ext/socket/socket.c (rsock_sys_fail_sockaddr): ditto, use
- rsock_syserr_fail_raddrinfo().
-
- * ext/socket/socket.c (rsock_sys_fail_raddrinfo): ditto.
-
- * ext/socket/socket.c (setup_domain_and_type): ditto.
-
-Wed Feb 5 21:57:40 2014 Eric Wong <normalperson@yhbt.net>
-
- * ext/socket/socket.c (rsock_sys_fail_host_port): save and restore errno
- before calling rb_sys_fail_str to prevent [BUG] errno == 0.
- Patch by Eric Wong. [ruby-core:59498] [Bug #9352]
+ asn1: fix out-of-bounds read in decoding constructed objects
- * ext/socket/socket.c (rsock_sys_fail_path): ditto
- * ext/socket/socket.c (rsock_sys_fail_sockaddr): ditto
- * ext/socket/socket.c (rsock_sys_fail_raddrinfo): ditto
- * ext/socket/socket.c (rsock_sys_fail_raddrinfo_or_sockaddr): ditto
+ * OpenSSL::ASN1.{decode,decode_all,traverse}: have a bug of
+ out-of-bounds read. int_ossl_asn1_decode0_cons() does not give the
+ correct available length to ossl_asn1_decode() when decoding the
+ inner components of a constructed object. This can cause
+ out-of-bounds read if a crafted input given.
-Wed Feb 5 21:12:02 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ Reference: https://hackerone.com/reports/170316
+ https://github.com/ruby/openssl/commit/1648afef33c1d97fb203c82291b8a61269e85d3b
- * lib/timeout.rb (Timeout::ExitException.catch): pass arguments
- for new instance.
+Sat Sep 9 22:57:24 2017 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * lib/timeout.rb (Timeout::ExitException#exception): fallback to
- Timeout::Error if couldn't throw. [ruby-dev:47872] [Bug #9380]
+ * ext/json: bump to version 1.8.3.1. [Backport #13853]
- * lib/timeout.rb (Timeout#timeout): initialize ExitException with
- message for the fallback case.
+Sat Sep 9 22:50:10 2017 NARUSE, Yui <naruse@ruby-lang.org>
-Wed Feb 5 21:12:02 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ A HTTP Header value must not contain CR or LF.
+ to_str -> to_s
- * lib/timeout.rb (Timeout#timeout): should not rescue ordinarily
- raised ExitException, which should not be thrown.
+ * lib/net/http/header.rb (set_field): `val` can not have `to_str`.
- * lib/timeout.rb (Timeout::ExitException.catch): set @thread only if
- it ought to be caught.
+Sat Sep 9 22:42:22 2017 Kouhei Sutou <kou@cozmixng.org>
- * lib/timeout.rb (Timeout#timeout): when a custom exception is given,
- no instance is needed to be caught, so defer creating new instance
- until it is raised. [ruby-core:59511] [Bug #9354]
+ * REXML: Fix a bug that unexpected methods can be called as a XPath
+ function. [HackerOne:249295] Reported by Andrea Jegher. Thanks!!!
-Wed Feb 5 17:55:28 2014 Aman Gupta <ruby@tmm1.net>
+Sat Sep 9 22:16:01 2017 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * array.c (ary_add_hash): Fix consistency issue between Array#uniq and
- Array#uniq! [Bug #9340] [ruby-core:59457]
- * test/ruby/test_array.rb (class TestArray): regression test for above.
+ * lib/rubygems: fix several vulnerabilities in RubyGems; bump to version
+ 2.5.2.1. [Backport #13842]
-Wed Feb 5 11:48:42 2014 Charlie Somerville <charliesome@ruby-lang.org>
+Wed Aug 9 22:27:23 2017 NAKAMURA Usaku <usa@ruby-lang.org>
- * struct.c (rb_struct_set): return assigned value from setter method
- rather than struct object. [Bug #9353] [ruby-core:59509]
+ * test/ruby/test_syntax.rb (test_invalid_{break,next}): use
+ assert_in_out_err instead of assert_syntax_error because on ruby_2_3
+ assert_syntax_error uses eval.
- * test/ruby/test_struct.rb (test_setter_method_returns_value): add test
+Wed Aug 9 22:27:23 2017 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Feb 5 11:13:21 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * compile.c (iseq_compile_each0): turned dregx context in "once"
+ into "guarded" type from "block" type, to disallow `next`,
+ `break`, `redo` as well as outside "once".
+ [Bug #13690]
- * string.c (rb_str_modify_expand): enable capacity and disable
- assocation with packed objects when setting capa, so that
- pack("p") string fails to unpack properly after modified.
+Wed Aug 9 21:28:34 2017 NAKAMURA Usaku <usa@ruby-lang.org>
-Sun Feb 2 22:39:28 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/ruby/test_process.rb (test_rlimit_{name,value}): test in UTF-8
+ encoding. fix test failures introduced at r59531 on some platforms.
- * lib/delegate.rb (Delegator): keep source information methods
- which start and end with '__'. [ruby-core:59718] [Bug #9403]
+Wed Aug 9 21:16:22 2017 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Jan 31 12:10:16 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * marshal.c (rb_marshal_dump_limited): do not free dump_arg, which
+ may be dereferenced in check_dump_arg due to continuation, and
+ get rid of dangling pointers.
- * proc.c (mnew_from_me): keep iclass as-is, to make inheritance
- chain consistent. [ruby-core:59358] [Bug #9315]
+ * marshal.c (rb_marshal_load_with_proc): ditto for load_arg.
- * proc.c (method_owner): return the original defined_class from
- prepended iclass, instead.
+Wed Aug 9 21:13:24 2017 NAKAMURA Usaku <usa@ruby-lang.org>
-Fri Jan 31 12:05:59 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * compile.c (iseq_compile_each): remove unused definition of unused
+ variable derived from original patch.
- * configure.in: let mingw do something black-magic, and check if
- _gmtime64_s() is available actually.
+Wed Aug 9 19:45:16 2017 sorah (Shota Fukumori) <her@sorah.jp>
- * win32/win32.c (gmtime_s, localtime_s): use _gmtime64_s() and
- _localtime64_s() if available, not depending on very confusing
- mingw variants macros. based on the patch by phasis68 (Heesob
- Park) at [ruby-core:58764]. [ruby-core:58391] [Bug #9119]
+ Init_frozen_strings definition is removed in r51511.
+ https://bugs.ruby-lang.org/issues/11423
-Thu Jan 30 15:02:35 2014 Shugo Maeda <shugo@ruby-lang.org>
+ Patch by Kohei Suzuki <eagletmt@gmail.com>
- * configure.in: use $@ instead of $(.TARGET) because .TARGET is not
- supported by GNU make.
+ * internal.h: Remove declaration of unexist function
+ [Fix GH-1558]
-Mon Jan 27 16:49:52 2014 Kenta Murata <mrkn@mrkn.jp>
+Wed Aug 9 19:34:17 2017 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/bigdecimal/bigdecimal.c (BigDecimal_divide): Add an additional
- digit for the quotient to be compatible with bigdecimal 1.2.1 and
- the former. [ruby-core:59365] [#9316] [#9305]
+ * internal.h (THROW_DATA_P): parenthesize the argument which is
+ casted.
- * test/bigdecimal/test_bigdecimal.rb: tests for the above change.
+Wed Aug 9 19:34:17 2017 Koichi Sasada <ko1@atdot.net>
- * ext/bigdecimal/bigdecimal.gemspec: bigdecimal version 1.2.4.
+ * vm.c: get return_value from imemo_throw_data object (THROW_DATA_VAL()).
+ imemo_throw_data (TAG_BREAK) contains returned value.
+ However, imemo_throw_data (TAG_BREAK) can skip several frames so that
+ we need to use it only once (at most internal frame). To record it,
+ we introduced THROW_DATA_CONSUMED and check it.
-Mon Jan 27 16:45:34 2014 Yamashita Yuu <yamashita@geishatokyo.com>
+ * internal.h: define THROW_DATA_CONSUMED flag.
- * ext/openssl/ossl_ssl.c (Init_ossl_ssl): Declare a constant
- `OP_MSIE_SSLV2_RSA_PADDING` only if the macro is defined. The
- `SSL_OP_MSIE_SSLV2_RSA_PADDING` has been removed from latest
- snapshot of OpenSSL 1.0.1. [Fixes GH-488]
+ * test/ruby/test_settracefunc.rb: add tests for [Bug #13369]
-Thu Jan 23 10:37:24 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm_insnhelper.h: add THROW_DATA_CONSUMED_P() and
+ THROW_DATA_CONSUMED_SET().
- * hash.c (HAS_EXTRA_STATES): warn extra states only when something
- differ. [ruby-core:59254] [Bug #9275]
+Wed Aug 9 19:32:17 2017 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Jan 9 14:05:24 2014 NAKAMURA Usaku <usa@ruby-lang.org>
+ * random.c (get_rnd, try_get_rnd): ensure initialized to get rid
+ of crash in forked processes. [Bug #13753]
- * win32/{setup.mak,Makefile.sub}: update fake.rb like
- template/fake.rb.in.
+Wed Aug 9 19:30:34 2017 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Jan 9 14:05:24 2014 NAKAMURA Usaku <usa@ruby-lang.org>
+ * ext/strscan/strscan.c (strscan_aref): fix segfault after
+ get_byte or getch which do not apply regexp.
+ [Bug #13759]
- * win32/Makefile.sub (fake.rb): should depend on version.h because
- if RUBY_VERSION is updated, fake.rb need to say the new version
- to avoid install error in rbconfig.rb.
+Wed Aug 9 19:28:40 2017 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Jan 9 08:21:00 2014 Aman Gupta <ruby@tmm1.net>
+ * configure.in: add rpath flags which is needed for OPTDIR as well
+ as -L options, when it is given. [Bug #13411]
- * test/net/imap/cacert.pem: generate new CA cert, since the last one
- expired. [Bug #9341] [ruby-core:59459]
- * test/net/imap/server.crt: new server cert signed with updated CA.
- * test/net/imap/Makefile: add `make regen_certs` to automate this
- process.
+Wed Aug 9 19:14:07 2017 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Dec 26 03:28:11 2013 Koichi Sasada <ko1@atdot.net>
+ * vm_insnhelper.c (vm_throw_start): size of catch table has been
+ included in iseq_catch_table struct, which could be NULL, since
+ 2.2. e.g., proc-closure in `once'.
- * vm_insnhelper.c (argument_error): insert dummy frame to make
- a backtrace object intead of modify backtrace string array.
- [Bug #9295]
+Wed Aug 9 19:09:20 2017 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/ruby/test_backtrace.rb: add a test for this patch.
- fix test to compare a result of Exception#backtrace with
- a result of Exception#backtrace_locations.
+ * node.h (nd_line): should sign-extend. shifting `VALUE` extends
+ with zero bits if `sizeof(VALUE)` equals to `sizeof(int)`. the
+ zero bits are truncated if `sizeof(VALUE)` is bigger enough.
+ [ruby-core:80920] [Bug #13523]
-Wed Dec 25 16:58:31 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Aug 9 17:53:09 2017 NAKAMURA Usaku <usa@ruby-lang.org>
- * proc.c (rb_mod_define_method): consider visibility only if self
- in the caller is same as the receiver, otherwise make public as
- well as old behavior. [ruby-core:57747] [Bug #9005]
- [ruby-core:58497] [Bug #9141]
+ * compile.c (iseq_compile_each): the lifetime of new_opt have to be
+ until this case block is end. this is a part of r57971.
+ [Backport #13766]
- * vm.c (rb_vm_cref_in_context): return ruby level cref if self is
- same.
+Wed Aug 9 17:35:47 2017 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Wed Dec 25 16:35:34 2013 Yusuke Endoh <mame@tsg.ne.jp>
+ this patch contains r54158, r57410, r57631 and r57954.
- * sample/trick2013/: added the award-winning entries of TRICK 2013.
- See https://github.com/tric/trick2013 for the contest outline.
- (Matz has approved the attachment.)
+ Prevent GC by volatile [Bug #13150]
-Tue Dec 24 23:47:50 2013 Koichi Sasada <ko1@atdot.net>
+ test/ruby/test_marshal.rb test_context_switch (load) and test_gc (dump)
+ are failed on FreeBSD 10.3 and gcc7 (FreeBSD Ports Collection) 7.0.0
+ 20170115 (experimental); RB_GC_GUARD looks not worked well.
- * README.EXT: add a refer to URL.
+ * include/ruby/ruby.h (RB_GC_GUARD): prevent guarded pointer from
+ optimization by using as an input to inline asm.
-Tue Dec 24 23:47:50 2013 Koichi Sasada <ko1@atdot.net>
+ * ruby.h: remove comment
- * README.EXT: add a document about RGenGC.
- Reviewed by havenwood.
- [misc #8962]
+ * include/ruby/ruby.h (RB_GC_GUARD): remove comment unsupported by
+ Solaris AS.
- * README.EXT.ja: ditto.
+ Hidden objects (klass == 0) are not visible to Ruby code invoked
+ from other threads or signal handlers, so they can never be
+ accessed from other contexts. This makes it safe to call
+ rb_gc_force_recycle on the object slot after releasing malloc
+ memory.
-Mon Dec 23 19:00:00 2013 Eric Hodel <drbrain@segment7.net>
+ * marshal.c (rb_marshal_dump_limited): hide dump_arg and recycle when
+ done (rb_marshal_load_with_proc): hide load_arg and recycle when done
+ [ruby-core:79518]
- * test/rubygems/test_gem_ext_builder.rb: Fix warning due to ambiguous
- expression.
+ * marshal.c (rb_marshal_dump_limited): do not free dump_arg, which
+ may be dereferenced in check_dump_arg due to continuation, and
+ get rid of dangling pointers.
-Mon Dec 23 16:13:10 2013 Eric Hodel <drbrain@segment7.net>
+ * marshal.c (rb_marshal_load_with_proc): ditto for load_arg.
- * lib/rubygems/commands/install_command.rb: Restore gem install
- --ignore-dependencies for remote gems
- * test/rubygems/test_gem_commands_install_command.rb: Test for the
- above.
+Wed Aug 9 17:28:35 2017 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Dec 23 16:12:24 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
+ * eval.c (setup_exception): make unfrozen copy of special
+ exception before setting up a cause.
- * array.c: Have to_h raise on elements that are not key-value pairs
- [#9239]
+Wed Aug 9 17:22:29 2017 TAKANO `takano32' Mitsuhiro <tak@no32.tk>
- * enum.c: ditto
+ a64: fix crash on register stack mark/sweep pass
-Sun Dec 22 19:22:52 2013 Eric Hodel <drbrain@segment7.net>
+ * thread_pthread.c: move 'register_stack_start' earlier.
+ [ruby-core:79928] [Bug #13284] [Fix GH-1625]
- * lib/rdoc.rb: Set RDoc to release version.
+ Author: Sergei Trofimovich <slyfox@gentoo.org>
-Sun Dec 22 19:22:31 2013 Eric Hodel <drbrain@segment7.net>
+Wed Aug 9 17:10:27 2017 Shugo Maeda <shugo@ruby-lang.org>
- * lib/rubygems.rb: Set RubyGems to release version.
+ * test/net/smtp/test_smtp.rb (test_tls_connect, test_tls_connect):
+ use Socket.tcp_server_sockets in case localhost is resolved to ::1.
-Sun Dec 22 19:22:01 2013 Eric Hodel <drbrain@segment7.net>
+Wed Aug 9 17:10:27 2017 Shugo Maeda <shugo@ruby-lang.org>
- * lib/rubygems.rb (module Gem): Fix comment for
- Gem::load_path_insert_index.
+ * lib/net/smtp.rb (tlsconnect): support timeout for TLS handshake.
+ [ruby-core:76893] [Bug #12678]
-Sun Dec 22 18:08:42 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * lib/net/protocol.rb (ssl_socket_connect): new method to implement
+ timeout for TLS handshake.
- * win32/Makefile.sub (fake.rb): fixed wrong RUBY_PLATFORM, to correctly
- install win32.h.
- [ruby-core:58801][Bug #9199] reported by arton.
+ * lib/net/http.rb (connect): use Net::Protocol#ssl_socket_connect.
-Fri Dec 20 17:52:50 2013 Koichi Sasada <ko1@atdot.net>
+Wed Aug 9 17:08:01 2017 NARUSE, Yui <naruse@ruby-lang.org>
- * vm_method.c: check definition of
- GLOBAL_METHOD_CACHE_SIZE and GLOBAL_METHOD_CACHE_MASK.
+ Zlib::GzipReader#pos underflows after calling #ungetbyte or #ungetc at start of file [Bug #13616]
-Fri Dec 20 17:03:10 2013 Koichi Sasada <ko1@atdot.net>
+ patched by Andrew Haines <andrew@haines.org.nz> [ruby-core:81488]
+ zlib.c: fix unnormalized Fixnum
- * include/ruby/ruby.h: rename OBJ_WRITE and OBJ_WRITTEN into
- RB_OBJ_WRITE and RB_OBJ_WRITTEN.
+ * ext/zlib/zlib.c (rb_gzfile_total_out): cast to long not to
+ result in an unsigned long to normalized to Fixnum on LLP64
+ platforms. [ruby-core:81488]
- * array.c, class.c, compile.c, hash.c, internal.h, iseq.c,
- proc.c, process.c, re.c, string.c, variable.c, vm.c,
- vm_eval.c, vm_insnhelper.c, vm_insnhelper.h,
- vm_method.c: catch up this change.
+Wed Aug 9 17:03:00 2017 Eric Wong <normalperson@yhbt.net>
-Fri Dec 20 16:01:35 2013 Koichi Sasada <ko1@atdot.net>
+ process.c: handle dynamic :rlimit_* symbols in spawn execopts
- * include/ruby/ruby.h: add a comment for WB interfaces.
+ * process.c (rb_execarg_addopt_rlimit): hoist out of rb_execarg_addopt
+ (rlimit_type_by_sym): new wrapper for dynamic symbol
+ (rb_execarg_addopt): check for dsym via rlimit_type_by_sym
+ * test/ruby/test_process.rb (test_execopts_rlimit): check dsym w/o pindown
+ Add extra check for bogus rlimit args, too.
+ [ruby-core:82033] [Bug #13744]
+ process.c: null bytes
-Fri Dec 20 16:00:52 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * process.c (rlimit_type_by_sym): prohibit null bytes in key
+ names. [ruby-core:82033] [Bug #13744]
- * configure.in: DLDFLAGS is defined in --with-opt-dir handler, so
- ${DLDFLAGS=} does not work now. use RUBY_APPEND_OPTIONS instead.
- [ruby-dev:47855] [Bug #9256]
+Wed Aug 9 16:56:52 2017 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Dec 20 14:19:12 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ optparse.rb: get rid of eval
- * configure.in (AC_ARG_WITH): use withval directly.
- fix failure on FreeBSD.
- http://fb32.rubyci.org/~chkbuild/ruby-trunk/log/20131217T070301Z.diff.html.gz
+ * lib/optparse.rb: try Float() and Integer() instead of eval,
+ which does too much things.
-Fri Dec 20 14:00:01 2013 Aman Gupta <ruby@tmm1.net>
- * include/ruby/ruby.h (struct RClass): add super, remove iv_index_tbl.
- since RCLASS_SUPER() is commonly used inside while loops, we move it
- back inside struct RClass to improve cache hits. this provides a
- small improvement (1%) in hotspots like rb_obj_is_kind_of()
- * internal.h (struct rb_classext_struct): remove super, add
- iv_index_table
- * internal.h (RCLASS_SUPER): update for new location
- * internal.h (RCLASS_SET_SUPER): ditto
- * internal.h (RCLASS_IV_INDEX_TBL): ditto
- * object.c (rb_class_get_superclass): ditto
- * include/ruby/backward/classext.h (RCLASS_SUPER): ditto
+Fri Jul 7 10:58:10 2017 Eric Wong <e@80x24.org>
-Fri Dec 20 07:07:35 2013 Eric Hodel <drbrain@segment7.net>
+ This backport of r58812 is necessary to ease backporting r59028,
+ which fixes a real bug.
- * lib/rubygems: Update to RubyGems master 03d6ae7. Changes include:
+ * thread.c (struct waiting_fd): declare
+ (rb_thread_io_blocking_region): use on-stack list waiter
+ (rb_notify_fd_close): walk vm->waiting_fds instead
+ (call_without_gvl): remove old field setting
+ (th_init): ditto
+ [Feature #9632]
- * Fixed typos.
+ * vm_core.h (typedef struct rb_vm_struct): add waiting_fds list
- * Relaxed Gem.ruby test for ruby packagers that do not use `ruby`.
+ * (typedef struct rb_thread_struct): remove waiting_fd field
+ (rb_vm_living_threads_init): initialize waiting_fds list
- * test/rubygems: ditto.
-
-Thu Dec 19 14:03:04 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c (heap_get_freeobj): improve hot path performance.
-
- * gc.c (heap_get_freeobj_from_next_freepage): replace with
- heap_get_freepage(). It returns freeobj instead of freepage.
- This is not on hot path.
-
-Thu Dec 19 12:05:17 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems: Update to RubyGems master af60443. Changes include:
-
- * Improved speed of `gem install --ignore-dependencies`.
+ This should fix bad interactions with test_race_gets_and_close
+ in test/ruby/test_io.rb since we ensure rb_notify_fd_close
+ continues returning the busy flag after enqueuing the interrupt.
- * Open read-write for exclusive flock. [ruby-trunk - Bug #9257]
+ * thread.c (rb_notify_fd_close): do not enqueue multiple interrupts
+ [ruby-core:81581] [Bug #13632]
- * Remove specification before install to prevent infinite loop.
+ * test/ruby/test_io.rb (test_single_exception_on_close):
+ new test based on script from Nikolay
-Thu Dec 19 11:23:49 2013 Aman Gupta <ruby@tmm1.net>
+Wed Jul 5 15:55:35 2017 NAKAMURA Usaku <usa@ruby-lang.org>
- * vm_insnhelper.c (vm_call_iseq_setup_normal): simple for loop
- condition optimization. this area shows up as a hotspot in VM
- profiles.
+ * ext/openssl/ossl_cipher.c: remove the encryption key initialization
+ from Cipher#initialize. This is effectively a revert of r32723
+ ("Avoid possible SEGV from AES encryption/decryption", 2011-07-28).
+ the patch is derived from https://github.com/ruby/openssl/commit/8108e0a6db133f3375608303fdd2083eb5115062,
+ written by Kazuki Yamaguchi.
+ [Backport #8221]
-Thu Dec 19 10:50:13 2013 Koichi Sasada <ko1@atdot.net>
+Sat Jul 1 00:28:22 2017 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * gc.c (newobj_of): don't need to RBASIC_SET_CLASS() which includes WB
- here because created obj is always YOUNG/INFANT.
+ * ext/psych/yaml: update libyaml to 0.1.7.
-Thu Dec 19 10:48:37 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/psych/psych.gemspec: bump version to 2.1.0.1.
- * benchmark/gc/gcbench.rb: check GC::OPTS availability
- for not MRI 2.1.0.
+Fri Jun 30 22:05:39 2017 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Dec 19 03:10:30 2013 Aman Gupta <ruby@tmm1.net>
+ * parse.y (parser_precise_mbclen): check invalid multibyte char at
+ skipping strings following ?x literal string, not to stuck in a
+ infinite loop. [Bug #13672]
- * gc.c (heap_get_freeobj): remove redundant assignment. heap->freelist
- is set after the while() loop already.
+Fri Jun 30 22:00:56 2017 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Dec 19 01:54:30 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/pathname/lib/pathname.rb (Pathname#plus): UNC root pathname needs
+ a separator. File.basename returns "/" on UNC root, as well as sole
+ drive letter, even if it does not end with a separator. [Bug #13515]
- * test/runner.rb: fix commit miss on r44278.
+Fri Jun 30 21:57:27 2017 Kouhei Sutou <kou@cozmixng.org>
-Thu Dec 19 00:26:11 2013 Koichi Sasada <ko1@atdot.net>
+ * lib/rexml/parsers/streamparser.rb: add close tag check on end of
+ document to StreamParser [Bug #13636]
+ Reported by Anton Sivakov. Thanks!!!
- * gc.c (garbage_collect_body): lazy_sweep setting should work
- without USE_RGENGC.
+Fri Jun 30 21:54:01 2017 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Dec 18 23:31:04 2013 Koichi Sasada <ko1@atdot.net>
+ * array.c (rb_ary_insert): check position to insert even if no elements
+ to be inserted. [Bug #13558]
- * gc.c (gc_profile_dump_major_reason): fix this function because major_reason
- can be OR of multiple reasons.
+Fri Jun 30 21:51:40 2017 Marcus Stollsteimer <sto.mar@web.de>
- * gc.c (gc_profile_dump_on): ditto.
+ * ext/date/date_core.c: [DOC] fix documentation for %Z format of
+ {Date,DateTime}.strftime.
+ Reported by Damon Timm. Based on a patch by nano.
+ [Bug #13231] [Fix GH-1565]
-Wed Dec 18 17:03:00 2013 Koichi Sasada <ko1@atdot.net>
+Fri Jun 30 21:46:50 2017 Kouhei Sutou <kou@cozmixng.org>
- * gc.c (gc_profile_record_get): should return an empty array
- when profiling is active.
+ * lib/rss/rss.rb: Accept empty text element as valid element
+ Parser has been accepted it but XML serializer wasn't accepted.
+ Reported by stefano frabetti. Thanks!!!
+ [Bug #13531]
-Wed Dec 18 16:49:40 2013 Koichi Sasada <ko1@atdot.net>
+Fri Jun 30 21:40:42 2017 Kazuki Yamaguchi <k@rhe.jp>
- * gc.c (gc_profile_clear, gc_profile_enable): remove rest_sweep().
+ * ext/openssl/ossl_x509store.c: clear error queue after calling
+ X509_LOOKUP_load_file()
- * gc.c: check objspace->profile.current_record before inserting
- profiling record by new macro gc_prof_enabled().
+ X509_LOOKUP_load_file(), which ends up calling
+ X509_load_cert_crl_file()
+ internally, may leave error entries in the queue even when it returns
+ non-zero value (which indicates success).
-Wed Dec 18 14:32:06 2013 Koichi Sasada <ko1@atdot.net>
+ This will be fixed by OpenSSL 1.1.1, but can be worked around by
+ clearing the error queue ourselves.
- * vm_exec.h (VM_DEBUG_STACKOVERFLOW): added.
- disable stack overflow check for every stack pushing as default.
+ Fixes: [Backport #11033]
- * vm_exec.c (vm_stack_overflow_for_insn): ditto.
+Fri Jun 30 21:35:16 2017 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Dec 18 10:00:22 2013 Eric Hodel <drbrain@segment7.net>
+ * gc.c (heap_page_allocate): expand sorted pages before inserting
+ allocated new page. [Bug #12670]
- * lib/rubygems: Update to RubyGems master d8f12e2. This increases the
- speed of `gem install --ignore-dependencies` which helps bundler
- tests.
- * test/rubygems: ditto.
+Fri Jun 30 21:33:39 2017 Koichi Sasada <ko1@atdot.net>
-Wed Dec 18 09:00:17 2013 Koichi Sasada <ko1@atdot.net>
+ * gc.c (heap_page_resurrect): do not return tomb_pages when
+ page->freelist == NULL.
+ [Bug #12670]
- * test/ruby/test_gc.rb (test_expand_heap): allow +/-1 diff.
+Fri Jun 30 21:23:20 2017 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Dec 17 23:44:15 2013 Kazuki Tsujimoto <kazuki@callcc.net>
+ * vsnprintf.c (BSD_vfprintf): sign and hex-prefix should not be counted
+ in precision. [Bug #8916]
- * test/ruby/test_io.rb: fix duplicated test name.
+Fri Jun 30 21:20:14 2017 Koichi Sasada <ko1@atdot.net>
-Tue Dec 17 20:15:00 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * thread.c (ruby_thread_stack_overflow): disable VM events when stack
+ overflow occurred; it causes another stack overflow again in making
+ backtrace object, and crashes. [Bug #13425]
- * hash.c (rb_hash_reject): revert to deprecated behavior, with
- warnings, due to compatibility for HashWithDifferentAccess.
- [ruby-core:59154] [Bug #9223]
+ * vm.c (hook_before_rewind): skip rewind hooks if err is
+ SystemStackError because rewind hooks can cause stack overflow again
+ and again.
-Tue Dec 17 17:30:56 2013 Akinori MUSHA <knu@iDaemons.org>
+ * thread.c (ruby_thread_stack_overflow): do not disable all hooks.
+ Additionally, clearing ruby_vm_event_flags is not suitable way
+ to disable hooks.
- * misc/ruby-electric.el: Import version 2.1.1 from
- https://github.com/knu/ruby-electric.el.
+Fri Jun 30 21:13:25 2017 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ruby-electric-delete-backward-char: Enable support for number
- prefix.
+ * proc.c (method_super_method): skip prepended modules and continue from
+ the super class of the original class. [Bug #13656]
- * ruby-electric-curlies: Fix electric operation after an open
- curly.
+Fri Jun 30 21:10:48 2017 Shugo Maeda <shugo@ruby-lang.org>
-Tue Dec 17 16:19:09 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * lib/net/smtp.rb (getok, get_response): raise an ArgumentError when
+ CR or LF is included in a line, because they are not allowed in
+ RFC5321. Thanks, Jeremy Daer.
- * vm_trace.c (rb_postponed_job_flush): isolate exceptions in
- postponed jobs and restore outer ones. based on a patch by
- tarui. [ruby-core:58652] [Bug #9168]
+Fri Jun 30 21:07:56 2017 NAKAMURA Usaku <usa@ruby-lang.org>
-Tue Dec 17 10:48:04 2013 Aman Gupta <ruby@tmm1.net>
+ * eval.c (exc_setup_cause): need to unfreeze(=dup) the exception before
+ setting cause if its frozen.
- * configure.in (RUBY_DTRACE_POSTPROCESS): Fix compatibility with
- systemtap on linux. stap requires `dtrace -G` post-processing, but
- the dtrace compatibility wrapper is very strict about probes.d
- syntax.
+Fri Jun 30 21:07:14 2017 Eric Wong <e@80x24.org>
-Tue Dec 17 05:18:17 2013 Eric Hodel <drbrain@segment7.net>
+ thread.c: avoid busy looping on rb_thread_fd_close
- * lib/rubygems: Update to RubyGems master 1c5f4b3. Allows rubygems
- repackagers to disable backward-compatible shared gem directory
- behavior.
- * test/rubygems: ditto.
+ We no longer use it this function, but extensions do, and
+ we need to ensure it continues to work for them.
-Tue Dec 17 05:14:35 2013 Eric Hodel <drbrain@segment7.net>
+ * thread.c (rb_thread_fd_close): schedule other threads in loop
- * NEWS (RDoc): Update version number so I don't have to change it
- for the final release.
+ * ext/-test-/thread_fd_close/thread_fd_close.c: new file
-Mon Dec 16 19:19:19 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/-test-/thread_fd_close/depend: ditto
- * gc.c (rb_objspace_markable_object_p): should check special_const_p
- first (by is_markable_object()).
+ * ext/-test-/thread_fd_close/extconf.rb: ditto
-Mon Dec 16 19:12:54 2013 Koichi Sasada <ko1@atdot.net>
+ * test/-ext-/thread_fd_close/test_thread_fd_close.rb: new test
- * ext/objspace/objspace.c (reachable_object_from_root_i): use
- compare_by_identity hash to avoid hash modify problem
- during iteration.
- [Bug #9252]
+Fri Jun 30 20:34:49 2017 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
- * ext/objspace/objspace.c (reachable_objects_from_root): ditto.
+ * sample/pty/shl.rb: update sample
+ * Specify frozen_string_literal: true.
+ * Fix TypeError of raise.
+ * Use a character literal instead of Integer.
-Mon Dec 16 18:16:28 2013 Koichi Sasada <ko1@atdot.net>
+Fri Jun 30 20:31:59 2017 Marcus Stollsteimer <sto.mar@web.de>
- * gc.c (gc_verify_internal_consistency): should not use
- rb_objspace_each_objects() because it call rest_sweep().
+ * string.c: [DOC] clarify docs for String#split when called with limit
+ and capture groups. Reported by Cichol Tsai. [Bug #13621]
-Mon Dec 16 18:07:30 2013 Koichi Sasada <ko1@atdot.net>
+Fri Jun 30 20:23:31 2017 Takashi Kokubun <takashikkbn@gmail.com>
- * gc.c (rb_objspace_markable_object_p): fix last commit (build error).
+ * lib/erb.rb: Allow explicit trimming carriage return when trim_mode is
+ "-", for Windows environments. [Bug #5339]
-Mon Dec 16 18:04:28 2013 Koichi Sasada <ko1@atdot.net>
+ * lib/erb.rb: Allow trimming CR in all trim_modes to unify a behavior
+ with r58823 and r58825.
- * gc.c (rb_objspace_markable_object_p): it should be live objects.
+Fri Jun 30 20:16:15 2017 Takashi Kokubun <takashikkbn@gmail.com>
-Mon Dec 16 18:00:51 2013 Koichi Sasada <ko1@atdot.net>
+ * lib/erb.rb: Allow trimming carriage return when trim_mode is "<>", for
+ Windows environments. [Bug #11464]
- * gc.c (rb_objspace_each_objects): should not clear dont_lazy_sweep
- flag in nested case.
+Fri Jun 30 20:07:37 2017 NARUSE, Yui <naruse@ruby-lang.org>
-Mon Dec 16 16:40:35 2013 Koichi Sasada <ko1@atdot.net>
+ * util.c (ruby_strtod) Merge latest dtoa.c [Bug #13545]
+ Apply some part of http://www.netlib.org/fp/dtoa.c with my eyes...
- * vm_method.c (rb_method_entry_make): fix WB miss.
- Note that rb_method_entry_t::klass is not constified.
- We may constify this field.
+Fri Jun 30 20:00:18 2017 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/ruby/test_alias.rb: add a test.
+ * dir.c (is_case_sensitive): use getattrlist() if fgetattrlist() is
+ unavailable, on OSX 10.5. [Bug #11054]
-Mon Dec 16 14:14:22 2013 Koichi Sasada <ko1@atdot.net>
+Fri Jun 30 19:58:16 2017 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c: use gc_verify_internal_consistency() instead of
- gc_check_before_marks_i() for check consistency
- on RGENGC_CHECK_MODE >= 2.
+ * tool/mkconfig.rb (RbConfig): prefix SDKROOT to oldincludedir
+ not includedir, the latter is outside the ruby installation.
+ [ruby-core:72496] [Bug #11881]
-Mon Dec 16 14:01:48 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Fri Jun 30 19:56:06 2017 Eric Wong <e@80x24.org>
- * process.c (make_clock_result): add :second as a unit for
- Process.clock_gettime.
+ * variable.c (check_autoload_required): do not assume a provided feature
+ means autoload is complete, always wait if autoload is being performed
+ by another thread. [Bug #11384] Thanks to s.wanabe@gmail.com
-Mon Dec 16 13:10:54 2013 Koichi Sasada <ko1@atdot.net>
+Fri Jun 30 19:53:30 2017 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c: introduce GC.verify_internal_consistency method to verify GC
- internal data structure.
+ * process.c (obj2uid, obj2gid): use temporary string as the buffer
+ instead of rb_alloc_tmp_buffer, which is NODE_ALLOCA since r51492.
+ [Bug #13554]
- Now this method only checks generation (old/young) consistency.
+Fri Jun 30 19:50:25 2017 Eric Wong <e@80x24.org>
-Mon Dec 16 11:49:26 2013 Aman Gupta <ruby@tmm1.net>
+ * variable.c (autoload_reset): use idempotent list_del_init
- * gc.c (gc_info_decode): Fix build errors when compiled with
- RGENGC_ESTIMATE_OLDMALLOC=0
- * gc.c (objspace_malloc_increase): ditto
+ * variable.c (autoload_sleep): moved code from rb_autoload_load
-Sun Dec 15 13:38:29 2013 Koichi Sasada <ko1@atdot.net>
+ * variable.c (autoload_sleep_done): cleanup for use with rb_ensure
- * ext/objspace/objspace.c (reachable_object_from_root_i):
- reachable objects should not include categories and
- category_objects because it is noisy information.
+ * variable.c (rb_autoload_load): ensure list delete happens in case the
+ thread dies during sleep
- In fact, objects created after calling
- ObjectSpace.reachable_objects_from_root should not be included
- as a returning hash objects. Currently, mswin64 platform has a
- problem because of this behavior. Should we trace new objects?
+ * test/ruby/bug-13526.rb: new script for separate execution
-Sun Dec 15 07:09:28 2013 Eric Hodel <drbrain@segment7.net>
+ * test/ruby/test_autoload.rb (test_bug_13526): new test [Bug #13526]
- * lib/rdoc: Update to RDoc master 263a9e5. This improves the
- accessibility of the search box.
+Fri Jun 30 19:46:46 2017 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Dec 14 17:39:00 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * sprintf.c (rb_str_format): while "% 2f" and "% 4f" result in " Inf"
+ and " Inf" respectively, "% 3f" results in "Inf" (no space).
- * vm_insnhelper.c (vm_callee_setup_arg_complex): count post
- arguments as mandatory arguments. [ruby-core:57706] [Bug #8993]
+ * sprintf.c (rb_str_format): as for non-finite float, calculate the
+ exact needed size with the space flag.
- * vm_insnhelper.c (vm_yield_setup_block_args): ditto.
+Fri Jun 30 19:41:48 2017 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Dec 14 16:26:46 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * thread_win32.c (w32_wait_events): do not acquire GVL, to fix deadlock
+ at read/close race condition. instead, just ignore interrupt_event if
+ it is closed.
- * configure.in (rubylibprefix): replace exec_prefix as well as
- bindir and libdir. a patch by kimuraw (Wataru Kimura) at
- [ruby-dev:47852]. [Bug #9160]
+ * thread_win32.c (w32_wait_events): fix wait object index in the case of
+ interrupt_event is not usable.
-Sat Dec 14 14:42:53 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Jun 30 19:37:47 2017 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * lib/logger.rb (lock_shift_log): no need to rotate the log file
- if it has been rotated by another process. based on the patch
- by no6v (Nobuhiro IMAI) in [ruby-core:58620]. [Bug #9133]
+ * io.c (nogvl_wait_for_single_fd): nogvl_wait_for_single_fd must wait
+ as its name.
+ poll(fds, n, 0) mean no timeout and immediately return. If you want to
+ wait something, you need to use -1 instead.
-Sat Dec 14 13:01:45 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Jun 30 19:35:31 2017 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * proc.c (mnew_from_me): method by respond_to_missing? should be
- owned by the original class.
+ * class.c (Init_class_hierarchy): prevent rb_cObject which is the class
+ tree root, from GC. [Bug #12492]
-Sat Dec 14 11:55:31 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Jun 30 19:32:52 2017 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/scanf.rb (IO#scanf): fix mistaken use of rescue modifier.
- a patch by Mon_Ouie at [ruby-core:52813]. [Bug #7940]
+ * class.c (Init_class_hierarchy): prevent rb_cObject which is the
+ class tree root, from GC. [ruby-dev:49666] [Bug #12492]
-Sat Dec 14 11:44:52 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Jun 30 19:29:45 2017 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * util.c (ruby_qsort): fix potential stack overflow on a large
- machine. based on the patch by Conrad Irwin <conrad.irwin AT
- gmail.com> at [ruby-core:51816]. [Bug #7772]
+ * ext/ripper/lib/ripper/lexer.rb (on_heredoc_dedent): fix for nested
+ indedented here documents, where Elems are nested too. [Bug #13536]
-Sat Dec 14 11:25:56 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/ripper/lib/ripper/lexer.rb (on_heredoc_dedent): insert stripped
+ leading spaces as on_ignored_sp elements, so that the original source
+ can be reconsructed. [Bug #13536]
- * object.c (rb_mod_const_defined): support nested class path as
- well as const_get. [Feature #7414]
+Mon May 1 06:36:57 2017 NAKAMURA Usaku <usa@ruby-lang.org>
-Sat Dec 14 01:31:52 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * parse.y (parser_parse_string): set the mark of term to `nd_func`
+ because in this version `u2.id` is not used for this purpose.
+ fixed failure of ruby/spec introduced at r58518.
+ see also [Backport #13363]
- * eval.c (rb_rescue2): reuse tags pushed for body proc to protect
- rescue proc too.
+Sun Apr 30 23:01:00 2017 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Dec 14 01:15:51 2013 Masaya Tarui <tarui@ruby-lang.org>
+ class.c: ensure_includable
- * gc.c (wmap_final_func): Bugfix. Should update *value to new pointer.
+ * class.c (ensure_includable): extract checks to include and
+ prepend.
-Sat Dec 14 01:05:46 2013 Tanaka Akira <akr@fsij.org>
+ class.c: prohibit refinement module
- * ext/socket/lib/socket.rb: Don't test $! in "ensure" clause because
- it may be set before the body.
- Reported by ko1 and mrkn. [ruby-core:59088] [Bug #9247]
+ * class.c (ensure_includable): cannot include refinement
+ module, or the type and the class do not match.
+ [ruby-core:79632] [Bug #13236]
- * lib/cgi/core.rb: Ditto.
+Sun Apr 30 22:55:41 2017 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/drb/ssl.rb: Ditto.
+ keep line number after unterminated string literal
-Sat Dec 14 00:34:31 2013 Naohisa Goto <ngotogenome@gmail.com>
+ * parse.y (parser_parse_string): keep line number even after an
+ unterminated string literal. it does not matter in the parser,
+ ripper needs this value after this error.
- * internal.h (ruby_sized_xrealloc2): fix typo introduced in r44117,
- which cause compile error on Solaris.
+ parse.y: unterminated content token
-Sat Dec 14 00:22:16 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * parse.y (parser_parse_string): defer the end token to next
+ reading, to yield tSTRING_CONTENT with the unterminated content.
+ [Bug #13363]
- * thread.c: (exec_recursive): use rb_catch_protect() instead of
- rb_catch_obj() and PUSH_TAG(), and reduce pushing tags and
- machine stack usage.
+Sun Apr 30 22:52:38 2017 Marcus Stollsteimer <sto.mar@web.de>
-Sat Dec 14 00:18:08 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * io.c: [DOC] expand docs for IO#puts
+ [Bug #13306]
- * proc.c (mnew_from_me): achieve the original defined_class from
- prepended iclass, to fix inherited owner.
+Sun Apr 30 22:38:44 2017 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * proc.c (method_owner): return the defined class, but not the
- class which the method object is created from.
+ sample/pty/shl.rb: update [ci skip]
-Fri Dec 13 22:29:21 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * sample/pty/shl.rb: stop writer loop when the child exited.
+ PTY::ChildExited no longer raises asynchronously since r20298.
+ [ruby-dev:49974] [Bug #13191]
- * proc.c (method_owner): return the class where alias is defined, not
- the class original method is defined.
+ * sample/pty/shl.rb: use io/console instead of stty.
+ [ruby-dev:49974] [Bug #13191]
- * vm_method.c (rb_method_entry_make, rb_alias): store the originally
- defined class in me. [Bug #7993] [Bug #7842] [Bug #9236]
+ * sample/pty/shl.rb: do not manage array length separately.
+ [ruby-dev:49974] [Bug #13191]
- * vm_method.c (rb_method_entry_get_without_cache): cache included
- module but not iclass.
+ * sample/pty/shl.rb: leap exited child process.
+ [ruby-dev:49974] [Bug #13191]
-Fri Dec 13 16:27:17 2013 Aman Gupta <ruby@tmm1.net>
+Sun Apr 30 22:35:10 2017 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c (gc_info_decode): Use :major_by=>:nofree as fallback reason
- when other trigger conditions are present.
+ configure.in: use AC_SEARCH_LIBS
-Fri Dec 13 13:25:30 2013 Koichi Sasada <ko1@atdot.net>
+ * configure.in (--with-gmp, --with-jemalloc): use AC_SEARCH_LIBS
+ to check if no library is required, instead of AC_CHECK_LIB.
+ [ruby-core:79368] [Bug #13175]
- * error.c: add Exception#backtrace_locations.
- Now, there are no setter and independent from Exception#backtrace.
- [Feature #8960]
+Sun Apr 30 22:24:25 2017 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (setup_exception): set backtrace locations for `bt_location'
- special attribute.
+ * numeric.c (flo_round): [EXPERIMENTAL] adjust the case that the
+ receiver is close to the exact but unrepresentable middle value
+ of two values in the given precision.
+ http://d.hatena.ne.jp/hnw/20160702
- * vm_backtrace.c (rb_backtrace_to_location_ary): added.
+Sun Apr 9 22:21:23 2017 NAKAMURA Usaku <usa@ruby-lang.org>
- * internal.h: ditto.
+ thread.c: rb_thread_fd_close [ci skip]
- * test/ruby/test_backtrace.rb: add a test for
- Exception#backtrace_locations.
+ * thread.c (rb_thread_fd_close): re-define because of a couple of
+ external libraries used it.
-Fri Dec 13 12:01:07 2013 Koichi Sasada <ko1@atdot.net>
+Wed Mar 29 23:47:31 2017 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
- * gc.c (garbage_collect_body): use rb_bug() and explicit error message
- instead of using assert().
- [Bug #9222]
+ * hash.c (any_hash): fix CI failure on L32LLP64 architecture.
+ The patch was provided by usa. [ruby-core:80484] [Bug #13376]
-Fri Dec 13 11:52:41 2013 Koichi Sasada <ko1@atdot.net>
+Wed Mar 29 06:22:27 2017 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
- * array.c: fix comment to remove the word "shady".
+ * hash.c (any_hash): fix Symbol#hash to be nondeterministic.
+ The patch was provided by Eric Wong. [ruby-core:80433] [Bug #13376]
- * variable.c: ditto.
+ * test/ruby/test_symbol.rb: add test for above.
-Fri Dec 13 11:33:55 2013 Koichi Sasada <ko1@atdot.net>
+Tue Mar 28 00:38:39 2017 NAKAMURA Usaku <usa@ruby-lang.org>
- * gc.c: rename *shady* func/macros.
- * RVALUE_RAW_SHADY() -> RVALUE_WB_PROTECTED_RAW()
- * RVALUE_SHADY() -> RVALUE_RAW_SHADY()
- * rgengc_check_shady() -> rgengc_check_relation().
- And fix some messages using "shady" to "non-WB-protected".
+ * win32/win32.c (poll_child_status): rb_w32_wait_events_blocking() sets
+ errno internally, then should not set it here.
-Fri Dec 13 10:04:23 2013 Eric Hodel <drbrain@segment7.net>
+Mon Mar 27 20:15:17 2017 Kazuki Tsujimoto <kazuki@callcc.net>
- * lib/rubygems/request_set/lockfile.rb: Import RubyGems master a8d0669
- with a 1.8.7 compatibility fix.
- * test/rubygems/test_gem_request_set_lockfile.rb: ditto.
+ * eval.c, method.h, proc.c, vm.c, vm_eval.c, vm_insnhelper.c, vm_method.c:
+ TracePoint#method_id should return method_id, not callee_id.
+ [ruby-core:77241] [Feature #12747]
-Fri Dec 13 09:50:49 2013 Eric Hodel <drbrain@segment7.net>
+ * test/ruby/test_settracefunc.rb: change accordingly.
- * lib/rubygems: Update to RubyGems master ddac51f. Changes:
+Mon Mar 27 20:12:23 2017 Anton Davydov <mail@davydovanton.com>
- * Allow override for the shared gem installation directory for
- rubygems packagers.
+ * lib/uri/mailto.rb: Removed needless `return` and use `.`` instead of `::`
+ with class method.
+ * test/uri/test_mailto.rb: Added tests for coverage.
- * Lock gem cache files for read and write to improve thread safety.
+Mon Mar 20 06:35:08 2017 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * Use io/console when available.
+ * ruby.c (process_options): convert -e script to the encoding
+ given by a command line option on Windows. assume it is the
+ expected encoding. [ruby-dev:49461] [Bug #11900]
- * Minor cleanup.
+Mon Mar 20 05:47:49 2017 Koichi Sasada <ko1@atdot.net>
- * test/rubygems: ditto.
-
-Fri Dec 13 08:15:31 2013 Aman Gupta <ruby@tmm1.net>
+ * test/ruby/test_exception.rb: fix thread issues.
+ * use Queue instead of a local variable for synchronization.
+ * join created thread to soleve leaking threads warning.
- * class.c (include_modules_at): use RCLASS_M_TBL_WRAPPER for
- equality checks. this avoids an unnecessary deference inside a tight
- loop, fixing a performance regression from r43973.
- * object.c (rb_obj_is_kind_of): ditto.
- * object.c (rb_class_inherited_p): ditto.
+Mon Mar 20 05:47:49 2017 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Dec 13 02:00:00 2013 Kenta Murata <mrkn@mrkn.jp>
+ * thread.c (rb_threadptr_raise): set cause from the called thread,
+ but not from the thread to be interrupted.
+ [ruby-core:77222] [Bug #12741]
- * ext/bigdecimal/bigdecimal.c (VpSetPTR): fix for limitation of the resulting
- precision.
- [ruby-core:50269] [Bug #7458]
+Wed Feb 8 02:17:02 2017 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/bigdecimal/test_bigdecimal.rb (test_limit): add tests for the above
- change.
+ * lib/forwardable.rb (Forwardable._delegator_method): extract
+ method generator and deal with non-module objects.
+ [ruby-dev:49656] [Bug #12478]
-Wed Dec 13 01:56:00 2013 Kenta Murata <mrkn@mrkn.jp>
+Wed Feb 8 02:17:02 2017 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/bigdecimal/bigdecimal.c (VpAddAbs): put out a conditional branch from
- the inside of while-loop.
+ * lib/forwardable.rb (def_instance_delegator): adjust backtrace of
+ method body by tail call optimization. adjusting the delegated
+ target is still done by deleting backtrace.
- * ext/bigdecimal/bigdecimal.c (VpSubAbs): ditto.
+ * lib/forwardable.rb (def_single_delegator): ditto.
-Wed Dec 13 01:53:00 2013 Kenta Murata <mrkn@mrkn.jp>
+Tue Jan 17 03:51:48 2017 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/bigdecimal/bigdecimal.c (VPrint): be a static function, support another
- dump formats, and add more information of the given bigdecimal.
+ * compile.c (setup_args): duplicate splatting array if more
+ arguments present to obey left-to-right execution order.
+ [ruby-core:77701] [Bug# 12860]
- * ext/bigdecimal/bigdecimal.h: ditto.
+Thu Nov 24 05:47:18 2016 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
-Wed Dec 11 16:45:58 2013 Koichi Sasada <ko1@atdot.net>
+ * test/fileutils/test_fileutils.rb (TestFileUtils#setup): Use primary
+ group as well as supplementary groups.
+ based on the patch by Vit Ondruch at [Bug #12910]
- * eval.c (rb_raise_jump): call c_return hook immediately after
- popping `raise' frame.
- Patches by deivid (David Rodriguez). [Bug #8886]
+Thu Nov 24 05:44:04 2016 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
- * test/ruby/test_settracefunc.rb: catch up this fix.
+ * test/ruby/test_dir_m17n.rb: Don't encode to UTF-8 if it's unnecessary.
+ If the file system encoding is ISO-8851-1 or if the encoding of the
+ target string is invalid, don't encode to UTF-8. [Bug#12972]
-Wed Dec 11 16:01:26 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Nov 21 16:55:15 2016 boshan <boshan@subsplash.com>
- * hash.c (rb_hash_reject): return a plain hash, without copying
- the class, default value, instance variables, and taintedness.
- they had been copied just by accident.
- [ruby-core:59045] [Bug #9223]
+ * lib/tempfile.rb (Tempfile#initialize): [DOC] the first parameter
+ `basename` is optional and defaulted to an empty string since
+ [GH-523]. [Fix GH-1225]
-Wed Dec 11 15:36:15 2013 Aman Gupta <ruby@tmm1.net>
+Sat Nov 19 14:06:07 2016 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
- * compile.c (iseq_specialized_instruction): emit opt_aset instruction
- to optimize Hash#[]= and Array#[]= when called with Fixnum argument.
- [Bug #9227] [ruby-core:58956]
+ * iseq.c (proc_dup): don't duplicate sym_procs. [Fix GH-1479]
+ [ruby-core:78100] [Bug #12927]
+ Based on the patch provided by Emiliano Ritiro.
-Wed Dec 11 04:54:03 2013 Eric Hodel <drbrain@segment7.net>
+Sat Nov 19 11:48:47 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/rubygems: Update to RubyGems master ec8ed22. Notable changes
- include:
+ * iseq.c (iseqw_s_compile_file): deal with syntax error as well as
+ compile, and should not abort when rescued.
- * Renamed extension_install_dir to extension_dir (backwards
- compatible).
+Wed Nov 16 23:40:29 2016 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
- * Fixed creation of gem.deps.rb.lock file from
- TestGemRequestSet#test_install_from_gemdeps_install_dir
+ * vm_eval.c (vm_call0_body): refined module should not be skipped as
+ prepended. [Bug #12920]
- * Fixed a typo and some documentation.
+Tue Nov 15 03:14:02 2016 NARUSE, Yui <naruse@ruby-lang.org>
- * test/rubygems: ditto.
+ * ext/-test/file/fs.c (get_atime_p): Updating of file access times
+ is enabled or not.
-Wed Dec 11 03:18:08 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
+Tue Nov 15 03:14:02 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * insns.def: Fix optimization bug of Float#/ [Bug #9238]
+ * test/ruby/test_file.rb (TestFile#test_stat): fix noatime case.
+ [ruby-core:77943] [Bug #12903]
-Tue Dec 10 23:58:30 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Nov 15 03:09:39 2016 Shugo Maeda <shugo@ruby-lang.org>
- * ext/date/date_strptime.c (date__strptime_internal): unset
- case-insensitive flag for [:alpha:], which already implies both
- cases, to get rid of backtrack explosion. [ruby-core:58984]
- [Bug #9221]
+ * test/rinda/test_rinda.rb (test_make_socket_ipv6_multicast,
+ test_make_socket_ipv6_multicast_hops): skip if IPv6 multicast
+ address is not available.
-Tue Dec 10 23:44:42 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Nov 15 02:49:30 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * array.c (rb_ary_hash): add salt to differentiate false and empty
- array. [ruby-core:58993] [Bug #9231]
+ * vm_eval.c (vm_call0_body): follow the original class, not to
+ loop the prepended module. [ruby-core:77784] [Bug #12876]
- * hash.c (rb_any_hash, rb_hash_hash): ditto.
+Tue Nov 15 02:45:44 2016 NARUSE, Yui <naruse@ruby-lang.org>
-Tue Dec 10 18:16:09 2013 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
+ * lib/net/http.rb (transport_request): other than HTTPContinue
+ in 1xx (HTTPInformation) also needs to continue. [Bug #12890]
- * man/ruby.1: [DOC] Use www.ruby-toolbox.com instead of RAA.
+Sat Nov 12 01:05:45 2016 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Tue Dec 10 17:21:30 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * object.c: Improve documentation for Float conversion.
+ [ruby-core:71661][Bug #11736][ci skip]
- * gc.c (wmap_finalize, wmap_aset_update): use simple malloced array
- instead of T_ARRAY, to reduce GC pressure.
+Sat Nov 12 00:50:35 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Dec 10 15:56:48 2013 Aman Gupta <ruby@tmm1.net>
+ * proc.c (mnew_internal): follow the original class, not to loop
+ the prepended module. [ruby-core:77591] [Bug #12832]
- * gc.c (reflist_add): revert changes from r44109. it is unnecessary
- after r44113
- * gc.c (allrefs_i): fix whitespace
- * gc.c (allrefs_roots_i): fix whitespace
+Sat Nov 12 00:46:50 2016 Shugo Maeda <shugo@ruby-lang.org>
-Tue Dec 10 15:46:03 2013 Koichi Sasada <ko1@atdot.net>
+ * cont.c (cont_new): disable optimization if clang's version is
+ 3.8.0. [ruby-core:77894] [Bug #12893]
- * gc.c (allrefs_add): push obj only if allrefs table doesn't have
- obj.
+Sat Nov 12 00:27:24 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c (allrefs_roots_i): ditto.
+ * compile.c (iseq_peephole_optimize): enable tail call
+ optimization inside a conditional block.
-Tue Dec 10 15:28:10 2013 Koichi Sasada <ko1@atdot.net>
+Sat Nov 5 11:53:17 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c (RGENGC_CHECK_MODE): separate checkers to different modes.
- * 2: enable generational bits check (for debugging)
- * 3: enable livness check
- * 4: show all references
+ * io.c (copy_stream_body): use IO to write to copy to duplex IO.
+ http://twitter.com/knu/status/786505317974585344
-Tue Dec 10 15:15:37 2013 Koichi Sasada <ko1@atdot.net>
+Sat Nov 5 11:49:41 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c (gc_marks_check): disable GC during checking and
- restore malloc_increase info.
+ * sprintf.c (rb_str_format): format exact number more exactly.
-Tue Dec 10 14:41:53 2013 Aman Gupta <ruby@tmm1.net>
+Sat Nov 5 11:45:32 2016 Kazuki Yamaguchi <k@rhe.jp>
- * gc.c (reflist_add): return 0 if reference already exists
- * gc.c (allrefs_add): return 1 on newly added references
- * gc.c (allrefs_i): follow references to construct complete object
- graph. before this patch, RGENGC_CHECK could fail to verify some WB
- miss issues. [Bug #9226] [ruby-core:58959]
+ * ext/openssl/ossl.c (Init_openssl): register an ex_data index for
+ X509_STORE and X509_STORE_CTX respectively. Since they don't share
+ the ex_data index registry, we can't use the same index.
+ (ossl_verify_cb): use the the correct index.
-Tue Dec 10 11:20:56 2013 Aman Gupta <ruby@tmm1.net>
+ * ext/openssl/ossl_ssl.c (ossl_ssl_verify_callback): ditto.
- * ext/objspace/objspace_dump.c (dump_object): include fstring flag on
- strings. include gc flags (old, remembered, wb_protected) on all objects.
- * ext/objspace/objspace_dump.c (Init_objspace_dump): initialize lazy
- IDs before first use.
- * gc.c (rb_obj_gc_flags): new function to retrieve object flags
- * internal.h (RB_OBJ_GC_FLAGS_MAX): maximum flags allowed for one obj
- * test/objspace/test_objspace.rb (test_dump_flags): test for above
- * test/objspace/test_objspace.rb (test_trace_object_allocations):
- resolve name before dump (for rb_class_path_cached)
+ * ext/openssl/ossl_x509store.c (ossl_x509store_set_vfy_cb): ditto.
+ (ossl_x509stctx_verify): ditto.
-Tue Dec 10 07:48:29 2013 Aman Gupta <ruby@tmm1.net>
+ * ext/openssl/ossl.h (void ossl_clear_error): add extern declarations
+ of ossl_store_{ctx_,}ex_verify_cb_idx.
- * vm_method.c (rb_clear_method_cache_by_class): fire
- ruby::method-cache-clear probe on global or klass-level method cache
- clear [Bug #9190]
- * probes.d (provider ruby): new dtrace probe
- * doc/dtrace_probes.rdoc: docs for new probe
- * test/dtrace/test_method_cache.rb: test for new probe
+ * ext/openssl/openssl_missing.c: remove X509_STORE_set_ex_data and
+ X509_STORE_get_ex_data.
-Tue Dec 10 06:14:11 2013 Eric Hodel <drbrain@segment7.net>
+ * ext/openssl/openssl_missing.h: implement X509_STORE_get_ex_data,
+ X509_STORE_set_ex_data and X509_STORE_get_ex_new_index as macros.
- * ext/.document: Remove curses from documentable directories.
+Sat Nov 5 11:35:58 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Dec 10 04:55:36 2013 Zachary Scott <e@zzak.io>
+ * thread.c (rb_thread_pending_interrupt_p): no pending interrupt
+ before initialization.
- * ext/openssl/lib/openssl/digest.rb: Deprecate OpenSSL::Digest::Digest
- [Fixes GH-446] https://github.com/ruby/ruby/pull/446
+ * thread.c (thread_raise_m, rb_thread_kill): uninitialized thread
+ cannot interrupt. [ruby-core:72732] [Bug #11959]
-Tue Dec 10 00:41:42 2013 Kazuki Tsujimoto <kazuki@callcc.net>
+Sat Nov 5 11:16:58 2016 Kenta Murata <mrkn@mrkn.jp>
- * ext/thread/thread.c: [DOC] add call-seq alias for Queue#enq, #<<, etc.
+ * ext/bigdecimal/bigdecimal.c: Import changes from ruby/bigdecimal
+ repository.
- * ext/thread/thread.c (Init_thread): use rb_define_alias instead of
- rb_alias to document alias.
+Tue Oct 18 02:58:22 2016 Kazuki Yamaguchi <k@rhe.jp>
-Mon Dec 9 20:00:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ * eval_intern.h (TH_PUSH_TAG): Initialize struct rb_vm_tag::tag with
+ Qundef rather than 0 which is equal to Qfalse. Since Kernel#throw(obj)
+ searches a tag with rb_vm_tag::tag == obj, throw(false) can
+ accidentally find an unrelated tag which is not created by
+ Kernel#catch. [ruby-core:77229] [Bug #12743]
- * internal.h (RCLASS_SERIAL): Add RCLASS_SERIAL as a convenience
- accessor for RCLASS_EXT(klass)->class_serial.
+ * test/ruby/test_exception.rb (test_throw_false): Add a test case for
+ this.
- * class.c, vm_insnhelper.c, vm_method.c: Use RCLASS_SERIAL
+Tue Oct 18 02:24:29 2016 Aurelien Jacobs <aurel@gnuage.org>
-Mon Dec 9 19:50:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ * lib/logger.rb (Logger::Period#next_rotate_time): fix monthly log
+ rotate when DST is applied during a month of 31 days.
+ [Fix GH-1458]
- * compile.c, insns.def, test/ruby/test_rubyvm.rb, vm.c, vm_core.h,
- vm_insnhelper.c, vm_insnhelper.h, vm_method.c: Rename method_serial
- to global_method_state and constant_serial to global_constant_state
- after discussion with ko1.
+Wed Oct 12 22:31:09 2016 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Mon Dec 9 18:50:43 2013 Aman Gupta <ruby@tmm1.net>
+ * tool/downloader.rb: Removed verification of gem certification.
+ Because signed gem is not working on rubygems ecosystem.
+ * tool/gem-unpack.rb: ditto.
- * hash.c (rb_hash_replace): fix segv on `{}.replace({})` introduced
- in r44060 [Bug #9230] [ruby-core:58991]
- * test/ruby/test_hash.rb: regression test for above
+Fri Oct 7 02:48:06 2016 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
-Mon Dec 9 18:10:10 2013 Koichi Sasada <ko1@atdot.net>
+ * lib/rubygems/ssl_certs/GlobalSignRootCA.pem: add for RugyGems.org.
- * vm.c (vm_stat): renamed from ruby_vm_stat.
- Should not use ruby_ prefix here.
+Mon Sep 26 23:51:31 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Dec 9 16:13:31 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * variable.c (rb_const_search): raise with the actual class/module
+ name which defines the private constant.
- * gc.c (wmap_size): add ObjectSpace::WeakMap#size and #length.
+Mon Sep 26 23:34:09 2016 Kazuki Yamaguchi <k@rhe.jp>
-Mon Dec 9 15:26:17 2013 Shugo Maeda <shugo@ruby-lang.org>
+ * ext/openssl/ossl_pkcs12.c (ossl_pkcs12_initialize): pop errors
+ leaked by PKCS12_parse(). This is a bug in OpenSSL, which exists
+ in the versions before the version 1.0.0t, 1.0.1p, 1.0.2d.
- * test/test_curses.rb: removed.
+Mon Sep 26 23:10:43 2016 NARUSE, Yui <naruse@ruby-lang.org>
-Mon Dec 9 13:36:55 2013 Shugo Maeda <shugo@ruby-lang.org>
+ * vm_dump.c (backtrace): use rip in the saved context for the case
+ the SIGSEGV is received when the process is in userland.
+ Note that ip in the stack should be used if the signal is received
+ when it is in kernel (when it is calling syscall) [Bug #12711]
- * ext/curses, sample/curses: removed curses.
+Mon Sep 26 20:23:32 2016 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
- * NEWS: added an entry for the above change.
+ * gems/bundled_gems: update minitest to 5.8.5.
-Mon Dec 9 12:26:05 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * tool/downloader.rb: revert workarounds.
- * ext/objspace/object_tracing.c (newobj_i): use cached class path
- only to get rid object allocation during NEWOBJ hook.
- [ruby-core:58853] [Bug #9212]
-
- * variable.c (rb_class_path_cached): returns cached class path
- only, without searching and allocating new class path string.
-
-Mon Dec 9 11:14:26 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/date/date_parse.c (parse_time): unset case-insensitive flag
- for [:alpha:], which already implies both cases, to get rid of
- backtrack explosion. [ruby-core:58876] [Bug #9221]
-
-Mon Dec 9 08:40:40 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems: Update to RubyGems master bf37240. Fixes useless
- error message with `gem install -g` with no gem dependencies file.
- * test/rubygems: ditto.
-
-Mon Dec 9 04:52:25 2013 Eric Hodel <drbrain@segment7.net>
-
- * NEWS: Update RubyGems entry with notable features.
-
-Mon Dec 9 04:43:54 2013 Eric Hodel <drbrain@segment7.net>
-
- * ext/.document: Add syslog/lib and thread/thread.c to documentable
- items. [ruby-trunk - Bug #9228]
-
-Mon Dec 9 04:28:50 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems: Update to RubyGems master 096db36. Changes include
- support for PATH in Gemfile.lock and a typo fix from Akira Matsuda.
- * test/rubygems: ditto.
+ * tool/gem-unpack.rb: ditto.
-Mon Dec 9 02:10:32 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Mon Sep 26 07:26:44 2016 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
- * lib/net/http/responses.rb:
- Add `HTTPIMUsed`, as it is also supported by rack/rails.
- RFC - http://tools.ietf.org/html/rfc3229
- by Vipul A M <vipulnsward@gmail.com>
- https://github.com/ruby/ruby/pull/447 fix GH-447
+ * tool/gem-unpack.rb: don't set security policy.
+ workaround for certificate expiration of minitest-5.8.3.gem.
-Sun Dec 8 20:47:35 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Sep 26 06:33:16 2016 Aaron Patterson <tenderlove@ruby-lang.org>
- * class.c (rb_get_kwargs): when values is non-null, remove
- extracted keywords from the rest keyword argument.
+ * lib/uri/generic.rb (def check_password): don't include bad password
+ in URI exception output
-Sun Dec 8 20:26:54 2013 Yutaka Kanemoto <kanemoto@ruby-lang.org>
+ * test/uri/test_generic.rb (def test_set_component): test for behavior
- * common.mk (ruby.imp): avoid circular dependency on AIX
+Mon Sep 26 06:20:58 2016 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
-Sun Dec 8 20:21:00 2013 Kenta Murata <mrkn@mrkn.jp>
+ * tool/downloader.rb: comment out gem package verification.
+ workaround for certificate expiration of minitest-5.8.3.gem.
- * bigdecimal.c (BigDecimal_coerce): convert a Float to a BigDecimal instead
- of converting the receiver to a Float. The reason is there are BigDecimal
- instances with precisions that is smaller than the Float's precision.
- [ruby-core:58756] [Bug #9192]
+Sun Sep 25 16:37:22 2016 NAKAMURA Usaku <usa@ruby-lang.org>
- * test/bigdecimal/test_bigdecimal.rb: add tests for the above change.
+ * io.c (nogvl_fsync, nogvl_fdatasync): on Windows, just ignore if the
+ fd is associated to non-disk device. if call fsync and/or fdatasync
+ with such fds, it causes Errno::EBADF exception and the behavior is
+ incompatible with ruby 2.1 and earlier unintentionally introduced.
-Sun Dec 8 18:28:20 2013 Kazuki Tsujimoto <kazuki@callcc.net>
+Sun Sep 25 15:09:04 2016 Kazuki Tsujimoto <kazuki@callcc.net>
- * NEWS: [DOC] update NEWS about GC.
-
-Sun Dec 8 17:52:24 2013 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * object.c: [DOC] document Module#singleton_class?.
-
-Sun Dec 8 16:19:28 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * class.c (rb_get_kwargs): if optional is negative, unknown
- keywords are allowed.
-
- * vm_insnhelper.c (vm_callee_setup_keyword_arg): check unknown
- keywords.
-
-Sun Dec 8 14:55:12 2013 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * array.c (rb_ary_shuffle_bang, rb_ary_sample): rename local variables.
-
-Sun Dec 8 13:59:38 2013 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * array.c (rb_ary_shuffle_bang, rb_ary_sample): check
- unknown keywords.
-
- * test/ruby/test_array.rb (test_shuffle, test_sample): tests for
- the above.
-
-Sun Dec 8 13:01:11 2013 Aman Gupta <ruby@tmm1.net>
-
- * vm.c (ruby_vm_stat): add RubyVM.stat() for access to internal cache
- counters. this methods behaves like GC.stat, accepting an optional
- hash or symbol argument. [Bug #9190] [ruby-core:58750]
- * test/ruby/test_rubyvm.rb: test for new method
-
-Sun Dec 8 11:59:40 2013 Aman Gupta <ruby@tmm1.net>
-
- * hash.c (rb_hash_replace): add a write barrier to fix GC mark miss on
- hashes using Hash#replace [Bug #9226] [ruby-core:58948]
-
-Sun Dec 8 11:21:00 2013 Aman Gupta <ruby@tmm1.net>
-
- * include/ruby/ruby.h: add RGENGC_WB_PROTECTED_NODE_CREF setting
- In a large app, this reduces the size of
- remembered_shady_object_count by 80%. [Bug #9225] [ruby-core:58947]
- * gc.c (rb_node_newnode): add FL_WB_PROTECTED flag to NODE_CREF
- * class.c (rewrite_cref_stack): insert OBJ_WRITE for NODE_CREF
- * iseq.c (set_relation): ditto
- * iseq.c (rb_iseq_clone): ditto
- * vm_eval.c (rb_yield_refine_block): ditto
- * vm_insnhelper.c (vm_cref_push): ditto
- * vm_insnhelper.h (COPY_CREF): ditto
-
-Sun Dec 8 10:45:05 2013 Aman Gupta <ruby@tmm1.net>
-
- * hash.c (hash_aset_str): revert r43870 due to performance issue
- [Bug #9188] [ruby-core:58730]
- * parse.y (assoc): convert literal string hash keys to fstrings
- * test/ruby/test_hash.rb (class TestHash): expand test
-
-Sun Dec 8 10:22:38 2013 Aman Gupta <ruby@tmm1.net>
-
- * parse.y (register_symid_str): use fstrings in symbol table
- [Bug #9171] [ruby-core:58656]
- * parse.y (rb_id2str): ditto
- * string.c (rb_fstring): create frozen_strings on first usage. this
- allows rb_fstring() calls from the parser (before cString is created)
- * string.c (fstring_set_class_i): set klass on fstrings generated
- before cString was defined
- * string.c (Init_String): convert frozen_strings table to String
- objects after boot
- * ext/-test-/symbol/type.c (bug_sym_id2str): expose rb_id2str()
- * test/-ext-/symbol/test_type.rb (module Test_Symbol): verify symbol
- table entries are fstrings
-
-Sun Dec 8 10:24:20 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems.rb: Update version for upcoming ruby 2.1.0 RC.
-
-Sun Dec 8 10:21:36 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems: Update to RubyGems master 14749ce. This fixes bugs
- handling of gem dependencies lockfiles (Gemfile.lock).
-
- * test/rubygems: ditto.
+ * array.c (flatten): use rb_obj_class instead of rb_class_of
+ because rb_class_of may return a singleton class.
+ [ruby-dev:49781] [Bug #12738]
-Sun Dec 8 09:40:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+Sun Sep 25 15:07:19 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * array.c (rb_ary_or): use RHASH_TBL_RAW instead of RHASH_TBL
+ * man/irb.1: remove useless -width option.
+ [ruby-dev:49767] [Bug #12692]
- * process.c (rb_execarg_fixup): use RHASH_TBL_RAW and insert write
- barriers where appropriate
+Tue Aug 30 05:24:33 2016 Kazuki Yamaguchi <k@rhe.jp>
- * vm.c (kwmerge_i): use RHASH_TBL_RAW
+ * ext/openssl/ossl_x509ext.c: additional fix memory leak.
+ [ruby-core:76922] [Bug #12680]
- * vm.c (HASH_ASET): use rb_hash_aset instead of calling directly into
- st_insert
+ * text/openssl/test_x509ext.rb: test for above.
-Sat Dec 7 11:15:52 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sun Aug 28 00:26:58 2016 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
- * hash.c (rb_hash_reject): copy unrejected elements only to new hash,
- so that the change on the original receiver can affect.
- [ruby-core:58914] [Bug #9223]
+ * vm_method.c: revert r55869. it breaks Integer#days with
+ ActiveSupport-4.1.x. [ruby-core:76949] [Bug #12353]
-Sat Dec 7 08:25:00 2013 Richo Healey <richo@psych0tik.net>
+ * test/ruby/test_marshal.rb: ditto.
- * test/ruby/test_struct.rb: Add regression test for question marks and
- bangs in struct members. [Closes GH-468]
+Sat Aug 27 03:51:23 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Dec 6 19:33:39 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * id_table.c (hash_table_extend): should not shrink the table than
+ the previous capacity. [ruby-core:76534] [Bug #12614]
- * class.c (rb_extract_keywords, rb_get_kwargs): move from
- vm_insnhelper.c.
+Sat Aug 27 03:37:49 2016 Kazuki Yamaguchi <k@rhe.jp>
-Fri Dec 6 19:18:02 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/openssl/ossl_config.c: fix memory leak.
+ [ruby-core:76922] [Bug #12680]
- * gc.c: change oldmalloc meaning.
- Increase oldmalloc_increase with malloc_increase
- instead of using obj_memsize_of().
+ * ext/openssl/ossl_ocsp.c: ditto.
- This change will avoid the danger of memory full without major GC.
+ * ext/openssl/ossl_pkcs12.c: ditto.
-Fri Dec 6 19:08:48 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/openssl/ossl_pkcs7.c: ditto.
- * gc.c (atomic_sub_nounderflow): not 0 but val itself.
+ * ext/openssl/ossl_pkey_ec.c: ditto.
-Fri Dec 6 18:37:11 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/openssl/ossl_x509.h: ditto.
- * gc.c (rb_objspace_alloc, Init_heap): initialize
- oldmalloc_increase_limit at Init_heap.
+ * ext/openssl/ossl_x509attr.c: ditto.
- rb_objspace_alloc() is not called on some platforms.
+ * ext/openssl/ossl_x509crl.c: ditto.
-Fri Dec 6 18:33:39 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/openssl/ossl_x509ext.c: ditto.
- * gc.c (garbage_collect_body): bug fix.
- initialize after recording.
+ * ext/openssl/ossl_x509req.c: ditto.
-Fri Dec 6 17:49:46 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/openssl/ossl_x509revoked.c: ditto.
- * gc.c (atomic_sub_nounderflow): added to simplify atomic sub with
- care about underflow.
+Thu Aug 25 00:19:24 2016 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * gc.c (objspace_malloc_increase): use it.
+ * lib/rubygems/specification.rb: `coding` is affect only first line except
+ shebang.
+ * lib/rubygems/package.rb, lib/rubygems/package/*: ditto.
-Fri Dec 6 17:10:44 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Aug 25 00:19:24 2016 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * vm_insnhelper.c (rb_get_kwargs): get keyword argument values from an
- option hash, not only checking keys.
+ * lib/rubygems.rb, lib/rubygems/*, test/rubygems/*: Update rubygems-2.5.2.
+ It supports to enable frozen string literal and add `--norc` option for
+ disable to `.gemrc` configuration.
+ See 2.5.2 release notes for other fixes and enhancements.
+ https://github.com/rubygems/rubygems/blob/a8aa3bac723f045c52471c7b9328310a048561e0/History.txt#L3
- * dir.c (dir_initialize): use rb_get_kwargs.
+Wed Aug 24 23:54:40 2016 Charles Oliver Nutter <headius@headius.com>
- * gc.c (gc_start_internal): ditto.
+ * test/ruby/test_array.rb: split out the test for no stack error
+ on large input for test_permutation, test_repeated_permutation,
+ and test_repeated_combination, and make them all timeout:30.
-Fri Dec 6 16:47:45 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Aug 23 03:22:34 2016 Naohisa Goto <ngotogenome@gmail.com>
- * misc/ruby-mode.el (ruby-brace-to-do-end): split single line block.
+ * test/fiddle/test_pointer.rb (test_to_str, test_to_s, test_aref_aset):
+ Attempt to use independent strings for destructive tests that
+ directly modify values on memory by using Fiddle::Pointer.
+ [Bug #12537] [ruby-dev:49700]
- * misc/ruby-mode.el (ruby-do-end-to-brace): shrink single line block
- to one line.
+Tue Aug 23 03:14:22 2016 Naohisa Goto <ngotogenome@gmail.com>
-Fri Dec 6 16:16:30 2013 Koichi Sasada <ko1@atdot.net>
+ * string.c (str_buf_cat): Fix capa size for embed string.
+ Fix bug in r55547. [Bug #12536]
- * gc.c (gc_start_internal): do not use rb_gc_start() and rb_gc().
+Tue Aug 23 03:14:22 2016 Naohisa Goto <ngotogenome@gmail.com>
-Fri Dec 6 15:24:30 2013 Koichi Sasada <ko1@atdot.net>
+ * string.c (rb_str_change_terminator_length): New function to change
+ termlen and resize heap for the terminator. This is split from
+ rb_str_fill_terminator (str_fill_term) because filling terminator
+ and changing terminator length are different things. [Bug #12536]
- * gc.c (gc_start_internal, rb_gc): do not need
- heap_pages_free_unused_pages() here.
- It was done in after_sweep().
+ * internal.h: declaration for rb_str_change_terminator_length.
- * gc.c (rb_gc): The reason is now GPR_FLAG_CAPI.
+ * string.c (str_fill_term): Simplify only to zero-fill the terminator.
+ For non-shared strings, it assumes that (capa + termlen) bytes of
+ heap is allocated. This partially reverts r55557.
-Fri Dec 6 14:05:19 2013 Aman Gupta <ruby@tmm1.net>
+ * encoding.c (rb_enc_associate_index): rb_str_change_terminator_length
+ is used, and it should be called whenever the termlen is changed.
- * gc.c (gc_start_internal): GC.start() now accepts two optional
- keyword arguments. These can be used to disable full_mark (minor
- mark only) or disable immediate_sweep (use lazy sweep). These new
- options are useful for benchmarking GC behavior, or performing minor
- GC out-of-band.
- * test/ruby/test_gc.rb (class TestGc): tests for new options.
+ * string.c (str_capacity): New static function to return capacity
+ of a string with the given termlen, because the termlen may
+ sometimes be different from TERM_LEN(str) especially during
+ changing termlen or filling terminator with specific termlen.
-Fri Dec 6 11:51:28 2013 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
+ * string.c (rb_str_capacity): Use str_capacity.
- * lib/erb.rb: [DOC] fix broken link, Use rubygems.org and www.ruby-toolbox.com instead of RAA.
- [Bug #9197]
+Tue Aug 23 03:14:22 2016 Naohisa Goto <ngotogenome@gmail.com>
-Fri Dec 6 10:50:54 2013 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
+ * string.c: Partially reverts r55547 and r55555.
+ ChangeLog about the reverted changes are also deleted in this file.
+ [Bug #12536] [ruby-dev:49699] [ruby-dev:49702]
- * lib/webrick/httprequest.rb: [DOC] Fix broken link of CGI specification by @udzura [fix GH-466]
+Tue Aug 23 03:14:22 2016 Naohisa Goto <ngotogenome@gmail.com>
-Thu Dec 6 01:27:00 2013 Kenta Murata <mrkn@mrkn.jp>
+ * string.c (str_fill_term): When termlen increases, re-allocation
+ of memory for termlen should always be needed.
+ In this fix, if possible, decrease capa instead of realloc.
+ [Bug #12536] [ruby-dev:49699]
- * ext/bigdecimal/bigdecimal.c (GetVpValueWithPrec):
- treat 0.0 and -0.0 of floating-point numbers specially for an optimization
- and to correctly propagate its signbit to the result.
- [Bug #9214] [ruby-core:58858]
+Tue Aug 23 03:14:22 2016 Naohisa Goto <ngotogenome@gmail.com>
- * test/bigdecimal/test_bigdecimal.rb: add tests case for the above change.
+ * string.c: Specify termlen as far as possible.
+ Additional fix for [Bug #12536] [ruby-dev:49699].
- * test/bigdecimal/test_bigdecimal_util.rb: ditto.
+ * string.c (str_new_static): Specify termlen from the given encoding
+ when creating a new String object is needed.
-Thu Dec 5 22:18:01 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * string.c (rb_tainted_str_new_with_enc): New function to create a
+ tainted String object with the given encoding. This means that
+ the termlen is correctly specified. Currently static function.
+ The function name might be renamed to rb_tainted_enc_str_new
+ or rb_enc_tainted_str_new.
- * lib/mkmf.rb (configuration): strip destdir part from prefix to get
- rid of duplication. a patch by arton at [ruby-core:58859].
- [ruby-core:58856] [Bug #9213]
+ * string.c (rb_external_str_new_with_enc): Use encoding by using the
+ above rb_tainted_str_new_with_enc().
-Thu Dec 5 21:53:29 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Aug 23 03:14:22 2016 Naohisa Goto <ngotogenome@gmail.com>
- * array.c (rb_ary_or): lhs elements are preferred, so should not
- replace with rhs elements.
+ * string.c (rb_str_subseq, str_substr): When RSTRING_EMBED_LEN_MAX
+ is used, TERM_LEN(str) should be considered with it because
+ embedded strings are also processed by TERM_FILL.
+ Additional fix for [Bug #12536] [ruby-dev:49699].
- * test/ruby/test_array.rb (test_OR_in_order): import the test failed
- by r43969 from rubyspec/core/array/union_spec.rb.
+Tue Aug 23 03:14:22 2016 Naohisa Goto <ngotogenome@gmail.com>
-Thu Dec 5 21:05:42 2013 Koichi Sasada <ko1@atdot.net>
+ * string.c: Fix memory corruptions when using UTF-16/32 strings.
+ [Bug #12536] [ruby-dev:49699]
- * gc.c (gc_info_decode): fix to avoid syntax error on VS2012.
+ * string.c (rb_str_new_with_class): Use TERM_LEN of the "obj".
-Thu Dec 5 19:35:35 2013 Martin Duerst <duerst@it.aoyama.ac.jp>
+ * string.c (rb_str_plus, rb_str_justify): Use str_new0 which is aware
+ of termlen.
- * st.c: tweaked comment
+ * string.c (str_shared_replace): Copy +termlen bytes instead of +1.
-Thu Dec 5 19:21:10 2013 Aman Gupta <ruby@tmm1.net>
+ * string.c (rb_str_times): termlen should not be included in capa.
- * gc.c (struct rb_objspace): rename internal last_collection_flags to
- latest_gc_info
- * gc.c (gc_latest_collection_info): add GC.latest_gc_info() with similar
- behavior to GC.stat()
- * gc.c (rb_gc_latest_gc_info): new c-api for above
- * gc.c (gc_stat_internal): remove :last_collection_flags from GC.stat
- * gc.c (gc_profile_decode_flags): remove GC::Profiler.decode_flags
- * include/ruby/intern.h (rb_gc_latest_gc_info): export new c-api
- * test/ruby/test_gc.rb (class TestGc): test for new behavior
- * NEWS: note about new api
+ * string.c (RESIZE_CAPA_TERM): When using RSTRING_EMBED_LEN_MAX,
+ termlen should be counted with it because embedded strings are
+ also processed by TERM_FILL.
- * gc.c (gc_stat_internal): raise TypeError on wrong type
- * gc.c (gc_stat): fix error message
+ * string.c (rb_str_capacity, str_shared_replace, str_buf_cat): ditto.
-Thu Dec 5 18:18:08 2013 Aman Gupta <ruby@tmm1.net>
+ * string.c (rb_str_drop_bytes, rb_str_setbyte, str_byte_substr): ditto.
- * ext/objspace/gc_hook.c: remove this file
- * ext/-test-/tracepoint/gc_hook.c: new filename for above
- * ext/objspace/objspace.c: remove ObjectSpace.after_gc_start_hook=
- * test/objspace/test_objspace.rb: remove test
- * test/-ext-/tracepoint/test_tracepoint.rb: add above test for
- tracepoint re-entry
+Thu Aug 18 23:43:33 2016 Eric Wong <e@80x24.org>
-Thu Dec 5 17:44:53 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/openssl/ossl_ssl.c (ossl_ssl_write_internal):
+ avoid undefined behavior
+ * test/openssl/test_pair.rb (test_write_zero): new test
+ [ruby-core:76751] [Bug #12660]
- * gc.c: change function names vm_ prefix to objspace_ prefix.
- They are objspace_ functionality.
+Thu Aug 18 23:18:17 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Dec 5 16:11:04 2013 Aman Gupta <ruby@tmm1.net>
+ * ext/socket/option.c, ext/socket/rubysocket.h (inet_ntop): share
+ the fallback definition. [ruby-core:76646] [Bug #12645]
- * include/ruby/intern.h: add rb_gc_stat() for access to GC.stat
- variables from c-api
- * gc.c (rb_gc_stat): new c-api method. accepts either VALUE hash like
- GC.stat, or VALUE symbol key and returns size_t directly. the second
- form is useful to avoid allocations, i.e. for usage inside
- INTERNAL_EVENT_GC tracepoints.
- * gc.c (gc_stat): add GC.stat(:key) to return single value instead of hash
- * gc.c (gc_stat_internal): helper method to retrieve single or all stat values
- * test/ruby/test_gc.rb (class TestGc): test for new behavior
- * NEWS: note about this new api
+Thu Aug 18 23:07:29 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Dec 5 14:40:41 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm.c (vm_set_main_stack): remove unnecessary check. toplevel
+ binding must be initialized. [Bug #12611] (N1)
- * hash.c (rb_hash): revert r43981 and bail out to the outermost frame
- when recursion is detected.
-
-Thu Dec 5 13:47:15 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c (vm_malloc_size): added.
- return malloc_usable_size() if possible.
-
- * gc.c (MALLOC_ALLOCATED_SIZE): add new setting macro to enable
- GC.allocated_size.
- If platform supports `malloc_usable_size()' (or similar one),
- GC.allocated_size can be implemented with this function.
- Default is 0.
-
- * gc.c (vm_xmalloc, vm_xrealloc, vm_xfree): use vm_malloc_size()
- to detect collect allocated size.
-
- * gc.c (vm_malloc_increase): refactoring.
-
-Thu Dec 5 13:19:03 2013 Aman Gupta <ruby@tmm1.net>
-
- * include/ruby/ruby.h: remove INTERNAL_EVENT_GC_END and replace with
- two new events: GC_END_MARK and GC_END_SWEEP
- * gc.c (gc_after_sweep): emit GC_END_SWEEP after lazy sweep is done
- * gc.c (gc_marks_body): emit GC_END_MARK at end of minor/major mark
- * ext/-test-/tracepoint/tracepoint.c (struct tracepoint_track): tests
- for new events.
- * test/-ext-/tracepoint/test_tracepoint.rb (class TestTracepointObj):
- ditto.
- * NEWS: remove ObjectSpace.after_gc_*_hook. These are only a sample,
- and will be removed before ruby 2.1.
- * ext/objspace/gc_hook.c: remove ObjectSpace.after_gc_end_hook=
-
-Thu Dec 5 10:47:56 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ruby_atomic.h (ATOMIC_PTR_EXCHANGE): atomic exchange function for
- a generic pointer.
-
-Thu Dec 5 10:47:09 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * gc.c (finalize_deferred): flush all deferred finalizers while other
- finalizers can get ready to run newly by lazy sweep.
- [ruby-core:58833] [Bug #9205]
-
-Thu Dec 5 09:07:59 2013 Aman Gupta <ruby@tmm1.net>
-
- * 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`.
-
-Wed Dec 4 13:02:13 2013 Aman Gupta <ruby@tmm1.net>
-
- * vm_trace.c (rb_suppress_tracing): Fix initialization of stack
- allocated rb_trace_arg_t structure. Without this patch, sometimes
- INTERNAL_EVENT_GC would be skipped accidentally inside
- rb_threadptr_exec_event_hooks_orig().
-
-Wed Dec 4 12:57:24 2013 Aman Gupta <ruby@tmm1.net>
-
- * string.c (fstr_update_callback): Improve implementation in r43968
- based on feedback from @nagachika. In the existing case, we can
- return ST_STOP to prevent any hash modification. In the !existing
- case, set both key and value to the fstr.
-
-Wed Dec 4 12:47:54 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/delegate.rb (Delegator#method_missing): ignore the target if not
- set, and delegate to global methods. [ruby-core:58572] [Bug #9155]
-
- * lib/delegate.rb (Delegator#respond_to_missing): ditto.
-
- * lib/delegate.rb (SimpleDelegator#__getobj__): yield and return if
- not delegated but a block is given, like as Hash#fetch.
-
- * lib/delegate.rb (DelegateClass#__getobj__): ditto.
-
-Tue Dec 3 23:48:18 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in: check malloc_size() availability.
-
- * gc.c: use malloc_size() with malloc/malloc.h if available.
-
-Tue Dec 3 23:06:20 2013 Narihiro Nakamura <authornari@gmail.com>
-
- * object.c (rb_obj_clone): don't copy FL_WB_PROTECTED of a
- original object.
-
-Tue Dec 3 22:32:18 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * hash.c (rb_hash_recursive): make similar (recursive) constructs
- return same hash value. execute recursively, and rewind to the
- topmost frame with an object which .eql? to the recursive
- object, if recursion is detected.
-
- * hash.c (rb_hash): detect recursion for all `hash' methods. each
- `hash' methods no longer need to use rb_exec_recursive().
-
-Tue Dec 3 21:53:15 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm_eval.c (rb_catch_protect): new function similar to
- rb_catch_obj(), but protect from all global jumps like as
- rb_load_protect(), rb_protect(), etc.
-
-Tue Dec 3 20:18:46 2013 Narihiro Nakamura <authornari@gmail.com>
-
- * object.c (rb_obj_clone): Protect FL_PROMOTED and FL_WB_PROTECTED
- flags of a destination object.
-
-Tue Dec 3 20:16:38 2013 Masaki Matsushita <glass.saga@gmail.com>
-
- * array.c (rb_hash_rehash): use hash_alloc() instead of rb_hash_new(),
- to hide temporary object from ObjectSpace. [Bug #9187]
-
-Tue Dec 3 17:11:47 2013 Aman Gupta <ruby@tmm1.net>
-
- * load.c (features_index_add_single): Move loaded_features_index array values off
- the ruby heap. [Bug #9201] [ruby-core:58805]
- * load.c (loaded_features_index_clear_i): Clean up off-heap array structure.
- * vm.c (rb_vm_mark): Remove unnecessary mark_tbl for loaded_features_index.
- This improves minor GC time by 15% in a large application.
-
-Tue Dec 3 17:01:45 2013 Aman Gupta <ruby@tmm1.net>
-
- * include/ruby/ruby.h (struct RClass): Add wrapper struct around
- RClass->m_tbl with serial. This prevents double marking method
- tables, since many classes/modules can share the same method table.
- This improves minor mark time in a large application by 30%.
- * internal.h (struct method_table_wrapper): Define new
- wrapper struct with additional serial.
- * internal.h (RCLASS_M_TBL_INIT): New macro for initializing method
- table wrapper and st_table.
- * method.h (void rb_sweep_method_entry): Rename rb_free_m_table to
- rb_free_m_tbl for consistency
- * .gdbinit (define rb_method_entry): Update rb_method_entry gdb helper
- for new method table structure.
- * class.c: Use RCLASS_M_TBL_WRAPPER and
- RCLASS_M_TBL_INIT macros.
- * class.c (rb_include_class_new): Share WRAPPER between module and
- iclass, so serial can prevent double marking.
- * eval.c (rb_prepend_module): ditto.
- * eval.c (rb_using_refinement): ditto.
- * gc.c: Mark and free new wrapper struct.
- * gc.c (obj_memsize_of): Count size of additional wrapper struct.
-
-Tue Dec 3 14:05:49 2013 Masaki Matsushita <glass.saga@gmail.com>
-
- * array.c (rb_ary_uniq_bang): remove duplicate code.
-
-Tue Dec 3 13:40:42 2013 Masaki Matsushita <glass.saga@gmail.com>
-
- * array.c (ary_add_hash): set and return values because string keys
- will be frozen. [ruby-core:58809] [Bug #9202]
-
- * array.c (rb_ary_uniq_bang): ditto.
-
- * array.c (rb_ary_or): ditto.
-
- * array.c (rb_ary_uniq): ditto.
-
- * test/ruby/test_array.rb: tests for above.
-
- The patch is from normalperson (Eric Wong).
-
-Tue Dec 3 12:20:21 2013 Aman Gupta <ruby@tmm1.net>
-
- * string.c (rb_fstring): Use st_update instead of st_lookup +
- st_insert.
- * string.c (fstr_update_callback): New callback for st_update.
-
-Tue Dec 3 12:17:59 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/rdoc/constant.rb (RDoc::Constant#documented?): workaround for
- NoMethodError when the original of alias is not found.
-
-Tue Dec 3 10:43:58 2013 Eric Hodel <drbrain@segment7.net>
-
- * ext/openssl/lib/openssl/buffering.rb: Return ASCII-8BIT strings from
- SSLSocket methods. [ruby-trunk - Bug #9028]
- * test/openssl/test_ssl.rb: Test for the above.
-
-Tue Dec 3 09:42:27 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rdoc: Update to RDoc master 900de99. Changes include:
-
- Fixed documentation display of constants
-
- Fixed handling of unknown parsers
-
- * test/rdoc: ditto.
-
-Mon Dec 2 22:30:10 2013 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * hash.c (getenv): fixed test failures introduced by r43950.
- [ruby-core:58774] [Bug #9195] reported by phasis68 (Heesob Park).
-
-Mon Dec 2 21:49:19 2013 Masaki Matsushita <glass.saga@gmail.com>
-
- * hash.c (rb_hash_rehash): make temporary st_table under the control
- of GC. [Bug #9187]
-
- * test/ruby/test_hash.rb: add a test for above.
-
-Mon Dec 2 17:23:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
-
- * variable.c (rb_mod_constants): when calling Module#constants with
- inherit=false, there is no need to use a hashtable to deduplicate
- constant names. [Feature #9196] [ruby-core:58786]
-
-Mon Dec 2 14:16:52 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/net/smtp.rb (Net::SMTP#critical): Always return a
- Net::SMTP::Response. Patch by Pawel Veselov.
- [ruby-trunk - Bug #9125]
- * test/net/smtp/test_smtp.rb: Test for the above.
-
-Mon Dec 2 05:52:33 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems: Update to RubyGems master baa965b. Notable changes:
-
- Copy directories to lib/ when installing extensions. This completes
- the fix for [ruby-trunk - Bug #9106]
-
- * test/rubygems: ditto.
-
-Mon Dec 2 02:03:47 2013 Shota Fukumori <her@sorah.jp>
-
- * test/ruby/test_case.rb (test_nomethoderror):
- Add test related to r43913, r43914
-
-Mon Dec 2 00:53:01 2013 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * hash.c (getenv): use ANSI codepage version of getenv() for miniruby
- on Windows.
- [ruby-core:58732] [Bug #9189] reported by phasis68 (Heesob Park).
-
-Sun Dec 1 22:14:27 2013 Zachary Scott <e@zzak.io>
-
- * doc/contributors.rdoc: [DOC] Import contributors from redmine wiki
- Many wiki pages have become outdated and spam-ridden, we will import
- these to trunk and begin maintaining them in ruby-trunk. This will
- also allow new contributors to easily contribute patches to update
- these pages, where previously a redmine account with wiki access was
- required. Another bonus is having a contributors file to show thanks
- to all of the people who have submitted a patch to Ruby.
-
-Sun Dec 1 18:03:26 2013 Zachary Scott <e@zzak.io>
-
- * doc/maintainers.rdoc: [DOC] Current maintainers of Ruby
-
-Sun Dec 1 17:17:36 2013 Zachary Scott <e@zzak.io>
-
- * doc/contributing.rdoc: [DOC] Current branch maintainers
-
-Sun Dec 1 17:16:36 2013 Zachary Scott <e@zzak.io>
-
- * doc/contributing.rdoc: [DOC] Reporting other (ruby-lang.org) issues
-
-Sun Dec 1 17:15:51 2013 Zachary Scott <e@zzak.io>
-
- * doc/contributing.rdoc: [DOC] Current platform maintainers
-
-Sun Dec 1 17:14:55 2013 Zachary Scott <e@zzak.io>
-
- * doc/contributing.rdoc: [DOC] Reporting downstream distro issues
-
-Sun Dec 1 14:37:20 2013 Masaki Matsushita <glass.saga@gmail.com>
-
- * hash.c (rb_hash_to_a): specify array capa.
-
-Sun Dec 1 14:15:36 2013 Masaki Matsushita <glass.saga@gmail.com>
-
- * hash.c (rb_hash_rehash): fix to free new st_table when exception
- is raised in do_hash(). [Bug #9187]
-
-Sun Dec 1 11:57:59 2013 Zachary Scott <e@zzak.io>
-
- * ext/openssl/lib/openssl/buffering.rb: Fix warning in copyright
-
-Sun Dec 1 08:27:28 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems: Update to RubyGems master 66e5c39. Notable changes:
-
- Implement gem.deps.rb (Gemfile) .lock support
-
- Fixed `gem uninstall` for a relative directory in GEM_HOME.
-
- * test/rubygems: ditto.
-
-Sun Dec 1 06:00:49 2013 Aman Gupta <ruby@tmm1.net>
-
- * test/ruby/test_gc.rb (test_gc_reason): Force minor GC by consuming
- free slots to fix test.
-
-Sat Nov 30 21:22:11 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * dir.c (dir_initialize): check unknown keywords. [ruby-dev:47152]
- [Bug #8060]
-
-Sat Nov 30 18:05:38 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/win32ole/win32ole.c (hash2named_arg): correct declaration to fix
- build failure. a patch by phasis68 (Heesob Park) at
- [ruby-core:58710]. [Bug #9184]
-
-Sat Nov 30 17:46:35 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * eval.c (ruby_cleanup): determine exit status and signal to terminate
- before finalization, to get rid of access destroyed T_DATA exception
- object. [ruby-core:58643] [Bug #9167]
-
-Sat Nov 30 16:25:14 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * enumerator.c (enumerator_with_index): should not store local variable
- address to memoize the arguments. it is invalidated after the return.
- [ruby-core:58692] [Bug #9178]
-
-Sat Nov 30 13:28:13 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * siphash.c (sip_hash24): fix for aligned word access little endian
- platforms. [ruby-core:58658] [Bug #9172]
-
-Sat Nov 30 13:21:15 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm_eval.c (rb_yield_block): implement non-nil block argument.
-
-Fri Nov 29 20:59:39 2013 Masaya Tarui <tarui@ruby-lang.org>
-
- * vm_dump.c (rb_vmdebug_debug_print_pre): Bugfix. Get PC directly.
- PC is cached into local stack and cfp->pc is incorrect at next of
- branch or jump.
- * vm_exec.h (DEBUG_ENTER_INSN): catch up this change.
- * vm_core.h: update signature of rb_vmdebug_debug_print_pre.
-
-Fri Nov 29 20:43:57 2013 Masaya Tarui <tarui@ruby-lang.org>
-
- * compile.c: Bugsfix for dump_disasm_list.
- rb_inspect denies a hidden object. So, insert wrapper that creates
- the unhidden one.
- adjust->label is null sometimes.
- insn_data_line_no makes no sense at all.
-
-Fri Nov 29 18:06:45 2013 Shota Fukumori <her@sorah.jp>
-
- * test/ruby/test_case.rb (test_method_missing): Test for r43913.
-
-Fri Nov 29 17:53:22 2013 Shota Fukumori <her@sorah.jp>
-
- * vm_insnhelper.c (check_match): Fix SEGV with VM_CHECKMATCH_TYPE_CASE
- and class of `pattern` has `method_missing`
- [Bug #8872] [ruby-core:58606]
-
-Fri Nov 29 17:06:09 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm_eval.c (rb_yield_block): yield block with rb_block_call_func
- arguments.
-
- * range.c (range_each): use rb_yield_block.
-
- * include/ruby/ruby.h (RB_BLOCK_CALL_FUNC_ARGLIST): constify argv.
-
- * enum.c (rb_enum_values_pack): ditto.
-
- * vm_eval.c (rb_block_call, rb_check_block_call): ditto.
-
- * include/ruby/ruby.h (RB_BLOCK_CALL_FUNC_ARGLIST): for declaration
- argument list of rb_block_call_func.
-
-Fri Nov 29 11:26:43 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * include/ruby/ruby.h (rb_block_call_func): add blockarg. block
- function can take block argument, e.g., proc {|&blockarg| ...}.
-
-Thu Nov 28 21:43:48 2013 Zachary Scott <e@zzak.io>
-
- * doc/dtrace_probes.rdoc: [DOC] Import dtrace probes doc from wiki
-
-Thu Nov 28 21:17:32 2013 Zachary Scott <e@zzak.io>
-
- * doc/contributing.rdoc: [DOC] Add heading above ChangeLog tips to
- setup entry for commits, its not required. Actually easier if
- contributors don't include a ChangeLog entry.
-
-Thu Nov 28 21:16:18 2013 Zachary Scott <e@zzak.io>
-
- * doc/contributing.rdoc: [DOC] Add coding style heading for patch
- rules
-
-Thu Nov 28 21:15:45 2013 Zachary Scott <e@zzak.io>
-
- * doc/contributing.rdoc: [DOC] Add notes about deciding what to patch
-
-Thu Nov 28 19:43:45 2013 Masaki Matsushita <glass.saga@gmail.com>
-
- * benchmark/bm_hash_flatten.rb: added. r43896 is about 4 times faster
- than 2.0.0p353.
-
- * benchmark/bm_hash_keys.rb: added. r43896 is about 5 times faster
- than 2.0.0p353.
-
- * benchmark/bm_hash_values.rb: added. r43896 is about 5 times faster
- than 2.0.0p353.
-
-Thu Nov 28 19:29:04 2013 Zachary Scott <e@zzak.io>
-
- * doc/contributing.rdoc: [DOC] Add notes about slideshow proposals
- from wiki page: HowToRequestFeatures
-
-Thu Nov 28 17:34:42 2013 Masaki Matsushita <glass.saga@gmail.com>
-
- * st.c: add st_values() and st_values_check().
-
- * include/ruby/st.h: add prototypes for above.
-
- * hash.c (rb_hash_values): use st_values_check() for performance
- improvement if VALUE and st_data_t are compatible.
-
-Thu Nov 28 17:14:14 2013 Masaki Matsushita <glass.saga@gmail.com>
-
- * st.c (st_keys): fix not to use Qundef in st.c.
-
- * include/ruby/st.h: define modified prototype.
-
- * hash.c (rb_hash_keys): use modified st_keys().
-
-Thu Nov 28 16:34:43 2013 Aman Gupta <ruby@tmm1.net>
-
- * gc.c: Expose details about last garbage collection via GC.stat.
- * gc.c (gc_stat): Add :last_collection_flags for reason/trigger/type of
- last GC run.
- * gc.c (gc_prof_sweep_timer_stop): Record HAVE_FINALIZE GPR even
- without GC_PROFILE_MORE_DETAIL.
- * gc.c (gc_profile_flags): Add GC::Profiler.decode_flags to make sense
- of GC.stat[:last_collection_flags]
- * test/ruby/test_gc.rb (class TestGc): Test for above.
-
-Thu Nov 28 16:15:47 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * win32/win32.c (rb_w32_dup2): extract from rb_cloexec_dup2() and
- redirect_dup2().
-
-Tue Nov 28 14:40:00 2013 Akira Matsuda <ronnie@dio.jp>
-
- * lib/drb/ssl.rb: [Doc] Fix typo
-
-Thu Nov 28 13:56:05 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * common.mk (Doxyfile): tool/file2lastrev.rb needs running with
- BASERUBY since r43617. [ruby-dev:47823] [Bug #9169]
-
-Thu Nov 28 09:18:39 2013 Koichi Sasada <ko1@atdot.net>
-
- * string.c (rb_fstring): fstrings should be ELTS_SHARED.
- If we resurrect dying objects (non-marked, but not swept yet),
- pointing shared string can be collected.
- To avoid such issue, fstrings (recorded to fstring_table)
- should not be ELTS_SHARED (should not have a shared string).
-
-Thu Nov 28 01:35:08 2013 Masaki Matsushita <glass.saga@gmail.com>
-
- * st.c (st_keys): fix to use st_index_t for size of hash.
-
-Thu Nov 28 00:36:52 2013 Masaki Matsushita <glass.saga@gmail.com>
-
- * st.c (st_keys): define st_keys(). it writes each key to buffer.
-
- * hash.c (rb_hash_keys): use st_keys() for performance improvement
- if st_data_t and VALUE are compatible.
-
- * include/ruby/st.h: define macro ST_DATA_COMPATIBLE_P() to predicate
- whether st_data_t and passed type are compatible.
-
- * configure.in: check existence of builtin function to use in
- ST_DATA_COMPATIBLE_P().
-
-Thu Nov 28 00:07:28 2013 Masaki Matsushita <glass.saga@gmail.com>
-
- * ruby_atomic.h: remove duplicate definitions between ATOMIC_XXX
- and ATOMIC_SIZE_XXX.
-
-Wed Nov 27 23:55:50 2013 Masaki Matsushita <glass.saga@gmail.com>
-
- * ruby_atomic.h: define ATOMIC_SIZE_CAS() with
- __atomic_compare_exchange_n() and refactoring.
-
-Tue Nov 27 21:43:00 2013 Akira Matsuda <ronnie@dio.jp>
-
- * lib/irb/notifier.rb: [Doc] Fix typo
- * ext/json/lib/json/common.rb: Ditto.
-
-Tue Nov 27 18:04:57 2013 Akira Matsuda <ronnie@dio.jp>
-
- * lib/irb/notifier.rb: Fix typo
-
-Wed Nov 27 17:54:57 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c (gc_mark_stacked_objects): check only when check_mode > 0.
-
-Wed Nov 27 16:07:19 2013 Aman Gupta <ruby@tmm1.net>
-
- * test/ruby/test_gc.rb (class TestGc): Fix warning in
- test_expand_heap.
-
-Wed Nov 27 15:55:52 2013 Aman Gupta <ruby@tmm1.net>
-
- * gc.c (Init_GC): Add new GC::INTERNAL_CONSTANTS for information about
- GC heap/page/slot sizing.
- * test/ruby/test_gc.rb (class TestGc): test for above.
-
-Wed Nov 27 15:21:17 2013 Aman Gupta <ruby@tmm1.net>
-
- * gc.c (gc_page_sweep): Fix compile warning from last commit.
- * hash.c (hash_aset_str): Re-use existing variable to avoid
- unnecessary pointer dereferencing.
-
-Wed Nov 27 15:12:55 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c (gc_page_sweep): disable debug print.
-
-Wed Nov 27 15:05:59 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c (gc_stat): add new information heap_eden_page_length and
- heap_tomb_page_length.
-
- * test/ruby/test_gc.rb: fix to use GC.stat[:heap_eden_page_length]
- instead of GC.stat[:heap_length].
- This test expects `heap_eden_page_length' (used pages size).
-
-Wed Nov 27 15:02:53 2013 Aman Gupta <ruby@tmm1.net>
-
- * test/ruby/test_eval.rb (class TestEval): Use assert_same instead of
- assert_equal.
- * test/ruby/test_hash.rb (class TestHash): ditto.
- * test/ruby/test_iseq.rb (class TestISeq): ditto.
-
-Wed Nov 27 14:50:02 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rinda/ring.rb: Announce RingServer for the same process.
- [ruby-trunk - Bug #9163]
- * test/rinda/test_rinda.rb: Tests for the above.
-
-Wed Nov 27 14:37:33 2013 Aman Gupta <ruby@tmm1.net>
-
- * test/ruby/test_eval.rb (class TestEval): Add test for shared eval
- filenames via rb_fstring().
- * test/ruby/test_iseq.rb (class TestISeq): Add test for shared
- iseq labels via rb_fstring(). [Bug #9159]
-
-Wed Nov 27 14:24:55 2013 Aman Gupta <ruby@tmm1.net>
-
- * hash.c (hash_aset_str): Use rb_fstring() to de-duplicate hash string
- keys. Patch by Eric Wong. [Bug #8998] [ruby-core:57727]
- * test/ruby/test_hash.rb (class TestHash): test for above.
-
-Wed Nov 27 10:39:39 2013 Aman Gupta <ruby@tmm1.net>
-
- * gc.c: Rename rb_heap_t members:
- used -> page_length
- limit -> total_slots
-
-Wed Nov 27 08:24:49 2013 Aman Gupta <ruby@tmm1.net>
-
- * compile.c: Use rb_fstring() to de-duplicate string literals in code.
- [ruby-core:58599] [Bug #9159] [ruby-core:54405]
- * iseq.c (prepare_iseq_build): De-duplicate iseq labels and source
- locations.
- * re.c (rb_reg_initialize): Use rb_fstring() for regex string.
- * string.c (rb_fstring): Handle non-string and already-fstr arguments.
- * vm_eval.c (eval_string_with_cref): De-duplicate eval source
- filename.
-
-Wed Nov 27 07:13:54 2013 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych.rb: psych version 2.0.2
- * ext/psych/psych.gemspec: ditto
+ * win32/win32.c (w32_symlink): fix return type. [Bug #12611] (N3)
-Wed Nov 27 06:40:18 2013 Aaron Patterson <aaron@tenderlovemaking.com>
+ * string.c (rb_str_split_m): simplify the condition.
+ [Bug #12611](N4)
- * ext/psych/lib/psych/scalar_scanner.rb: fix support for negative
- years.
- * ext/psych/lib/psych/visitors/yaml_tree.rb: ditto
- * test/psych/test_date_time.rb: test for change.
- Fixes: https://github.com/tenderlove/psych/issues/168
+Thu Aug 18 23:06:20 2016 Kouhei Sutou <kou@cozmixng.org>
-Wed Nov 27 04:46:55 2013 Aaron Patterson <aaron@tenderlovemaking.com>
+ * lib/rexml/attribute.rb (REXML::Attribute#to_string): Fix wrong
+ entry reference name of double quote.
+ [Bug #12609][ruby-core:76509]
+ Patch by Joseph Marrero. Thanks!!!
- * ext/psych/lib/psych/scalar_scanner.rb: fix regexp for matching TIME
- strings.
- * test/psych/test_date_time.rb: test for change.
- Fixes: https://github.com/tenderlove/psych/issues/171
+Thu Aug 18 23:04:59 2016 Naohisa Goto <ngotogenome@gmail.com>
-Wed Nov 27 02:26:58 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * thread.c (rb_wait_for_single_fd): Clean up fds.revents every time
+ before calling ppoll(2). [Bug #12575] [ruby-dev:49725]
- * string.c (str_new4): copy the original capacity so that memsize of
- frozen shared string returns correct size.
+Thu Aug 18 22:52:19 2016 NARUSE, Yui <naruse@ruby-lang.org>
-Wed Nov 27 02:20:13 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm_args.c (setup_parameters_complex): don't raise ArgumentError
+ if an array is given for instance_exec with optional argument.
+ [ruby-core:76300] [Bug #12568]
+ https://github.com/rails/rails/pull/25699
- * array.c (rb_ary_hash): should not ignore the rest of recursive
- constructs.
+Tue Aug 16 12:27:48 2016 Koichi Sasada <ko1@atdot.net>
- * hash.c (rb_hash_hash): ditto.
+ * gc.c (gc_mark_roots): should mark the VM object itself to mark
+ singleton class of the VM object.
+ Before this patch, we only set mark bit for the VM object and
+ invoke mark function separately.
+ [Bug #12583]
- * range.c (range_hash): ditto.
-
- * struct.c (rb_struct_hash): ditto.
+ * test/ruby/test_gc.rb: add a test.
- * test/-ext-/test_recursion.rb (TestRecursion): separate from
- test/ruby/test_thread.rb.
+Tue Aug 16 12:01:35 2016 Naohisa Goto <ngotogenome@gmail.com>
-Tue Nov 26 22:43:36 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/digest/md5/md5ossl.h: Remove excess semicolons.
+ Suppress warning on Solaris with Oracle Solaris Studio 12.
+ [ruby-dev:49692] [Bug #12524]
- * hash.c (rb_hash): cut off if recursion detected to get rid of stack
- overflow. [ruby-core:58567] [Bug #9151]
+ * ext/digest/md5/md5cc.h: ditto.
+ * ext/digest/sha1/sha1cc.h: ditto.
+ * ext/digest/sha1/sha1ossl.h: ditto.
+ * ext/digest/sha2/sha2cc.h: ditto.
+ * ext/digest/sha2/sha2ossl.h: ditto.
-Tue Nov 26 20:02:39 2013 Koichi Sasada <ko1@atdot.net>
+Tue Aug 16 11:51:52 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/ruby/test_settracefunc.rb: add tests for a_call/a_return
- by Brandur <brandur@mutelight.org> [Feature #9120]
+ * compile.c (ADD_TRACE): ignore trace instruction on non-positive
+ line.
-Tue Nov 26 19:29:52 2013 Koichi Sasada <ko1@atdot.net>
+ * parse.y (coverage): get rid of ArgumentError when the starting
+ line number is not positive. [ruby-core:76141] [Bug #12517]
- * common.mk: add useful config "set breakpoint pending on"
- for run.gdb.
+Tue Aug 16 11:51:52 2016 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Tue Nov 26 19:17:47 2013 Koichi Sasada <ko1@atdot.net>
+ * test/coverage/test_coverage.rb: ignored test when enabled to coverage.
+ It lead to crash with `make test-all`.
- * ext/objspace/object_tracing.c (newobj_i): skip class_path if class
- is frozen.
+Tue Aug 16 11:46:07 2016 NARUSE, Yui <naruse@ruby-lang.org>
- rb_class_path() can modify frozen classes (and causes errors).
- This patch is temporary. We need no-modification/no-allocation
- class path function.
+ * lib/uri/mailto.rb (initialize): RFC3986_Parser#split sets opaque
+ only if the URI has path-rootless, not path-empty.
+ [ruby-core:76055] [Bug #12498]
+ patched by Chris Heisterkamp <cheister@squareup.com>
-Tue Nov 26 18:12:13 2013 Koichi Sasada <ko1@atdot.net>
+Tue Aug 16 04:57:28 2016 Shugo Maeda <shugo@ruby-lang.org>
- * vm_trace.c: skip "exception check" and "reentrant check (only normal
- events) for internal events.
+ * lib/net/http/generic_request.rb (write_header): A Request-Line must
+ not contain CR or LF.
- Reentrant check for internal events are remaining.
+Tue Aug 16 04:54:12 2016 Shugo Maeda <shugo@ruby-lang.org>
-Tue Nov 26 17:38:16 2013 Koichi Sasada <ko1@atdot.net>
+ * lib/net/ftp.rb (putline): raise an ArgumentError when
+ CR or LF is included in a line.
- * vm_trace.c: prohibit to specify normal events and internal events
- simultaneously.
- I will introduce special care for internal events later.
+Tue Aug 16 04:38:48 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/-test-/tracepoint/tracepoint.c: test this behavior.
+ * ext/date/date_strftime.c (date_strftime_with_tmx): reject too
+ large precision to get rid of buffer overflow.
+ reported by Guido Vranken <guido AT guidovranken.nl>.
- * test/-ext-/tracepoint/test_tracepoint.rb: ditto.
+Tue Aug 16 04:28:22 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Nov 26 16:30:31 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * file.c (append_fspath): normalize directory name to be appended
+ on OS X. [ruby-core:75957] [Ruby trunk Bug#12483]
+ https://github.com/rails/rails/issues/25303#issuecomment-224834804
- * file.c (rb_readlink): fix buffer overflow on a long symlink. since
- rb_str_modify_expand() expands from its length but not its capacity,
- need to set the length properly for each expansion.
- [ruby-core:58592] [Bug #9157]
+Tue Aug 16 04:16:14 2016 NARUSE, Yui <naruse@ruby-lang.org>
-Tue Nov 26 14:23:17 2013 Aman Gupta <ruby@tmm1.net>
+ * regcomp.c (noname_disable_map): don't optimize out group 0
+ Ruby's Regexp doesn't allow normal numbered groups if the regexp
+ has named groups. On such case it optimizes out related NT_ENCLOSE.
+ But even on the case it can use \g<0>.
+ This fix not to remove NT_ENCLOSE whose regnum is 0.
+ [ruby-core:75828] [Bug #12454]
- * ext/objspace/objspace_dump.c (dump_append_string_value): Escape
- control characters for strict json parsers.
- * ext/objspace/objspace_dump.c (objspace_dump): Document File/IO
- output option.
+Tue Aug 16 04:06:52 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Nov 26 11:43:19 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * missing/crypt.c: fix size macros to use configured values
+ for platforms long is larger than 32bit.
+ [ruby-core:75792] [Bug #12446]
- * ruby_atomic.h: use __atomic builtin functions supported by GCC.
- __sync family are legacy functions now and it is recommended
- that new code use the __atomic functions.
- http://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html
+Tue Aug 16 04:03:25 2016 Kazuki Yamaguchi <k@rhe.jp>
- * configure.in: check existence of __atomic functions.
+ * ext/openssl/ossl_bn.c (try_convert_to_bnptr): Extracted from
+ GetBNPtr(). This doesn't raise exception but returns NULL on error.
+ (GetBNPtr): Raise TypeError if conversion fails.
+ (ossl_bn_eq): Implement BN#==.
+ (ossl_bn_eql): #eql? should not raise TypeError even if the argument
+ is not compatible with BN.
+ (ossl_bn_hash): Implement BN#hash.
-Tue Nov 26 10:57:49 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/openssl/ossl_bn.c (Init_ossl_bn): Define #== and #hash.
- * ext/bigdecimal/bigdecimal.gemspec: revert Gem::Specification#date
- for snapshot/release tarballs.
+ * test/openssl/test_bn.rb: Test BN#eql?, #== and #hash
-Tue Nov 26 06:42:50 2013 Aman Gupta <ruby@tmm1.net>
+Tue Aug 16 03:51:59 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * NEWS: Add ObjectSpace.after_gc_{start,end}_hook=
- * ext/objspace/objspace_dump.c: [DOC] catch up dump/dump_all to r43679
+ * transcode.c (str_transcode0): scrub in the given encoding when
+ the source encoding is given, not in the encoding of the
+ receiver. [ruby-core:75732] [Bug #12431]
-Tue Nov 26 04:12:10 2013 Eric Hodel <drbrain@segment7.net>
+Tue Aug 16 03:41:21 2016 Kazuki Yamaguchi <k@rhe.jp>
- * lib/rubygems: Update to RubyGems master 612f85a. Notable changes:
+ * ext/openssl/ossl_pkey_dh.c (ossl_dh_compute_key): Check that the DH
+ has 'p' (the prime) before calling DH_size(). We can create a DH with
+ no parameter but DH_size() does not check and dereferences NULL.
+ [ruby-core:75720] [Bug #12428]
- Fixed installation and activation of git: and path: gems via
- Gem.use_gemdeps
+ * ext/openssl/ossl_pkey_dsa.c (ossl_dsa_sign): Ditto. DSA_size() does
+ not check dsa->q.
- Improved documentation coverage
+ * ext/openssl/ossl_pkey_rsa.c (ossl_rsa_public_encrypt,
+ ossl_rsa_public_decrypt, ossl_rsa_private_encrypt,
+ ossl_rsa_private_decrypt): Ditto. RSA_size() does not check rsa->n.
- * test/rubygems: ditto.
+Tue Aug 16 03:10:42 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Nov 25 22:23:03 2013 Zachary Scott <e@zzak.io>
+ * transcode.c (enc_arg, str_transcode_enc_args, econv_args):
+ remove volatile, and add GC guards in callers.
+ [ruby-core:75664] [Bug #12411]
- * lib/xmlrpc.rb: [DOC] Fix link to xmlrpc4r site [Bug #9148]
- Patch by Giorgos Tsiftsis
+Tue Aug 16 02:45:52 2016 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Mon Nov 25 19:48:10 2013 Zachary Scott <e@zzak.io>
+ * ext/psych/*, test/psych/*: Update psych 2.1.0
+ This version fixed [Bug #11988][ruby-core:72850]
- * lib/uri/common.rb: [DOC] typo fixes by @vipulnsward [Fixes GH-456]
- https://github.com/ruby/ruby/pull/456
- * lib/uri/generic.rb: [DOC] ditto.
+Fri Aug 12 04:15:10 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Nov 25 14:34:42 2013 Zachary Scott <e@zzak.io>
+ * common.mk (build-ext), ext/extmk.rb: use variable EXTENCS
+ different than ENCOBJS, to get rid of circular dependency.
+ build libencs when linking encodings statically.
+ [ruby-core:75618] [Bug #12401]
- * ext/bigdecimal/bigdecimal.gemspec: bump BigDecimal to 1.2.3 for
- proper release date in RubyGems
+Fri Aug 12 04:04:23 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Nov 25 14:25:08 2013 Zachary Scott <e@zzak.io>
+ * process.c (rb_execarg_commandline): build command line string
+ from argument vector in rb_execarg.
+ [ruby-core:75611] [Bug #12398]
- * ext/bigdecimal/bigdecimal.gemspec: Remove Gem::Specification#date
- We should rely on rubygems to create the date the gem was released
- for each version.
+Fri Aug 12 03:30:59 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Nov 25 06:53:30 2013 Koichi Sasada <ko1@atdot.net>
+ * variable.c (rb_local_constants_i): exclude private constants
+ when excluding inherited constants too. [Bug #12345]
- * internal.h: do not use ruby_sized_xrealloc() and ruby_sized_xfree()
- if HAVE_MALLOC_USABLE_SIZE (or _WIN32) is defined.
+Fri Aug 12 03:00:05 2016 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
- We don't need these function if malloc_usable_size() is available.
+ * lib/drb/timeridconv.rb: don't use keeper thread. [Bug #12342]
- * gc.c: catch up this change.
+ * test/drb/ut_timerholder.rb: ditto.
- * gc.c: define HAVE_MALLOC_USABLE_SIZE on _WIN32.
+Fri Aug 12 02:46:37 2016 Kazuki Yamaguchi <k@rhe.jp>
- * array.c (ary_resize_capa): do not use ruby_sized_xfree() with
- local variable to avoid "unused local variable" warning.
- This change only has few impact.
+ * ext/openssl/ossl_ssl.c (ossl_ssl_stop): Don't free the SSL struct
+ here. Since some methods such as SSLSocket#connect releases GVL,
+ there is a chance of use after free if we free the SSL from another
+ thread. SSLSocket#stop was documented as "prepares it for another
+ connection" so this is a slightly incompatible change. However when
+ this sentence was added (r30090, Add toplevel documentation for
+ OpenSSL, 2010-12-06), it didn't actually. The current behavior is
+ from r40304 (Correct shutdown behavior w.r.t GC., 2013-04-15).
+ [ruby-core:74978] [Bug #12292]
- * string.c (rb_str_resize): ditto.
+ * ext/openssl/lib/openssl/ssl.rb (sysclose): Update doc.
-Mon Nov 25 05:05:04 2013 Koichi Sasada <ko1@atdot.net>
+ * test/openssl/test_ssl.rb: Test this.
- * test/-ext-/tracepoint/test_tracepoint.rb: catch up GC.stat changes
- at r43835.
+Thu Aug 11 01:30:29 2016 Marcus Stollsteimer <sto.mar@web.de>
-Mon Nov 25 04:45:59 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/json/lib/*.rb: Removed some comments. Because these are unnecessary
+ class description. [ci skip][Bug #12255][ruby-core:74835]
- * gc.c: continue to change OLDSPACE -> OLDMALLOC.
- RGENGC_ESTIMATE_OLDSPACE -> RGENGC_ESTIMATE_OLDMALLOC.
+Thu Aug 11 01:09:43 2016 NARUSE, Yui <naruse@ruby-lang.org>
- * gc.c: add a new major GC reason GPR_FLAG_MAJOR_BY_OLDMALLOC.
+ * pack.c (pack_pack): use union instead of bare variable to ease
+ optimizations and avoid assigning x87 floating point number.
+ [ruby-core:74496] [Bug #12209]
-Mon Nov 25 04:16:09 2013 Koichi Sasada <ko1@atdot.net>
+ * pack.c (pack_unpack): ditto.
- * gc.c: change terminology "..._num" to "..._slots" about slot operation.
- * final_num -> final_slots
- * objspace_live_num() -> objspace_live_slots()
- * objspace_limit_num() -> objspace_limit_slots()
- * objspace_free_num() -> objspace_free_slots()
+Tue Aug 2 01:34:12 2016 Eric Wong <e@80x24.org>
-Mon Nov 25 04:03:12 2013 Koichi Sasada <ko1@atdot.net>
+ * lib/webrick/httpservlet/cgihandler.rb (do_GET): delete HTTP_PROXY
+ * test/webrick/test_cgi.rb (test_cgi_env): new test
+ * test/webrick/webrick.cgi (do_GET): new endpoint to dump env
+ [ruby-core:76511] [Bug #12610]
- * gc.c (gc_stat): add internal information.
- * heap_swept_slot
- * malloc_increase
- * malloc_limit
- * remembered_shady_object
- * remembered_shady_object_limit
- * old_object
- * old_object_limit
- * oldmalloc_increase
- * oldmalloc_limit
+Tue Aug 2 01:33:11 2016 Shugo Maeda <shugo@ruby-lang.org>
- * gc.c (gc_stat): rename names.
- * heap_live_num -> heap_live_slot
- * heap_free_num -> heap_free_slot
- * heap_final_slot -> heap_final_slot
+ * test/ruby/test_refinement.rb: skip
+ test_prepend_after_refine_wb_miss on ARM or MIPS.
+ [ruby-core:76031] [Bug #12491]
- Quote from RDoc of GC.stat():
- "The contents of the hash are implementation specific and may
- be changed in the future."
+Sat Jul 30 12:23:29 2016 Shugo Maeda <shugo@ruby-lang.org>
- * test/ruby/test_gc.rb: catch up this change.
+ * vm_args.c (vm_caller_setup_arg_block): disable symbol block
+ argument optimization when tail call optimization is enabled,
+ in order to avoid SEGV. [ruby-core:76288] [Bug #12565]
-Mon Nov 25 03:59:45 2013 Koichi Sasada <ko1@atdot.net>
+Sat Jul 30 12:10:51 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/ruby/test_gc.rb: catch up last commit.
- Now RUBY_GC_OLDSPACE_LIMIT(...) is RUBY_GC_OLDMALLOC_LIMIT(...).
+ * proc.c (passed_block): convert passed block symbol to proc.
+ based on the patch by Daisuke Sato in [ruby-dev:49695].
+ [Bug #12531]
-Mon Nov 25 03:10:46 2013 Koichi Sasada <ko1@atdot.net>
+Sat Jul 30 10:58:49 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c: change terminology OLDSPACE -> OLDMALLOC.
- (oldspace -> oldmalloc for variable names)
+ * vm_insnhelper.c (vm_throw_start): check if the iseq is symbol
+ proc, class definition should not be a symbol proc.
+ [ruby-core:75856] [Bug #12462]
- OLDSPACE is confusing because it is not includes slots.
- To more clearly, rename such as (oldspace_limit -> oldmalloc_limit).
- It is clear that it measures (estimates) malloc()'ed size.
+Mon Jul 11 22:35:00 2016 Kenta Murata <mrkn@mrkn.jp>
-Mon Nov 25 00:50:03 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * bignum.c (rb_big_hash): make it public function to be available in
+ other source files, and remove documentation comment for Bignum#hash.
- * internal.h: use __builtin_bswap16() if possible.
+ * bignum.c (Bignum#hash): remove its definition because it is unified
+ with Object#hash.
- * configure.in: check existence of __builtin_bswap16().
+ * include/ruby/intern.h (rb_big_hash): add a prototype declaration.
-Sun Nov 24 22:24:19 2013 Tanaka Akira <akr@fsij.org>
+ * hash.c (any_hash): treat Bignum values directly.
- * bignum.c (bigxor_int): Apply BIGLO for long in a BDIGIT expression.
- (bigor_int): Ditto.
- (bigand_int): Ditto.
+Sat Jul 2 04:00:50 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun Nov 24 18:13:23 2013 Tanaka Akira <akr@fsij.org>
+ * string.c (tr_trans): consider terminator length and fix heap
+ overflow. reported by Guido Vranken <guido AT guidovranken.nl>.
- * include/ruby/defines.h (SIZEOF_ACTUAL_BDIGIT): Defined.
+Sat Jul 2 03:33:28 2016 Shugo Maeda <shugo@ruby-lang.org>
- * include/ruby/ruby.h (RBIGNUM_EMBED_LEN_MAX): Use
- SIZEOF_ACTUAL_BDIGIT instead of SIZEOF_BDIGITS.
- SIZEOF_BDIGITS can be different to sizeof(BDIGIT).
+ * vm.c (invoke_bmethod, invoke_block_from_c_0): revert r52104
+ partially to avoid "self has wrong type to call super in this
+ context" errors.
+ [ruby-core:72724] [Bug #11954]
-Sun Nov 24 13:49:08 2013 Tanaka Akira <akr@fsij.org>
+Mon Jun 20 02:38:29 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * include/ruby/defines.h: Don't use int128_t for Bignum.
- It's not always faster.
+ * lib/optparse.rb (OptionParser::Completion.candidate): get rid of
+ nil as key names. [ruby-core:75773] [Bug #12438]
- * bignum.c: Ditto.
+ * lib/optparse.rb (OptionParser#make_switch): char class option
+ cannot be NoArgument, default to RequiredArgument.
-Sun Nov 24 10:18:15 2013 Aman Gupta <ruby@tmm1.net>
+Mon Jun 20 02:25:44 2016 NARUSE, Yui <naruse@ruby-lang.org>
- * NEWS: Add details about new debugging features and APIs.
+ * re.c (unescape_nonascii): scan hex up to only 3 characters.
+ [Bug #12420] [Bug #12423]
-Sun Nov 24 09:37:20 2013 Andrew Vit <andrew@avit.ca>
+Mon Jun 20 02:25:44 2016 NARUSE, Yui <naruse@ruby-lang.org>
- * lib/csv.rb: Optimize header hashes by freezing string keys.
- [ruby-core:58510]
+ * regparse.c (fetch_token_in_cc): raise error if given octal escaped
+ character is too big. [Bug #12420] [Bug #12423]
-Sun Nov 24 09:18:06 2013 Aman Gupta <ruby@tmm1.net>
+Sun Jun 19 04:29:13 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/objspace/objspace_dump.c (dump_object): Use PRIuSIZE to print
- size_t for better win32 compatibility.
- * test/objspace/test_objspace.rb (test_dump_all): Hold reference to
- test string to avoid failure due to GC. Reduce size of failure message
- using grep(/TEST STRING/).
+ * include/ruby/missing.h (isfinite): move from numeric.c.
-Sun Nov 24 08:38:00 2013 Kyle Stevens <kstevens715@gmail.com>
+Sun Jun 19 04:29:13 2016 NAKAMURA Usaku <usa@ruby-lang.org>
- * lib/csv.rb: If skip_lines is set to a String, convert it to a Regexp
- to prevent the alternative, which is that each line in the CSV gets
- converted to a Regexp when calling skip_lines#match.
+ * ext/bigdecimal/bigdecimal.c (isfinite): get rid of a warning on
+ cygwin. [Bug #12417][ruby-core:75691]
-Sun Nov 24 01:03:00 2013 Kenta Murata <mrkn@mrkn.jp>
+Sun Jun 19 04:29:13 2016 NAKAMURA Usaku <usa@ruby-lang.org>
- * ext/bigdecimal/bigdecimal.c (BigDecimal_power): Use FIX2LONG instead
- of FIX2INT to avoid conversion error.
+ * ext/bigdecimal/bigdecimal.c (isfinite): isfinite does not always
+ exist. fixed build error on Windows introduced at r55123.
-Sun Nov 24 00:44:30 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sun Jun 19 04:29:13 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * include/ruby/ruby.h (RBIGNUM_EMBED_LEN_MAX): define by macros
- defined in defines.h, instead of complex and repeated expression.
+ * ext/bigdecimal/bigdecimal.c (GetVpValueWithPrec): consider
+ non-finite float values not to raise FloatDomainError.
+ [ruby-core:75682] [Bug #12414]
-Sat Nov 23 22:22:26 2013 Tanaka Akira <akr@fsij.org>
+Thu Jun 16 00:42:56 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * include/ruby/ruby.h (RBIGNUM_EMBED_LEN_MAX): Limit the value to
- less than 8.
+ * string.c (rb_str_modify_expand): check integer overflow.
+ [ruby-core:75592] [Bug #12390]
-Sat Nov 23 19:52:00 2013 Kenta Murata <mrkn@mrkn.jp>
+Thu Jun 16 00:29:29 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/bigdecimal/lib/bigdecimal/math.rb (BigMath.E): Use BigMath.exp.
- [Feature #6857] [ruby-core:47130]
+ * vm_insnhelper.c (vm_get_ev_const): warn deprecated constant even
+ in the class context. [ruby-core:75505] [Bug #12382]
-Sat Nov 23 19:46:00 2013 Kenta Murata <mrkn@mrkn.jp>
+Tue Jun 14 03:49:28 2016 Eric Wong <e@80x24.org>
- * ext/bigdecimal/bigdecimal.c (BigMath_s_exp): Optimize the
- calculation algorithm to reduce the number of divisions.
- This optimization was proposed by Rafal Michalski.
- [Feature #6857] [ruby-core:47130]
+ * dir.c (dir_close): update RDoc for 2.3 #close change
+ [ruby-core:75679] [Bug #12413]
-Sat Nov 23 19:20:00 2013 Kenta Murata <mrkn@mrkn.jp>
+Tue Jun 14 03:47:29 2016 Eric Wong <e@80x24.org>
- * ext/bigdecimal/bigdecimal.c (BigDecimal_div2): The signature was
- changed to allow us to pass arguments directly.
+ * proc.c: fix RDoc of Proc#===/call/yield/[]
+ [Bug #12332]
- * ext/bigdecimal/bigdecimal.c (BigDecimal_div3): Added for the role of
- the old BigDecimal_div2.
+Tue Jun 14 03:34:27 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Nov 23 12:31:00 2013 Koichi Sasada <ko1@atdot.net>
+ * variable.c (rb_local_constants_i): exclude hidden constants.
+ [ruby-core:75575] [Bug #12389]
- * gc.c: fix global variable name.
- Now we have following environments (and related variable names).
+Tue Jun 14 03:25:14 2016 Benoit Daloze <eregontp@gmail.com>
- * RUBY_GC_HEAP_INIT_SLOTS
- * RUBY_GC_HEAP_FREE_SLOTS
- * RUBY_GC_HEAP_GROWTH_FACTOR (new from 2.1)
- * RUBY_GC_HEAP_GROWTH_MAX_SLOTS (new from 2.1)
+ * insns.def (defineclass): Also raise an error when redeclaring the
+ superclass of a class as Object and it has another superclass.
+ [Bug #12367] [ruby-core:75446]
- * obsolete
- * RUBY_FREE_MIN -> RUBY_GC_HEAP_FREE_SLOTS (from 2.1)
- * RUBY_HEAP_MIN_SLOTS -> RUBY_GC_HEAP_INIT_SLOTS (from 2.1)
+ * test/ruby/test_class.rb: test for above.
- * RUBY_GC_MALLOC_LIMIT
- * RUBY_GC_MALLOC_LIMIT_MAX (new from 2.1)
- * RUBY_GC_MALLOC_LIMIT_GROWTH_FACTOR (new from 2.1)
+Tue Jun 14 03:15:54 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * RUBY_GC_OLDSPACE_LIMIT (new from 2.1)
- * RUBY_GC_OLDSPACE_LIMIT_MAX (new from 2.1)
- * RUBY_GC_OLDSPACE_LIMIT_GROWTH_FACTOR (new from 2.1)
+ * process.c (rb_exec_getargs): honor the expected argument types
+ over the conversion method. the basic language functionality
+ should be robust. [ruby-core:75388] [Bug #12355]
- * test/ruby/test_gc.rb: catch up this change.
+Tue Jun 14 03:02:38 2016 NAKAMURA Usaku <usa@ruby-lang.org>
-Sat Nov 23 09:45:49 2013 Aman Gupta <ruby@tmm1.net>
+ * win32/win32.c, include/ruby/win32.h (rb_w32_utruncate): implements new
+ truncate alternative which accepts UTF-8 path.
- * marshal.c (w_object): Use HASH_PROC_DEFAULT directly from internal.h
+ * file.c (truncate): use above function.
+ [Bug #12340]
-Sat Nov 23 08:43:23 2013 Aman Gupta <ruby@tmm1.net>
+Tue Jun 14 02:58:41 2016 Marcus Stollsteimer <sto.mar@web.de>
- * gc.c: Rename heap_pages_swept_num to heap_pages_swept_slots to
- clarify meaning (number of slots, not pages).
+ * ext/date/date_core.c (Init_date_core): [DOC] Convert DateTime
+ documentation to RDoc from Markdown.
+ [ruby-core:75136] [Bug #12311]
-Sat Nov 23 08:23:23 2013 Aman Gupta <ruby@tmm1.net>
+Sun Jun 12 02:36:52 2016 NARUSE, Yui <naruse@ruby-lang.org>
- * lib/set.rb (class SortedSet): Fix source_location for methods
- defined via eval.
+ * regcomp.c (compile_length_tree): return error code immediately
+ if compile_length_tree raised error [Bug #12418]
-Sat Nov 23 03:44:03 2013 Eric Hodel <drbrain@segment7.net>
+Sun Jun 12 02:27:07 2016 NAKAMURA Usaku <usa@ruby-lang.org>
- * lib/rubygems: Update to RubyGems master dcce4ff. Important changes
- in this commit:
+ * thread.c (recursive_list_access): a object id may be a Bignum. so,
+ the list must be a objhash, instead of a identhash.
+ this fixes many test errors on mswin64 CI.
- Remove automatic detection of gem dependencies files. This prevents a
- security hole as described in [ruby-core:58490]
-
- Fixed bugs for installing git gems.
-
- * test/rubygems: ditto.
+Sun Jun 12 01:59:33 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Nov 22 22:30:00 2013 Kenta Murata <mrkn@mrkn.jp>
+ * parse.y (new_if_gen): set newline flag to NODE_IF to trace all
+ if/elsif statements. [ruby-core:67720] [Bug #10763]
- * ext/bigdecimal/bigdecimal.c (BigDecimal_power):
- Round the result value only if the precision is given.
+Sun May 15 02:33:52 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Nov 22 17:20:50 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * lib/mkmf.rb (pkg_config): use xsystem consistently to set up
+ library path environment variable as well as latter pkg-config
+ calls. [ruby-dev:49619] [Bug #12379]
- * transcode.c (str_transcode0): don't scrub invalid chars if
- str.encode doesn't have explicit invalid: :replace.
- workaround fix for see #8995
+Fri May 6 02:30:32 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Nov 22 17:11:26 2013 Narihiro Nakamura <authornari@gmail.com>
+ * lib/optparse.rb: [DOC] fix example code. base on the code by
+ Semyon Gaivoronskiy in [ruby-core:75224]. [Bug #12323]
- * include/ruby/intern.h, internal.h: Expose rb_gc_count().
+Fri May 6 02:28:31 2016 Masaki Suketa <masaki.suketa@nifty.ne.jp>
-Fri Nov 22 17:07:00 2013 Kenta Murata <mrkn@mrkn.jp>
+ * ext/win32ole/win32ole.c (ole_vstr2wc, ole_variant2val): fix blank
+ string conversion.
+ [Bug #11880]
+ Thanks Akio Tajima for the patch!
- * ext/bigdecimal/bigdecimal.gemspec: version 1.2.2.
+Fri May 6 02:24:13 2016 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-Fri Nov 22 17:04:00 2013 Kenta Murata <mrkn@mrkn.jp>
+ * bignum.c: [DOC] Update result of 123456789 ** -2.
+ [ruby-dev:49606] [Bug #12339]
- * ext/bigdecimal/bigdecimal.c (BigDecimal_data_type):
- Use RUBY_TYPED_FREE_IMMEDIATELY only if it is available.
+Wed May 4 02:38:08 2016 Yuichiro Kaneko <yui-knk@ruby-lang.org>
-Fri Nov 22 16:49:00 2013 Kenta Murata <mrkn@mrkn.jp>
+ * internal.h (RCOMPLEX_SET_IMAG): undef RCOMPLEX_SET_IMAG
+ instead of duplicated undef RCOMPLEX_SET_REAL.
- * ext/bigdecimal/bigdecimal.c (BigDecimal_power): Round the result value.
- [Bug #8818] [ruby-core:56802]
+Wed May 4 02:38:08 2016 Yuichiro Kaneko <yui-knk@ruby-lang.org>
- * test/bigdecimal/test_bigdecimal.rb: Add a test for the above fix.
+ * complex.c (rb_complex_set_imag): Fix to properly set imag
+ of complex.
-Fri Nov 22 16:25:43 2013 Koichi Sasada <ko1@atdot.net>
+Tue Apr 26 23:34:45 2016 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
- * gc.c (heap_set_increment): accept minimum additional page number.
+ * version.h: Bump versionto 2.3.2.
- * gc.c (gc_after_sweep): allocate pages to allocate at least
- RUBY_HEAP_MIN_SLOTS.
- [Bug #9137]
+Tue Apr 26 02:58:51 2016 Marcus Stollsteimer <sto.mar@web.de>
-Fri Nov 22 16:19:52 2013 Narihiro Nakamura <authornari@gmail.com>
+ * doc/extension.rdoc: Improvements to english grammers.
+ [Bug #12246][ruby-core:74792][ci skip]
- * include/ruby/intern.h (rb_gc_set_params): Deprecate
- rb_gc_set_params because it's only used in ruby internal.
+Tue Apr 26 02:58:51 2016 craft4coder <yooobuntu@163.com>
- * internal.h (ruby_gc_set_params): Declare rb_gc_set_params's
- alias function.
+ * doc/extension.rdoc: [DOC] `nul` should be uppercase.
+ change 'nul' => 'NUL'. [Fix GH-1172]
- * gc.c: ditto.
+Tue Apr 26 02:54:57 2016 Marcus Stollsteimer <sto.mar@web.de>
- * ruby.c: use ruby_gc_set_params.
+ * encoding.c: Fix return value of `Encoding::ISO8859_1.name`
+ [Bug #12313][ruby-core:75147][ci skip]
+ * ext/bigdecimal/bigdecimal.c: Fix code sample of `BigDecimal.new`
-Fri Nov 22 14:55:00 2013 Kenta Murata <mrkn@mrkn.jp>
+Mon Apr 25 02:29:07 2016 Rei Odaira <Rei.Odaira@gmail.com>
- * ext/bigdecimal/bigdecimal.c (BigMath_s_exp): Insert rb_thread_check_ints.
+ * configure.in: add missing -lm for AIX.
-Fri Nov 22 14:35:00 2013 Kenta Murata <mrkn@mrkn.jp>
+Mon Apr 25 02:29:07 2016 Rei Odaira <Rei.Odaira@gmail.com>
- * ext/bigdecimal/bigdecimal.c (BigMath_s_exp): Fix the inserting points
- of RB_GC_GUARDs.
+ * configure.in: don't use the system-provided round(3) on AIX.
+ In AIX, round(0.49999999999999994) returns 1.0.
+ Use round() in numeric.c instead.
-Fri Nov 22 14:31:00 2013 Kenta Murata <mrkn@mrkn.jp>
+Sun Apr 24 03:05:47 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/bigdecimal/bigdecimal.c: Fix indentation.
+ * ruby.c: cygwin does not use w32_cmdvector, command line can be
+ other than UTF-8. [ruby-dev:49519] [Bug #12184]
-Fri Nov 22 14:03:00 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Sat Apr 23 01:01:13 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/nkf: merge nkf 2.1.3 2a2f2c5.
+ * eval_jump.c (exec_end_procs_chain): restore previous error info
+ for each end procs. [ruby-core:75038] [Bug #12302]
-Fri Nov 22 12:43:52 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Apr 23 00:51:51 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * util.c (ruby_strtod): ignore too long fraction part, which does not
- affect the result.
+ * compile.c (new_label_body): initialize bit fields, since
+ compile_data_alloc does not clear the memory. [Bug #12082]
-Fri Nov 22 12:17:14 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Apr 23 00:51:51 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/openssl/lib/openssl/buffering.rb (OpenSSL::Buffering#initialize):
- initialize of a module should pass arguments to super.
+ * compile.c (iseq_optimize): disable tail call optimization in
+ rescued, rescue, and ensure blocks.
+ [ruby-core:73871] [Bug #12082]
-Fri Nov 22 12:02:58 2013 Tanaka Akira <akr@fsij.org>
+Sat Apr 23 00:33:04 2016 NARUSE, Yui <naruse@ruby-lang.org>
- * test/ruby/test_settracefunc.rb: Ignore events from other threads.
+ * ext/nkf/nkf-utf8/nkf.c (mime_putc): fix typo.
+ [Bug #12202] [ruby-core:74802]
-Fri Nov 22 10:35:57 2013 Koichi Sasada <ko1@atdot.net>
+Sat Apr 23 00:33:04 2016 NARUSE, Yui <naruse@ruby-lang.org>
- * vm.c (ruby_vm_destruct): do not use ruby_xfree() after freeing
- objspace.
+ * ext/nkf/nkf-utf8/nkf.c: Merge upstream 4f3edf80a0.
+ patched by Anton Sivakov [Bug #12201] [Bug #12202]
- * gc.c (ruby_mimfree): added. It is similar to ruby_mimmalloc().
+Sat Apr 23 00:29:15 2016 NARUSE, Yui <naruse@ruby-lang.org>
- * internal.h: ditto.
+ * lib/securerandom.rb (gen_random): to avoid blocking on Windows.
+ On Windows OpenSSL RAND_bytes (underlying implementation is
+ RAND_poll in crypto/rand/rand_win.c) may be blocked at
+ NetStatisticsGet.
+ https://wiki.openssl.org/index.php/Random_Numbers#Windows_Issues
+ Instead of this, use Random.raw_seed directly (whose implementation
+ CryptGenRandom is one of the source of
+ entropy of RAND_poll on Windows).
+ https://wiki.openssl.org/index.php/Random_Numbers
+ Note: CryptGenRandom function is PRNG and doesn't check its entropy,
+ so it won't block. [Bug #12139]
+ https://msdn.microsoft.com/ja-jp/library/windows/desktop/aa379942.aspx
+ https://tools.ietf.org/html/rfc4086#section-7.1.3
+ https://eprint.iacr.org/2007/419.pdf
+ http://www.cs.huji.ac.il/~dolev/pubs/thesis/msc-thesis-leo.pdf
-Fri Nov 22 09:42:35 2013 Zachary Scott <e@zzak.io>
+Sat Apr 23 00:25:26 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/digest/test_digest.rb: Reverse order of assert_equal
- Reported by @splattael
+ * miniinit.c (Init_enc): add some common aliases of built-in
+ encodings. [ruby-core:72481] [Bug #11872]
-Fri Nov 22 09:03:16 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Sat Apr 23 00:13:50 2016 sorah (Shota Fukumori) <her@sorah.jp>
- * gc.c: fix build failure on FreeBSD introduced by r43763.
- malloc_usable_size() is defined by malloc_np.h on FreeBSD.
+ * lib/forwardable.rb: Convert given accessors to String.
- * configure.in: check malloc.h and malloc_np.h.
+ r53381 changed to accept only Symbol or String for accessors, but
+ there are several rubygems that pass classes (e.g. Array,
+ Hash, ...) as accessors. Prior r53381, it was accepted because Class#to_s
+ returns its class name. After r53381 given accessors are checked
+ with define_method, but it accepts only Symbol or String, otherwise
+ raises TypeError.
-Fri Nov 22 08:27:13 2013 Eric Hodel <drbrain@segment7.net>
+ def_delegator Foo, :some_method
- * lib/rubygems: Update to RubyGems master 50a8210. Important changes
- in this commit:
+ This change is to revert unexpected incompatibility. But this behavior
+ may change in the future.
- RubyGems now automatically checks for gem.deps.rb or Gemfile when
- running ruby executables. This behavior is similar to `bundle exec
- rake`. This change may be reverted before Ruby 2.1.0 if too many bugs
- are found.
+Sat Apr 23 00:02:09 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/rubygems: ditto.
+ * configure.in: check if succeeded in creating config.h.
-Thu Nov 21 22:33:59 2013 Koichi Sasada <ko1@atdot.net>
+ * tool/ifchange: ignore failures when TEST_COLORS unmatched. just
+ use the default value if expected name is not contained in it.
+ [ruby-core:75046] [Bug #12303]
- * gc.c: RGENGC_CHECK_MODE should be 0.
+Fri Apr 22 23:47:05 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Nov 21 21:40:00 2013 Kenta Murata <mrkn@mrkn.jp>
+ * doc/regexp.rdoc (comments): [DOC] terminators cannot appear in
+ comments. [ruby-core:74838] [Bug #12256]
- * ext/bigdecimal/bigdecimal.c (VpAlloc): Fix the expr to adjust the size
- of the digit array.
+Fri Apr 22 23:44:07 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Nov 21 21:36:00 2013 Kenta Murata <mrkn@mrkn.jp>
+ * extension.rdoc, extension.ja.rdoc: [DOC] Fix some errors.
+ Renamed files, wrong method names or argument types; the example
+ GetDBM macro is now updated to the current version of the actual
+ code. patch by Marcus Stollsteimer in [ruby-core:74690].
+ [Bug #12228]
- * ext/bigdecimal/bigdecimal.c (BigDecimal_sqrt): Fix the precision of
- the result BigDecimal of sqrt.
- [Bug #5266] [ruby-dev:44450]
+Fri Apr 22 23:32:19 2016 Tanaka Akira <akr@fsij.org>
- * test/bigdecimal/test_bigdecimal.rb: add tests for the above changes.
+ * test/ruby/test_time_tz.rb: Tests depends on Europe/Moscow removed
+ to avoid test failures due to the tzdata change.
+ https://github.com/eggert/tz/commit/8ee11a301cf173afb0c76e0315b9f9ec8ebb9d95
+ Found by naruse.
-Thu Nov 21 18:49:02 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Apr 19 02:32:50 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c (vm_xrealloc, vm_xfree): use malloc_usable_size() to obtain old
- size if available.
+ * configure.in (rb_cv_lgamma_r_m0): fix the condition for
+ lgamma_r(-0.0). [Bug #12249]
-Thu Nov 21 18:47:29 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Apr 19 02:32:50 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/delegate.rb (SimpleDelegator#__getobj__): target object must be set.
+ * configure.in (rb_cv_lgamma_r_m0): check if lgamma_r(-0.0)
+ returns negative infinity. [Bug #12249]
- * lib/delegate.rb (DelegateClass#__getobj__): ditto.
+ * math.c (ruby_lgamma_r): define by the configured result.
-Thu Nov 21 18:28:42 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Apr 19 02:32:50 2016 cremno phobia <cremno@mail.ru>
- * lib/tempfile.rb (Tempfile#initialize): use class method to get rid
- of warnings when $VERBOSE.
+ * math.c (ruby_lgamma_r): missing/lgamma_r.c is used on Windows,
+ since msvcrt does not provide it.
-Thu Nov 21 17:43:29 2013 Koichi Sasada <ko1@atdot.net>
+ * missing/lgamma_r.c (lgamma_r): fix lgamma(-0.0).
+ [ruby-core:74823] [Bug #12249]
- * gc.c: rename initial_xxx variables to gc_params.xxx.
- They are not only used initial values.
+Tue Apr 19 02:32:50 2016 NAKAMURA Usaku <usa@ruby-lang.org>
- Chikanaga-san: Congratulations on RubyPrize!
+ * math.c (ruby_lgamma_r): mswin's lgamma_r also seems to be wrong.
+ cf. [Bug #12249]
-Thu Nov 21 17:16:00 2013 Koichi Sasada <ko1@atdot.net>
+Tue Apr 19 02:32:50 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c: enable "RGENGC_ESTIMATE_OLDSPACE" option as default.
- Without this option, some application consumes huge memory.
- (and there are only a few performance down)
+ * math.c (ruby_tgamma): fix tgamma(-0.0) on mingw.
+ [ruby-core:74817] [Bug #12249]
- Introduced new environment variables:
- * RUBY_GC_HEAP_OLDSPACE (default 16MB)
- * RUBY_GC_HEAP_OLDSPACE_MAX (default 128 MB)
- * RUBY_GC_HEAP_OLDSPACE_GROWTH_FACTOR (default 1.2)
+Tue Apr 19 01:53:32 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c (initial_malloc_limit): rename to initial_malloc_limit_min.
+ * defs/keywords (alias, undef): symbol literals are allowed.
-Thu Nov 21 16:51:34 2013 Zachary Scott <e@zzak.io>
+ * parse.y (parse_percent): should parse symbol literals for alias
+ and undef. [ruby-dev:47681] [Bug #8851]
- * ext/digest/bubblebabble/bubblebabble.c: Teach RDoc digest/bubblebabble
+Mon Apr 18 18:05:29 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Nov 21 16:50:16 2013 Zachary Scott <e@zzak.io>
+ * struct.c (struct_make_members_list, rb_struct_s_def): member
+ names should be unique. [ruby-core:74971] [Bug #12291]
- * test/digest/test_digest.rb: Add more tests for digest/bubblebabble
+ * struct.c (struct_make_members_list): extract making member name
+ list from char* va_list, with creating symbols without
+ intermediate IDs.
-Thu Nov 21 16:32:47 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Apr 18 17:54:40 2016 Joe Swatosh <joe.swatosh@gmail.com>
- * lib/delegate.rb (Delegator#method_missing): try private methods defined in
- Kernel after the target. [Fixes GH-449]
+ * ext/win32/lib/win32/registry.rb (DeleteValue, DeleteKey): fix
+ API names. [ruby-core:74863] [Bug #12264]
-Thu Nov 21 16:25:08 2013 Akinori MUSHA <knu@iDaemons.org>
+Mon Apr 18 17:27:30 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/uri/test_generic.rb (URI#test_merge): Test uri + URI(path)
- in addition to uri + path.
+ * compile.c (iseq_peephole_optimize): should not replace the
+ current target INSN, not to follow the replaced dangling link in
+ the caller. [ruby-core:74993] [Bug #11816]
-Thu Nov 21 15:36:08 2013 Zachary Scott <e@zzak.io>
+Mon Apr 18 17:18:25 2016 cremno phobia <cremno@mail.ru>
- * ext/openssl/lib/openssl/buffering.rb: [DOC] Fix HEREDOC comment for
- OpenSSL::Buffering which breaks overview because of RDoc bug
+ * cont.c (fiber_initialize_machine_stack_context): fix wrong
+ _MSC_VER check, should be decimal but not hexadecimal.
+ [ruby-core:74936] [Bug #12279]
-Thu Nov 21 14:46:57 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+Mon Apr 18 17:18:25 2016 cremno phobia <cremno@mail.ru>
- * eval_intern.h (SAVE_ROOT_JMPBUF): workaround for the failure of
- test/ruby/test_exception.rb on Windows.
- wrap by __try and __exception statements on mswin to raise SIGSEGV
- when EXCEPTION_STACK_OVERFLOW is occurred, because MSVCRT doesn't
- handle the exception.
- however, (1) mingw-gcc doesn't support __try and __exception
- statements, and (2) we cannot retry SystemStackError after this
- change yet (maybe crashed) because SEH and longjmp() are too
- uncongenial.
+ * cont.c (fiber_initialize_machine_stack_context): fix wrong
+ _MSC_VER check, should be decimal but not hexadecimal.
+ [ruby-core:74936] [Bug #12279]
- * signal.c (check_stack_overflow, CHECK_STACK_OVERFLOW): now defined on
- Windows, too.
+Mon Apr 18 17:08:10 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * thread_win32.c (ruby_stack_overflowed_p): ditto.
+ * vm_core.h (rb_vm_struct): make at_exit a single linked list but
+ not RArray, not to mark the registered functions by the write
+ barrier. based on the patches by Evan Phoenix.
+ [ruby-core:73908] [Bug #12095]
-Thu Nov 21 14:18:24 2013 Zachary Scott <e@zzak.io>
+Mon Apr 18 16:56:31 2016 Benoit Daloze <eregontp@gmail.com>
- * object.c: [DOC] Clarify Object#dup vs #clone [Bug #9128]
- Moving existing doc for this comparison to separate section of #dup
- Adding examples to document behavior of #dup with Module#extend.
- Based on a patch by stevegoobermanhill
+ * thread.c (update_coverage): Do not track coverage in loaded files
+ after Coverage.result. Avoids out-of-bounds access. [Bug #12237]
-Thu Nov 21 14:06:02 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/coverage/coverage.c (coverage_clear_result_i): document.
- * gc.c (gc_marks_check): do not dump all refs.
+Mon Apr 18 16:33:50 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c (allrefs_dump_i): fix output format.
+ * ext/date/date_core.c (Init_date_core): [DOC] fix misplaced doc
+ of DateTime. [ruby-core:74729] [Bug #12233]
-Thu Nov 21 13:43:07 2013 Koichi Sasada <ko1@atdot.net>
+Mon Apr 18 13:48:05 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c: change RGENGC_CHECK_MODE (>= 2) logic.
- Basically, make an object graph of all of living objects before and
- after marking and check status.
+ * cygwin/GNUmakefile.in (MSYS2_ARG_CONV_EXCL_PARAM):
+ * add missing parentheses and remove double quotes.
+ * rename to get rid of recursive references.
+ * as --excludes-dir option is for a path name, its argument
+ should be converted.
+ [ruby-dev:49526] [Bug #12199]
- [Before marking: check WB sanity]
- If there is a non-old object `obj' pointed from old object
- (`parent') then `parent' or `obj' should be remembered.
+Mon Apr 18 13:48:05 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- [After marking: check marking miss]
- Traversible objects with the object graph should be marked.
- (However, this alert about objects pointed by machine context
- can be false positive. We only display alert.)
+ * common.mk (TEST_EXCLUDES, EXCLUDE_TESTFRAMEWORK): use full spell
+ long option.
- [Implementation memo]
- objspace_allrefs() creates an object graph.
- The object graph is represented by st_table, key is object (VALUE)
- and value is referring objects. Referring objects are stored by
- "struct reflist".
+ * cygwin/GNUmakefile.in (MSYS2_ARG_CONV_EXCL): suppress path name
+ conversions by msys2. [ruby-dev:49525] [Bug #12199]
- * gc.c (init_mark_stack): do not use push_mark_stack_chunk() at init.
- This pre-allocation causes failure on is_mark_stack_empty()
- without any pushing.
+Mon Apr 18 13:48:05 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Nov 21 13:40:20 2013 Zachary Scott <e@zzak.io>
+ * test/lib/test/unit.rb (Options#non_options): make regexp name
+ options prefixed with "!" negative filters.
- * lib/observer.rb: [DOC] Clarify default observer method.
- By @edward [Fixes GH-450] https://github.com/ruby/ruby/pull/450
+ * common.mk (TEST_EXCLUDES): use negative filter to exclude memory
+ leak tests. -x option excludes test files, not test methods.
-Thu Nov 21 13:32:53 2013 Zachary Scott <e@zzak.io>
+Sun Apr 17 04:30:13 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/openssl/ossl_engine.c: [DOC] Documentation for OpenSSL::Engine
- This patch is based off work by @vbatts in GH-436 completing the
- documentation for this class and its methods.
- https://github.com/ruby/ruby/pull/436
+ * parse.y (parse_ident): allow keyword arguments just after a
+ method where the same name local variable is defined.
+ [ruby-core:73816] [Bug#12073]
-Thu Nov 21 10:45:22 2013 Zachary Scott <e@zzak.io>
+Sun Apr 17 04:20:40 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/openssl/lib/openssl/buffering.rb: Remove unused arguments from
- OpenSSL::Buffering.new [Fixes GH-445]
+ * eval.c (setup_exception): set the cause only if it is explicitly
+ given or not set yet. [Bug #12068]
-Thu Nov 21 10:30:47 2013 Zachary Scott <e@zzak.io>
+Sat Apr 16 00:56:45 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/digest/test_digest.rb: Add test for Digest::SHA256.bubblebabble
+ * thread.c (rb_thread_setname): defer setting native thread name
+ set in initialize until the native thread is created.
+ [ruby-core:74963] [Bug #12290]
-Wed Nov 20 20:54:01 2013 Masaya Tarui <tarui@ruby-lang.org>
+Fri Apr 15 21:10:00 2016 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * tool/instruction.rb : fix typo.
+ * lib/irb/ext/save-history.rb: Fix NoMethodError when method is not defined.
-Wed Nov 20 19:45:22 2013 Tanaka Akira <akr@fsij.org>
+Fri Apr 15 14:52:06 2016 Elliot Winkler <elliot.winkler@gmail.com>
- * random.c (rand_init): Make it possible to specify arbitrary array
- for init_genrand().
+ * lib/forwardable.rb (def_instance_delegator) fix delegating to
+ 'args' and 'block', clashing with local variables in generated
+ methods. [ruby-core:72579] [Bug #11916]
-Wed Nov 20 17:34:13 2013 Koichi Sasada <ko1@atdot.net>
+ * lib/forwardable.rb (def_single_delegator): ditto.
- * parse.y (rb_gc_mark_symbols): set global_symbols.minor_marked only
- when full_mark is 0.
- rb_gc_mark_symbols() (with full_mark == 1) can be called by other
- than GC (such as rb_objspace_reachable_objects_from_root()).
+Fri Apr 15 14:27:48 2016 NARUSE, Yui <naruse@ruby-lang.org>
-Wed Nov 20 11:46:38 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * lib/irb/ext/save-history.rb: suppress warning: method redefined;
+ discarding old save_history=.
- * ext/json: merge JSON 1.8.1.
- https://github.com/nurse/json/compare/002ac2771ce32776b32ccd2d06e5604de6c36dcd...e09ffc0d7da25d0393873936c118c188c78dbac3
- * Remove Rubinius exception since transcoding should be working now.
- * Fix https://github.com/flori/json/issues/162 reported by Marc-Andre
- Lafortune <github_rocks@marc-andre.ca>. Thanks!
- * Applied patches by Yui NARUSE <naruse@airemix.jp> to suppress
- warning with -Wchar-subscripts and better validate UTF-8 strings.
- * Applied patch by ginriki@github to remove unnecessary if.
- * Add load/dump interface to JSON::GenericObject to make
- serialize :some_attribute, JSON::GenericObject
- work in Rails active models for convenient
- SomeModel#some_attribute.foo.bar access to serialised JSON data.
+Tue Apr 12 16:15:39 2016 NARUSE, Yui <naruse@ruby-lang.org>
-Wed Nov 20 01:39:02 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * configure.in: improve ICC (Intel C Compiler) support.
- * lib/rdoc/constant.rb (RDoc::Constant#documented?): workaround for
- NoMethodError when the original of alias is not found.
+ * configure.in (CXX): The name of icc's c++ compiler is `icpc`.
-Tue Nov 19 23:38:49 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * configure.in (warnings): Add `-diag-disable=2259` to suppress
+ noisy warnings: "non-pointer conversion from "..." to "..." may
+ lose significant bits".
- * configure.in (--with-os-version-style): option to transform target
- OS version string.
+ * configure.in (optflags): Add `-fp-model precise` like -fno-fast-math.
-Tue Nov 19 21:27:33 2013 Tanaka Akira <akr@fsij.org>
+ * lib/mkmf.rb: icc supports -Werror=division-by-zero
+ and -Werror=deprecated-declarations, but doesn't support
+ -Wdivision-by-zero and -Wdeprecated-declarations.
- * test/net/http/utils.rb (spawn_server): Specify zero for port to
- avoid reusing an allocated port.
+Tue Apr 12 14:29:01 2016 Kazuki Yamaguchi <k@rhe.jp>
- * test/net/http/test_http.rb: Don't specify port here.
+ * ext/openssl/extconf.rb: check SSL_CTX_set_next_proto_select_cb
+ function rather than OPENSSL_NPN_NEGOTIATED macro. it exists
+ even if it is disabled by OpenSSL configuration.
+ [ruby-core:74384] [Bug #12182]
- * test/net/http/test_https.rb: Ditto.
+ * ext/openssl/ossl_ssl.c: update #ifdef(s) as above.
-Tue Nov 19 18:52:10 2013 Koichi Sasada <ko1@atdot.net>
+ * test/openssl/test_ssl.rb: skip NPN tests if NPN is disabled.
- * gc.c (heap_is_swept_object): use heap_page::before_sweep flag.
+Tue Apr 12 14:27:04 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Nov 19 18:49:32 2013 Koichi Sasada <ko1@atdot.net>
+ * lib/uri/http.rb (URI::HTTP#initialize): [DOC] fix example,
+ missing mandatory arguments. [ruby-core:74540] [Bug #12215]
- * gc.c (rb_objspace_reachable_objects_from_root): do major marking.
+Thu Apr 7 01:07:02 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Nov 19 18:45:40 2013 Koichi Sasada <ko1@atdot.net>
+ * sprintf.c (rb_str_format): fix buffer overflow, length must be
+ greater than precision. reported by William Bowling <will AT
+ wbowling.info>.
- * gc.c (rb_gc_resurrect): added.
- rb_fstring() used rb_gc_mark() to avoid freeing used string.
- However, rb_gc_mark() set mark bit *and* pushes mark_stack.
- rb_gc_resurrect() does only set mark bit if it is before sweeping.
+Wed Apr 6 00:33:45 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * string.c (rb_fstring): use rb_gc_resurrect.
+ * lib/rubygems/security.rb (DIGEST_ALGORITHM, KEY_ALGORITHM):
+ should check same name as the used constants.
+ [ruby-core:72674] [Bug #11940]
- * internal.h: add decl.
+Mon Apr 4 00:31:51 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Nov 19 09:47:02 2013 Eric Hodel <drbrain@segment7.net>
+ * compile.c (compile_massign_lhs): when index ends with splat,
+ append rhs value to it like POSTARG, since VM_CALL_ARGS_SPLAT
+ splats the last argument only. [ruby-core:72777] [Bug #11970]
- * lib/rdoc: Update to RDoc master a1195ce. Changes include:
+Sat Apr 2 02:07:29 2016 Seiei Miyagi <hanachin@gmail.com>
- Improved accessibility of the main sidebar navigation.
+ * ext/ripper/lib/ripper/lexer.rb (on_heredoc_dedent): Fix
+ Ripper.lex error in dedenting squiggly heredoc. heredoc tree is
+ also an array of Elem in the outer tree. [Fix GH-1234]
- Fixed handling of regexp options in HTML source highlighting.
+Wed Mar 30 02:28:13 2016 Eric Wong <e@80x24.org>
- * test/rdoc: ditto.
+ * thread_pthread.c (setup_communication_pipe): delay setting owner
+ (rb_thread_create_timer_thread): until thread creation succeeds
+ [ruby-core:72590] [Bug #11922]
-Tue Nov 19 09:33:52 2013 Eric Hodel <drbrain@segment7.net>
+Wed Mar 30 02:20:06 2016 NARUSE, Yui <naruse@ruby-lang.org>
- * lib/rubygems: Update to RubyGems master 6a3d9f9. Changes include:
+ * localeinit.c (rb_locale_charmap_index): fix prototype.
+ patched by Andreas Schwab [Bug #12218]
- Compatibly renamed Gem::DependencyResolver to Gem::Resolver.
+Wed Mar 30 02:20:06 2016 NARUSE, Yui <naruse@ruby-lang.org>
- Added support for git gems in gem.deps.rb and Gemfile.
+ * thread_pthread.c (reserve_stack): fix reserving position where
+ the stack growing bottom to top. [Bug #12118]
- Fixed resolver bugs.
+Wed Mar 30 02:17:33 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/rubygems: ditto.
+ * win32/file.c (rb_readlink): drop garbage after the substitute
+ name, as rb_w32_read_reparse_point returns the expected buffer
+ size but "\??\" prefix is dropped from the result.
- * lib/rubygems/LICENSE.txt: Updated to license from RubyGems trunk.
- [ruby-trunk - Bug #9086]
+ * win32/win32.c (w32_readlink): ditto, including NUL-terminator.
- * lib/rubygems/commands/which_command.rb: RubyGems now indicates
- failure when any file is missing. [ruby-trunk - Bug #9004]
+Wed Mar 30 02:17:33 2016 NAKAMURA Usaku <usa@ruby-lang.org>
- * lib/rubygems/ext/builder: Extensions are now installed into the
- extension install directory and the first directory in the require
- path from the gem. This allows backwards compatibility with msgpack
- and other gems that calculate full require paths.
- [ruby-trunk - Bug #9106]
+ * win32/win32.c (fileattr_to_unixmode, rb_w32_reparse_symlink_p): volume
+ mount point should be treated as directory, not symlink.
+ [ruby-core:72483] [Bug #11874]
+ * win32/win32.c (rb_w32_read_reparse_point): check the reparse point is
+ a volume mount point or not.
-Tue Nov 19 07:21:56 2013 Tanaka Akira <akr@fsij.org>
+ * win32/file.c (rb_readlink): follow above change (but this pass won't
+ be used).
- * configure.in (LOCALTIME_OVERFLOW_PROBLEM): Define it for cross
- compiling.
- [ruby-core:58391] [Bug #9119] Reported by Luis Lavena.
- Analyzed by Heesob Park.
+Wed Mar 30 01:32:14 2016 Rei Odaira <Rei.Odaira@gmail.com>
-Tue Nov 19 05:55:05 2013 Eric Hodel <drbrain@segment7.net>
+ * test/-ext-/time/test_new.rb (test_timespec_new): change a gmtoff
+ test to a better one that does not depend on whether the current
+ time is in summer time or not.
- * lib/rdoc/rubygems_hook.rb: Remove debugging puts committed by
- accident.
+Wed Mar 30 01:32:14 2016 Rei Odaira <Rei.Odaira@gmail.com>
-Mon Nov 18 22:47:54 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/-ext-/time/test_new.rb (test_timespec_new): Time#gmtoff values
+ are the same only when both or neither of the Time objects are in
+ summer time (daylight-saving time).
- * eval_intern.h (TH_PUSH_TAG, TH_EXEC_TAG): refine stack overflow
- detection. chain local tag after setjmp() successed on it, because
- calling setjmp() also can overflow the stack.
- [ruby-dev:47804] [Bug #9109]
+Wed Mar 30 01:30:54 2016 Hiroshi Shirosaki <h.shirosaki@gmail.com>
- * vm_eval.c (rb_catch_obj): now th->tag points previous tag until
- TH_EXEC_TAG().
+ * lib/rubygems/test_case.rb: Fix test on Windows for inconsistent temp path.
+ https://github.com/rubygems/rubygems/pull/1554
+ [Bug #12193][ruby-core:74431]
- * thread_pthread.c (ruby_init_stack): set stack_start properly by
- get_main_stack() if possible.
+Wed Mar 30 01:25:46 2016 NARUSE, Yui <naruse@ruby-lang.org>
-Mon Nov 18 22:45:49 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * string.c (str_new_frozen): if the given string is embeddedable
+ but not embedded, embed a new copied string. [Bug #11946]
- * eval_jump.c (rb_exec_end_proc): unlink and free procs data before
- calling for each procs. [Bug #9110]
+Wed Mar 30 01:23:57 2016 Marcus Stollsteimer <sto.mar@web.de>
-Sun Nov 17 06:33:32 2013 Shota Fukumori <her@sorah.jp>
+ * doc/extension.ja.rdoc: Fix RDoc markup in doc/extension*.rdoc.
+ [ci skip][Bug #12143][ruby-core:74143]
+ * doc/extension.rdoc: ditto.
- * configure.in: Use $LIBS for base of $SOLIBS, also in darwin.
- By this fix, environment that libgmp is located in $LIBS can build
- ruby.
+Wed Mar 30 01:00:30 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun Nov 17 01:56:32 2013 Tanaka Akira <akr@fsij.org>
+ * proc.c (proc_binding): proc from symbol can not make a binding.
+ [ruby-core:74100] [Bug #12137]
- * thread_pthread.c (rb_thread_create_timer_thread): Show error
- message instead of error number.
- (thread_create_core): Ditto.
+Wed Mar 30 00:54:38 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * cont.c (fiber_machine_stack_alloc): Ditto.
+ * include/ruby/win32.h (O_SHARE_DELETE): change to fit Fixnum
+ limit. [ruby-core:74285] [Bug #12171]
-Sat Nov 16 18:28:08 2013 Kouhei Sutou <kou@cozmixng.org>
+Wed Mar 30 00:52:47 2016 Rei Odaira <Rei.Odaira@gmail.com>
- * lib/rexml/parsers/ultralightparser.rb
- (REXML::Parsers::UltraLightParser#parse): Fix wrong :start_doctype
- position.
- [Bug #9061] [ruby-dev:47778]
- Patch by Ippei Obayashi. Thanks!!!
+ * test/net/imap/test_imap.rb (test_idle_timeout): Because of the
+ timeout specified in "imap.idle(0.2)", there is no gurantee that
+ the server thread has done all the work before the client thread
+ performs the assertions. It depends on the thread scheduling.
+ Add checks to avoid false positives (on AIX, particularly).
- * test/rexml/parser/test_ultra_light.rb: Add a test for this case.
+Wed Mar 30 00:41:42 2016 Rei Odaira <Rei.Odaira@gmail.com>
-Sat Nov 16 02:13:56 2013 Masaya Tarui <tarui@ruby-lang.org>
+ * test/socket/test_socket.rb (test_udp_recvmsg_truncation):
+ AIX does not set the MSG_TRUNC flag for a message partially read
+ by recvmsg(2) with the MSG_PEEK flag set.
- * cont.c : Introduce ensure rollback mechanism. Please see below.
+Wed Mar 30 00:00:47 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * internal.h (ruby_register_rollback_func_for_ensure): catch up above change.
- Add rollback mechanism API.
+ * doc/extension.rdoc, doc/extension.ja.rdoc: add editor local
+ variables, with commenting out by :enddoc: directives which are
+ just ignored unless code object mode. [Bug #12111]
- * vm_core.h (typedef struct rb_vm_struct): catch up above change.
- Introduce ensure-rollback relation table.
+Wed Mar 30 00:00:47 2016 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * vm_core.h (typedef struct rb_thread_struct): catch up above change.
- Introduce ensure stack.
+ * doc/extension.ja.rdoc: removed rendering error caused by editor specific
+ configuration on http://docs.ruby-lang.org/en/trunk/extension_rdoc.html .
+ [Bug #12111][ruby-core:73990]
- * eval.c (rb_ensure): catch up above change.
- Introduce ensure stack.
+Tue Mar 29 23:54:31 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * hash.c : New function for rollback ensure, and register it to
- ensure-rollback relation table. [ruby-dev:47803] [Bug #9105]
+ * object.c (rb_mod_const_get): make error message at uninterned
+ string consistent with symbols. [ruby-dev:49498] [Bug #12089]
- Ensure Rollback Mechanism:
- A rollback's function is a function to rollback a state before ensure's
- function execution.
- When the jump of callcc is across the scope of rb_ensure,
- ensure's functions and rollback's functions are executed appropriately
- for keeping consistency.
+Tue Mar 29 23:45:24 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- Current API is unstable, and only internal use.
+ * dir.c (push_pattern, push_glob): deal with read paths as UTF-8
+ to stat later, on Windows as well as OS X.
+ [ruby-core:73868] [Bug #12081]
- ruby_register_rollback_func_for_ensure(ensure_func,rollback_func)
- This API create relation ensure's function to rollback's function.
- By registered rollback's function, it is executed When jumping into
- corresponding rb_ensure scope.
+Tue Mar 29 23:36:49 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Nov 16 00:18:36 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * ext/extmk.rb: add cygwin case, nothing excluded.
+ [ruby-core:73806] [Bug#12071]
- * eval_jump.c (rb_exec_end_proc): fix double free or corruption error
- when reentering by callcc. [ruby-core:58329] [Bug #9110]
+Tue Mar 29 23:10:47 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/ruby/test_beginendblock.rb: test for above.
+ * iseq.c (rb_iseq_mark): mark parent iseq to prevent dynamically
+ generated iseq by eval from GC. [ruby-core:72620] [Bug #11928]
-Fri Nov 15 01:06:04 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Mar 29 22:56:44 2016 Eric Wong <e@80x24.org>
- * ext/objspace/objspace_dump.c (dump_output): allow IO object as
- output, and use Tempfile.create and return open file instead of
- mkstemp() and path name for :file output.
- [ruby-core:58266] [Bug #9102]
+ * lib/resolv.rb (Resolv::IPv6.create): avoid modifying frozen
+ * test/resolv/test_dns.rb (test_ipv6_create): test for above
+ [Bug #11910] [ruby-core:72559]
- * test/objspace/test_objspace.rb (TestObjSpace#dump_my_heap_please):
- remove temporary output file.
+Tue Mar 29 22:31:48 2016 Shugo Maeda <shugo@ruby-lang.org>
-Thu Nov 14 23:39:00 2013 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
+ * range.c (range_eqq): revert r11113 because rb_call_super() is
+ called in range_include() and thus r11113 doesn't work when the
+ receiver Range object consists of non linear objects such as Date
+ objects.
+ [ruby-core:72908] [Bug #12003]
- * ext/bigdecimal/lib/bigdecimal/util.rb: [DOC] remove example of
- Rational#to_d without argument. [Bug #8958]
+Tue Mar 29 22:26:55 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Nov 14 20:24:15 2013 Naohisa Goto <ngotogenome@gmail.com>
+ * vm_eval.c (rb_check_funcall_with_hook): also should call the
+ given hook before returning Qundef when overridden respond_to?
+ method returned false. [ruby-core:73556] [Bug #12030]
- * ruby_atomic.h (ATOMIC_SIZE_CAS): fix compile error on Solaris
- since r43460.
+Tue Mar 29 22:08:36 2016 Kazuki Yamaguchi <k@rhe.jp>
-Thu Nov 14 19:53:00 2013 Tanaka Akira <akr@fsij.org>
+ * compile.c (iseq_peephole_optimize): don't apply tailcall
+ optimization to send/invokesuper instructions with blockiseq.
+ This is a follow-up to the changes in r51903; blockiseq is now
+ the third operand of send/invokesuper instructions.
+ [ruby-core:73413] [Bug #12018]
- * test/openssl/test_cipher.rb (test_aes_gcm_wrong_tag): Don't use
- String#succ because it can make modified (wrong) auth_tag longer
- than 16 bytes. The longer auth_tag makes that
- EVP_CIPHER_CTX_ctrl (and internally aes_gcm_ctrl) fail.
- [ruby-core:55143] [Bug #8439] reported by Vit Ondruch.
+Tue Mar 29 21:22:22 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Nov 14 11:33:47 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * parse.y (xstring): reset heredoc indent after dedenting,
+ so that following string literal would not be dedented.
+ [ruby-core:72857] [Bug #11990]
- * hash.c (foreach_safe_i, hash_foreach_iter): deal with error detected
- by ST_CHECK.
+Tue Mar 29 21:22:22 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * st.c (st_foreach_check): call with non-error argument in normal case.
+ * parse.y (string1): reset heredoc indent fore each string leteral
+ so that concatenated string would not be dedented.
+ [ruby-core:72857] [Bug #11990]
-Thu Nov 14 02:37:14 2013 Zachary Scott <e@zzak.io>
+Tue Mar 29 21:18:09 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/thread/thread.c: [DOC] This patch accomplishes the following:
+ * parse.y (parser_here_document): update indent for each line in
+ indented here document with single-quotes.
+ [ruby-core:72479] [Bug #11871]
- - Teach RDoc about ConditionVariable
- - Teach RDoc about Queue
- - Teach RDoc about SizedQueue
- - Use fully-qualified namespace for Document-method
- This is necessary to separate definitions between classes
- - Fix rdoc bug in call_seq vs. call-seq
- - Correct doc for SizedQueue#pop patch by @jackdanger [Bug #8988]
+Tue Mar 29 21:03:40 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Nov 14 01:11:54 2013 Zachary Scott <e@zzak.io>
+ * symbol.h (is_attrset_id): ASET is an attrset ID. fix
+ unexpected safe call instead of an ordinary ASET.
- * ext/bigdecimal/lib/bigdecimal/util.rb: [DOC] +precision+ is required
+Tue Mar 29 21:01:07 2016 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Wed Nov 13 19:21:36 2013 Zachary Scott <e@zzak.io>
+ * doc/syntax/calling_methods.rdoc: fix old operator for safe navigation
+ operator. [ci skip][fix GH-1182] Patch by @dougo
- * ext/bigdecimal/lib/bigdecimal/util.rb: [DOC] Document the required
- +precision+ argument for Rational#to_d [Bug #8958]
+Tue Mar 29 18:49:54 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Nov 13 19:02:05 2013 Zachary Scott <e@zzak.io>
+ * lib/ostruct.rb (freeze): define deferred accessors before
+ freezing to get rid of an error when just reading frozen
+ OpenStruct.
- * ext/digest/*: [DOC] Fix several typos and broken http links.
- Improved examples for Digest overview and fixed a broken example in
- Digest::HMAC overview. This patch also adds a description of
- Digest::SHA256.bubblebabble to the Digest overview.
+Tue Mar 29 18:49:54 2016 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
- Patched by @stomar [Bug #9027]
+ * lib/ostruct.rb: Fix new_ostruct_member to correctly avoid
+ redefinition [#11901]
-Wed Nov 13 18:32:12 2013 Zachary Scott <e@zzak.io>
+Tue Mar 29 17:54:17 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/openssl/ossl_config.c: [DOC] Document the following:
+ * lib/ostruct.rb (OpenStruct): make respond_to? working on
+ just-allocated objects for workaround of Psych.
+ [ruby-core:72501] [Bug #11884]
- - OpenSSL::ConfigError
- - OpenSSL::Config::DEFAULT_CONFIG_FILE
+Tue Mar 29 17:04:35 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- Patched by @vbatts via GH-436
- https://github.com/ruby/ruby/pull/436
+ * vm_eval.c (rb_f_catch): [DOC] fix malformed RDoc syntax, "+...+"
+ cannot enclose non-identifier characters.
+ a patch by Sebastian S in [ruby-core:74278]. [Bug#12170]
-Wed Nov 13 18:03:00 2013 Zachary Scott <e@zzak.io>
+Tue Mar 29 17:03:28 2016 Rei Odaira <Rei.Odaira@gmail.com>
- * ext/openssl/ossl_asn1.c: [DOC] Document parts of
- OpenSSL::ASN1::ObjectId included a fix for the class overview, which
- previously showed the documentation for Constructive due to missing
- ObjectId overview. This patch also includes a note for Primitive.
+ * test/-ext-/float/test_nextafter.rb: In AIX,
+ nextafter(+0.0,-0.0)=+0.0, and nextafter(-0.0,+0.0)=-0.0,
+ but they should return -0.0 and +0.0, respectively. This is
+ a known bug in nextafter(3) on AIX, so skip related tests.
- Based on a patch by @vbatts via GH-436
- https://github.com/ruby/ruby/pull/436
+Tue Mar 29 16:54:14 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Nov 13 17:19:36 2013 Zachary Scott <e@zzak.io>
+ * string.c (enc_succ_alnum_char): try to skip an invalid character
+ gap between GREEK CAPITAL RHO and SIGMA.
+ [ruby-core:74478] [Bug #12204]
- * ext/openssl/lib/openssl/config.rb: In #parse use +string+ for +str+
+Tue Mar 29 16:45:58 2016 Victor Nawothnig <Victor.Nawothnig@gmail.com>
-Wed Nov 13 17:09:45 2013 Zachary Scott <e@zzak.io>
+ * parse.y (parse_numvar): NTH_REF must be less than a half of
+ INT_MAX, as it is left-shifted to be ORed with back-ref flag.
+ [ruby-core:74444] [Bug#12192] [Fix GH-1296]
- * ext/openssl/lib/openssl/*.rb: [DOC] Document the following:
+Tue Mar 29 16:44:54 2016 NARUSE, Yui <naruse@ruby-lang.org>
- - Integer#to_bn
- - OpenSSL::Buffering module
- - Deprecated OpenSSL::Digest::Digest compatibility class
- - OpenSSL::Config
+ * enc/trans/JIS: update Unicode's notice. [Bug #11844]
- These changes were based on a patch by @vbatts via GH-436
- https://github.com/ruby/ruby/pull/436
+Tue Mar 29 16:41:27 2016 Eric Hodel <drbrain@segment7.net>
-Wed Nov 13 10:55:43 2013 Zachary Scott <e@zzak.io>
+ * marshal.c (r_object0): raise ArgumentError when linking to undefined
+ object.
- * doc/regexp.rdoc: [DOC] Fix typo in Special global variables section.
- Reported by Alex Johnson on ruby-doc.org
+Tue Mar 29 16:41:27 2016 Eric Hodel <drbrain@segment7.net>
-Wed Nov 13 10:43:19 2013 Zachary Scott <e@zzak.io>
+ * marshal.c (r_object0): Fix Marshal crash for corrupt extended object.
- * hash.c: [DOC] Adds an example for Hash#store
+Tue Mar 29 16:40:48 2016 Eric Wong <e@80x24.org>
-Wed Nov 13 09:03:40 2013 Zachary Scott <e@zzak.io>
+ * ext/openssl/ossl_ssl.c (ossl_sslctx_setup): document as MT-unsafe
+ [ruby-core:73803] [Bug #12069]
- * doc/regexp.rdoc: [DOC] add note about Bug #4044 as suggested by
- duerst-san in [ruby-core:43612] [Fixes GH-443] Patched by @rosenfeld
- https://github.com/ruby/ruby/pull/443
+Tue Mar 29 16:29:44 2016 NARUSE, Yui <naruse@ruby-lang.org>
-Tue Nov 12 10:15:14 2013 Eric Hodel <drbrain@segment7.net>
+ * insns.def (opt_mod): show its method name on ZeroDivisionError.
+ [Bug #12158]
- * test/rubygems/insure_session.rb: Remove unused test file.
+Tue Mar 29 16:25:27 2016 Anthony Dmitriyev <antstorm@gmail.com>
-Tue Nov 12 09:16:24 2013 Eric Hodel <drbrain@segment7.net>
+ * net/ftp.rb: add NullSocket#closed? to fix closing not opened
+ connection. [Fix GH-1232]
- * lib/rubygems: Update to RubyGems master b9213d7. Changes include:
+Tue Mar 29 16:12:08 2016 Koichi ITO <koic.ito@gmail.com>
- Fixed tests on Windows (I hope) by forcing platform for
- platform-dependent tests.
+ * variable.c: Added documentation about order of `Module#constants`
+ [ci skip][Bug #12121][ruby-dev:49505][fix GH-1301]
- Fixed File.exists? warnings.
+Tue Mar 29 16:02:26 2016 Rei Odaira <Rei.Odaira@gmail.com>
- Improved testing infrastructure.
+ * test/ruby/test_process.rb (test_execopts_gid): Skip a test
+ that is known to fail on AIX. AIX allows setgid to
+ a supplementary group, but Ruby does not allow the "-e"
+ option when setgid'ed, so the test does not work as intended.
- * test/rubygems: ditto.
+Tue Mar 29 15:58:18 2016 Rei Odaira <Rei.Odaira@gmail.com>
- * test/rdoc/test_rdoc_rubygems_hook.rb: Switch to util_spec like
- RubyGems.
+ * test/socket/test_addrinfo.rb (test_ipv6_address_predicates):
+ IN6_IS_ADDR_V4COMPAT and IN6_IS_ADDR_V4MAPPED are broken
+ on AIX, so skip related tests.
-Mon Nov 11 18:31:12 2013 Aman Gupta <ruby@tmm1.net>
+Tue Mar 29 15:31:06 2016 Rei Odaira <Rei.Odaira@gmail.com>
- * internal.h: move common string/hash flags to include file.
- * ext/objspace/objspace_dump.c: remove flags shared above.
- * hash.c: ditto.
- * string.c: ditto.
+ * test/rinda/test_rinda.rb (test_make_socket_ipv4_multicast):
+ The fifth argument to getsockopt(2) should be modified to
+ indicate the actual size of the value on return,
+ but not in AIX. This is a know bug. Skip related tests.
+ * test/rinda/test_rinda.rb (test_ring_server_ipv4_multicast):
+ ditto.
+ * test/rinda/test_rinda.rb (test_make_socket_unicast): ditto.
+ * test/socket/test_basicsocket.rb (test_getsockopt): ditto.
+ * test/socket/test_sockopt.rb (test_bool): ditto.
-Mon Nov 11 04:36:14 2013 Eric Hodel <drbrain@segment7.net>
+Tue Mar 29 15:27:14 2016 Rei Odaira <Rei.Odaira@gmail.com>
- * lib/rubygems/specification.rb: Include 2.2.0.preview.2 when checking
- if extensions should be built. Fixes a ruby-ci failure.
- * test/rubygems/test_gem_specification.rb: Test for the above.
+ * test/zlib/test_zlib.rb (test_adler32_combine, test_crc32_combine):
+ Skip two tests on AIX because zconf.h in zlib does not correctly
+ recognize _LARGE_FILES in AIX. The problem was already reported
+ to zlib, and skip these tests until it is fixed.
-Mon Nov 11 03:15:56 2013 Koichi Sasada <ko1@atdot.net>
+Tue Mar 29 15:10:31 2016 Rei Odaira <Rei.Odaira@gmail.com>
- * vm_trace.c (symbol2event_flag): add secret feature.
- add a_call/a_return events.
- a_call is call | b_call | c_call, and same as a_return.
+ * thread_pthread.c (getstack): __pi_stacksize returned by
+ pthread_getthrds_np() is wrong on AIX. Use
+ __pi_stackend - __pi_stackaddr instead.
-Mon Nov 11 02:51:17 2013 Eric Hodel <drbrain@segment7.net>
+Tue Mar 29 15:10:05 2016 Alex Boyd <alex@opengroove.org>
- * lib/rubygems: Update to RubyGems master 4bdc4f2. Important changes
- in this commit:
+ * lib/irb.rb: avoid to needless truncation when using back_trace_limit option.
+ [fix GH-1205][ruby-core:72773][Bug #11969]
- RubyGems now chooses the test server port reliably. Patch by akr.
+Tue Mar 29 15:05:16 2016 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
- Partial implementation of bundler's Gemfile format.
+ * ext/tk/lib/tkextlib/tcllib/tablelist_tile.rb: fix method name typo.
+ [ruby-core:72513] [Bug #11893] The patch provided by Akira Matsuda.
- Refactorings to improve the new resolver.
- Fixes bugs in the resolver.
+Tue Mar 29 15:05:02 2016 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
- * test/rubygems: Tests for the above.
+ * ext/tk/lib/tkextlib/tcllib/toolbar.rb: fix method name typo.
+ [ruby-core:72511] [Bug #11891] The patch provided by Akira Matsuda.
-Mon Nov 11 01:02:06 2013 Zachary Scott <e@zzak.io>
- * lib/timeout.rb: [DOC] Add note about change from #8730 [Fixes GH-440]
- * NEWS: [DOC] Improve grammar on change to Timeout
- Patched by @srawlins in https://github.com/ruby/ruby/pull/440
+Tue Mar 29 15:04:42 2016 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
-Sun Nov 10 23:47:05 2013 Kazuki Tsujimoto <kazuki@callcc.net>
+ * ext/tk/lib/tkextlib/blt/tree.rb: fix method name typo.
+ [ruby-core:72510] [Bug #11890] The patch provided by Akira Matsuda.
- * gc.c (rb_gcdebug_print_obj_condition): catch up recent changes
- to compile on GC_DEBUG.
-Sun Nov 10 22:16:19 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Mar 29 15:04:19 2016 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
- * error.c (exc_cause): captured previous exception.
+ * ext/tk/lib/tk/menubar.rb: fix a typo in font name. [ruby-core:72505]
+ [Bug #11886] The patch provided by Akira Matsuda.
- * eval.c (make_exception): capture previous exception automagically.
- [Feature #8257]
+ * ext/tk/sample/*.rb: ditto.
-Sun Nov 10 08:37:20 2013 Zachary Scott <e@zzak.io>
+Tue Mar 29 15:03:03 2016 Kenta Murata <mrkn@mrkn.jp>
- * thread.c: [DOC] Remove duplicate reference
+ * ruby.h: undef HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P
+ and HAVE_BUILTIN___BUILTIN_TYPES_COMPATIBLE_P on C++.
+ [ruby-core:72736] [Bug #11962]
-Sun Nov 10 08:09:29 2013 Zachary Scott <e@zzak.io>
+Tue Mar 29 14:58:56 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/drb/drb.rb: [DOC] promote better windows-safe filename regular
- expression in DRb Logger example. Reported by Chris Pheonix
- [Bug #9074]
+ * ext/socket/option.c (inspect_tcpi_msec): more accurate condition
+ for TCPI msec member inspection function.
+ [ruby-core:74388] [Bug #12185]
-Sun Nov 10 08:03:05 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Mar 29 14:53:58 2016 Naotoshi Seo <sonots@gmail.com>
- * gc.c (rb_define_finalizer, rb_undefine_finalizer): rename and export
- finalizer functions.
+ * lib/logger.rb: Remove block from Logger.add as it's not needed
+ patch provided by Daniel Lobato Garcia [fix GH-1240] [Bug #12054]
-Sun Nov 10 07:41:22 2013 Zachary Scott <e@zzak.io>
+Tue Mar 29 14:52:20 2016 Zachary Scott <zzak@ruby-lang.org>
- * lib/weakref.rb: [DOC] fix typos by @xaviershay [Fixes GH-439]
- https://github.com/ruby/ruby/pull/439
+ * re.c: Remove deprecated kcode argument from Regexp.new and compile
+ patch provided by Dylan Pulliam [Bug #11495]
-Sun Nov 10 06:14:39 2013 Charlie Somerville <charliesome@ruby-lang.org>
+Tue Mar 29 14:44:02 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * compile.c (iseq_compile_each): emit opt_str_freeze if the #freeze
- method is called on a static string literal with no arguments.
+ * ext/socket/socket.c (sock_gethostname): support unlimited size
+ hostname.
- * defs/id.def (firstline): add freeze so idFreeze is available
+Tue Mar 29 14:35:06 2016 Kouhei Sutou <kou@cozmixng.org>
- * insns.def (opt_str_freeze): add opt_str_freeze instruction which
- pushes a frozen string literal without allocating a new object if
- String#freeze is not overridden
+ * lib/xmlrpc/client.rb: Support SSL options in async methods of
+ XMLRPC::Client.
+ [Bug #11489]
+ Reported by Aleksandar Kostadinov. Thanks!!!
- * string.c (Init_String): define String#freeze
+Tue Mar 29 14:22:57 2016 NARUSE, Yui <naruse@ruby-lang.org>
- * vm.c (vm_init_redefined_flag): define BOP_FREEZE on String class as
- a basic operation
+ * marshal.c (r_object0): honor Marshal.load post proc
+ value for TYPE_LINK. by Hiroshi Nakamura <nahi@ruby-lang.org>
+ https://github.com/ruby/ruby/pull/1204 fix GH-1204
- * vm_insnhelper.h: ditto
+Tue Mar 29 14:18:26 2016 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- [Feature #8992] [ruby-core:57705]
+ * .travis.yml: removed commented-out code.
-Sun Nov 10 01:34:14 2013 Koichi Sasada <ko1@atdot.net>
+Tue Mar 29 14:18:26 2016 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * gc.c (vm_malloc_increase): sweep immediately on GC due to malloc().
- To reduce memory usage, sweep as soon as possible.
- This behavior is same as Ruby 2.0.0 and before.
+ * .travis.yml: removed osx code. follow up with r53517
-Sun Nov 10 00:39:26 2013 Koichi Sasada <ko1@atdot.net>
+Tue Mar 29 14:12:22 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * benchmark/gc/gcbench.rb: output version description and GC::OPTS.
+ * ext/socket/option.c (sockopt_bool): relax boolean size to be one
+ too not only sizeof(int). Winsock getsockopt() returns a single
+ byte as a boolean socket option. [ruby-core:72730] [Bug #11958]
-Sun Nov 10 00:36:42 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Mar 29 14:12:22 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c (should_be_callable): allow private call since rb_eval_cmd
- calls even private methods.
+ * ext/socket/option.c (check_size): extract a macro to check
+ binary data size, with a consistent message.
-Sun Nov 10 00:33:17 2013 Zachary Scott <e@zzak.io>
+ * ext/socket/option.c (sockopt_byte): fix error message,
+ sizeof(int) differs from sizeof(unsigned char) in general.
- * lib/racc/rdoc/grammar.en.rdoc: [DOC] fix typo by Tsuyoshi Sawada
- [Bug #9077]
+Tue Mar 29 14:01:14 2016 NAKAMURA Usaku <usa@ruby-lang.org>
-Sat Nov 9 22:35:35 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * process.c (rb_execarg_parent_start1): need to convert the encoding to
+ ospath's one.
- * tool/rbinstall.rb (Gem::Specification.load): obtain spec date from
- VCS for the case using git, RUBY_RELEASE_DATE is the last resort.
- probably fixes [Bug #9085].
+Tue Mar 29 14:01:14 2016 NAKAMURA Usaku <usa@ruby-lang.org>
-Sat Nov 9 20:56:12 2013 Narihiro Nakamura <authornari@gmail.com>
+ * process.c: use rb_w32_uchdir() instead of plain chdir() on Windows.
+ reported by naruse via twitter.
- * ext/objspace/object_tracing.c: use declarations in internal.h.
+ * process.c (rb_execarg_addopt): need to convert the encoding to
+ ospath's one.
- * ext/objspace/objspace.c: ditto
+Tue Mar 29 13:56:36 2016 Eric Wong <e@80x24.org>
-Sat Nov 9 20:32:59 2013 Tanaka Akira <akr@fsij.org>
+ * ext/stringio/stringio.c (strio_binmode): implement to set encoding
+ * test/stringio/test_stringio.rb (test_binmode): new test
+ [ruby-core:72699] [Bug #11945]
- * test/objspace/test_objspace.rb (test_dump_all): Make the test string
- shorter to be an embedded string on 32bit environment as well as
- 64bit environment.
+Tue Mar 29 13:50:30 2016 Eric Wong <e@80x24.org>
-Sat Nov 9 15:00:16 2013 Zachary Scott <e@zzak.io>
+ * io.c (io_getpartial): remove unused kwarg from template
+ * test/ruby/test_io.rb (test_readpartial_bad_args): new
+ [Bug #11885]
- * io.c: [DOC] ARGF.gets may return nil [Bug #9029] patch by znz
+Tue Mar 29 13:41:03 2016 Tadashi Saito <tad.a.digger@gmail.com>
-Sat Nov 9 14:54:52 2013 Zachary Scott <e@zzak.io>
+ * compile.c, cont.c, doc, man: fix common misspelling.
+ [ruby-core:72466] [Bug #11870]
- * lib/rss/*: [DOC] document various constants @steveklabnik [Bug #8812]
+Tue Mar 29 13:31:34 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Nov 9 14:50:09 2013 Zachary Scott <e@zzak.io>
+ * parse.y (regexp): set_yylval_num sets u1, should use nd_tag
+ instead of nd_state. [ruby-core:72638] [Bug #11932]
- * lib/rss/rss.rb: [DOC] document Time#w3cdtf by @steveklabnik
- [Bug #8821]
+Tue Mar 29 13:31:34 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Nov 9 14:29:04 2013 Zachary Scott <e@zzak.io>
+ * parse.y (set_yylval_num): should be used as nd_state, set to u3.
+ [ruby-core:72638] [Bug #11932]
- * ext/dl/cfunc.c: [DOC] fix typo in example [Bug #8944]
- Patched by Heesob Park
+Tue Mar 29 13:26:15 2016 Joseph Tibbertsma <josephtibbertsma@gmail.com>
-Sat Nov 9 13:59:58 2013 Zachary Scott <e@zzak.io>
+ * gc.c (RVALUE_PAGE_WB_UNPROTECTED): fix a typo of argument name.
+ [Fix GH-1221]
- * lib/test/unit/assertions.rb: [DOC] better example for assert_send()
- Patch by Andrew Grimm [Bug #8975]
+Thu Jan 21 16:39:55 2016 NARUSE, Yui <naruse@ruby-lang.org>
-Sat Nov 9 12:45:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ * Makefile.in (update-rubyspec): fix r53208 like r53451.
- * insns.def: unify ic_constant_serial and ic_class_serial into one field
- ic_serial. This is possible because these fields are only ever used
- exclusively with each other.
+Fri Jan 15 00:05:57 2016 NARUSE, Yui <naruse@ruby-lang.org>
- * insns.def: ditto
- * vm_core.h: ditto
- * vm_insnhelper.c: ditto
+ * lib/uri/generic.rb (URI::Generic#to_s): change encoding to
+ UTF-8 as Ruby 2.2/ by Koichi ITO <koic.ito@gmail.com>
+ https://github.com/ruby/ruby/pull/1188 fix GH-1188
-Sat Nov 9 12:31:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+Tue Jan 12 17:23:39 2016 NAKAMURA Usaku <usa@ruby-lang.org>
- * class.c: unify names of vm state version counters to 'serial'.
- This includes renaming 'vm_state_version_t' to 'rb_serial_t',
- 'method_state' to 'method_serial', 'seq' to 'class_serial',
- 'vmstat' to 'constant_serial', etc.
+ * process.c (rb_execarg_parent_start1): need to convert the encoding to
+ ospath's one.
- * insns.def: ditto
- * internal.h: ditto
- * vm.c: ditto
- * vm_core.h: ditto
- * vm_insnhelper.c: ditto
- * vm_insnhelper.h: ditto
- * vm_method.c: ditto
+Tue Jan 12 17:23:39 2016 NAKAMURA Usaku <usa@ruby-lang.org>
-Sat Nov 9 09:22:29 2013 Masaya Tarui <tarui@ruby-lang.org>
+ * process.c: use rb_w32_uchdir() instead of plain chdir() on Windows.
+ reported by naruse via twitter.
- * gc.c (gc_page_sweep, rgengc_rememberset_mark): Refactoring.
- Get bitmaps directly.
+ * process.c (rb_execarg_addopt): need to convert the encoding to
+ ospath's one.
-Sat Nov 9 09:16:36 2013 Masaya Tarui <tarui@ruby-lang.org>
+Tue Jan 12 15:21:00 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c (RVALUE_PROMOTE_INFANT): Refactoring. Remove duplicated nonsense
- code.
-
-Sat Nov 9 09:04:48 2013 Masaya Tarui <tarui@ruby-lang.org>
+ * include/ruby/missing.h (explicit_bzero_by_memset_s): remove
+ inline implementation by memset_s, which needs a macro before
+ including headers and can cause problems in extension libraries
+ by the order of the macro and headers.
- * gc.c (gc_marks_test): Bugfix. Fix a struct member name for build
- with RGENGC_CHECK_MODE.
+Thu Dec 24 23:01:57 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Sat Nov 9 08:58:23 2013 Masaya Tarui <tarui@ruby-lang.org>
+ * NEWS: added entry for CGI.escapeHTML optimization.
- * gc.c : Add GC_PROFILE_DETAIL_MEMORY option.
- If GC_PROFILE_MORE_DETAIL && GC_PROFILE_DETAIL_MEMORY,
- maxrss, minflt and majflt are added to each profile record.
+Thu Dec 24 18:43:19 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Nov 9 07:41:41 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * error.c (rb_compile_error_with_enc, rb_compile_error),
+ (rb_compile_bug): deprecate internal functions.
- * internal.h (rb_vm_backtrace_object, rb_gc_count): make prototype
- declarations, not old-K&R style.
+ * parse.y (parser_yyerror): construct exception message with
+ source code and caret.
-Sat Nov 9 06:11:14 2013 vo.x (Vit Ondruch) <vondruch@redhat.com>
+Thu Dec 24 17:25:42 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * tool/rbinstall.rb (Gem::Specification#collect): make stable
- Gem::Specification.files in default .gemspecs the different order of
- "files" in .gemspec files makes them different therefore possibly
- conflicting in multilib scenario. patch by vo.x (Vit Ondruch) at
- [ruby-core:57544] [Bug #8623].
+ * compile.c (append_compile_error), parse.y (compile_error):
+ preserve encoding of source file name in exceptions.
-Sat Nov 9 01:59:18 2013 Aman Gupta <ruby@tmm1.net>
+ * error.c (rb_compile_error_str, rb_compile_bug_str): add.
- * ext/objspace/objspace_dump.c: Add experimental methods to
- dump objectspace as json: ObjectSpace.dump_all and
- ObjectSpace.dump(obj). These methods are useful for debugging
- reference leaks and memory growth in large ruby applications.
- [Bug #9026] [ruby-core:57893] [Fixes GH-423]
- * test/objspace/test_objspace.rb: tests for above.
+Thu Dec 24 16:17:47 2015 NARUSE, Yui <naruse@ruby-lang.org>
-Sat Nov 9 00:26:50 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * common.mk (fake.rb): $(arch)-fake.rb must depend on miniruby because
+ it may depend on miniruby.
- * file.c (GetLastError): already defined in windows.h on nowadays
- cygwin, and caused the confliction with the system provided
- definition on cygwin64. by @kou1okada [Fixes GH-433].
+Thu Dec 24 16:13:05 2015 NARUSE, Yui <naruse@ruby-lang.org>
-Fri Nov 8 18:35:31 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * common.mk (ripper.c): r50045 wrongly replace $(PWD) with ../..
+ It is the top of build directory, not topsrcdir.
- * lib/open3.rb: receive arguments as keyword arguments.
+Thu Dec 24 15:02:42 2015 sorah (Shota Fukumori) <her@sorah.jp>
-Fri Nov 8 13:19:26 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * tool/vcs.rb (IO.popen): Refactor. Avoid assigning in condition.
- * io.c (rb_io_open_with_args): use RARRAY_CONST_PTR().
+Thu Dec 24 15:01:38 2015 sorah (Shota Fukumori) <her@sorah.jp>
- * io.c (rb_scan_open_args): use const qualifier for above.
+ * tool/file2lastrev.rb: Fix ArgumentError to work on Ruby 1.8.7.
- * io.c (rb_open_file): ditto.
+Thu Dec 24 14:44:08 2015 sorah (Shota Fukumori) <her@sorah.jp>
- * io.c (rb_io_open_with_args): ditto.
+ * tool/vcs.rb (IO.popen): Enable on Ruby 1.9 where chdir option is not
+ supported on IO.popen
-Fri Nov 8 11:35:06 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * tool/vcs.rb (IO.popen): Fix NoMethodError. I guess r49705 was not
+ tested... :/
- * dir.c, pack.c, ruby.c, struct.c, vm_eval.c: use RARRAY_CONST_PTR().
+Thu Dec 24 14:57:03 2015 Koichi Sasada <ko1@atdot.net>
-Fri Nov 8 10:58:02 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * NEWS: rename
+ "Implementation changes" section to
+ "Supported platform changes" section.
- * compile.c (iseq_build_from_ary_exception): use RARRAY_CONST_PTR().
+ * NEWS: add "Implementation improvements" and add several entries.
- * compile.c (iseq_build_from_ary_body): ditto.
+ * NEWS: add NEWS entries by Eric Wong. [ruby-core:72450]
-Fri Nov 8 10:49:34 2013 Masaki Matsushita <glass.saga@gmail.com>
+Thu Dec 24 00:26:05 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * enumerator.c (append_method): use RARRAY_CONST_PTR().
+ * ext/io/console/extconf.rb: fix gem build failure on Windows.
+ only win32_vk.inc is included in the gem and no dependencies for
+ the header, so that gperf will not be mandatory.
+ [ruby-core:72453] [Bug #11866]
- * enumerator.c (lazy_init_iterator): ditto.
+ * ext/io/console/io-console.gemspec: include depend file and
+ win32_vk header.
-Fri Nov 8 02:44:29 2013 Koichi Sasada <ko1@atdot.net>
+Wed Dec 23 23:58:44 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c (vm_malloc_increase): check GVL before gc_rest_sweep().
- vm_malloc_increase() can be called without GVL.
- However, gc_rest_sweep() assumes acquiring GVL.
- To avoid this problem, check GVL before gc_rest_sweep().
- [Bug #9090]
+ * io.c (rb_readwrite_syserr_fail): works with the given errno than
+ thread local errno.
- This workaround introduces possibility to set malloc_limit as
- wrong value (*1). However, this may be rare case. So I commit it.
+Wed Dec 23 17:57:45 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- *1: Without rest_sweep() here, gc_rest_sweep() can decrease
- malloc_increase due to ruby_sized_xfree().
+ * file.c, io.c, util.c: prefer rb_syserr_fail with saved errno
+ over setting errno then call rb_sys_fail, not to be clobbered
+ potentially and to reduce thread local errno accesses.
-Fri Nov 8 02:50:25 2013 Zachary Scott <e@zzak.io>
+Wed Dec 23 11:58:52 2015 Yuichiro Kaneko <yui-knk@ruby-lang.org>
- * lib/securerandom.rb: [DOC] specify arguments passed to ::random_bytes
- By @chastell [Fixes GH-412] https://github.com/ruby/ruby/pull/412
+ * string.c: Fix document. Default value of the first
+ argument of `String#split` is not `$;` but `nil`.
+ When `nil` is passed as first argument, `$;` is used.
+ [ci skip] [Bug #11729] [ruby-dev:49378]
-Fri Nov 8 02:43:01 2013 Zachary Scott <e@zzak.io>
+Wed Dec 23 07:15:17 2015 Eric Wong <e@80x24.org>
- * ext/objspace/object_tracing.c: [DOC] trace_object_allocations_stop
- By @srawlins [Fixes GH-421] https://github.com/ruby/ruby/pull/421
+ * ext/socket/init.c (rsock_init_sock): reject reserved FDs
+ [ruby-core:72445] [Bug #11862]
-Fri Nov 8 02:34:20 2013 Zachary Scott <e@zzak.io>
+Wed Dec 23 02:59:26 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/net/ftp.rb: [DOC] Document Net::FTP.mdtm and .set_socket and fix
- spelling typo, based on patch by @artfuldodger [Fixes GH-426]
- https://github.com/ruby/ruby/pull/426
+ * configure.in (__STDC_WANT_LIB_EXT1__): necessary to use memset_s
+ in strict C99 mode.
-Fri Nov 8 02:14:37 2013 Zachary Scott <e@zzak.io>
+Wed Dec 23 02:34:36 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * array.c: [DOC] Add note about negative indices in Array overview
- By @ckaenzig [Fixes GH-427] https://github.com/ruby/ruby/pull/427
+ * regexec.c (match_at): move direct threaded VM code to get rid of
+ mixed declarations and code, and enable it only for gcc since it
+ depends on a gcc extension.
-Fri Nov 8 02:09:12 2013 Zachary Scott <e@zzak.io>
+Wed Dec 23 02:23:19 2015 Yuki Nishijima <mail@yukinishijima.net>
- * lib/csv.rb: [DOC] Fix typo in CSV.parse_line by @funky-bibimbap
- [Fixes GH-430] https://github.com/ruby/ruby/pull/430
+ * gems/bundled_gems: Upgrade the did_you_mean gem to 1.0.0
-Fri Nov 8 01:01:54 2013 Zachary Scott <e@zzak.io>
+ * NEWS: Add news about the did_you_mean gem
- * golf_prelude.rb: syntax formatting for whitespace [Fixes GH-425]
- Patch by @edward https://github.com/ruby/ruby/pull/425
+Wed Dec 23 02:18:57 2015 Jake Worth <jakeworth82@gmail.com>
-Thu Nov 7 19:36:09 2013 Koichi Sasada <ko1@atdot.net>
+ * doc/contributing.rdoc: [DOC] remove an extra word "here".
+ [Fix GH-1169]
- * gc.c: modify malloc_limit strategy.
+Wed Dec 23 01:58:20 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * fix default values:
- GC_MALLOC_LIMIT_GROWTH_FACTOR
- GC_MALLOC_LIMIT: 8MB -> 16MB
- GC_MALLOC_LIMIT_MAX: 384MB -> 32MB
+ * regexec.c (USE_DIRECT_THREADED_VM): enable direct threaded VM by
+ the default.
- * algorithm of malloc_limit increment.
- if (malloc_increase < malloc_limit) {
- next_malloc_limit = malloc_limit * factor
- if (malloc_limit > malloc_limit_max) {
- malloc_limit = malloc_increase
- }
- }
- This algorithm change malloc_limit from
- 16MB -> 32MB slowly.
- If malloc_limit exceeds malloc_limit_max, then
- increase with malloc_increase.
+Tue Dec 22 22:15:53 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Nov 7 11:06:05 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * gc.c (internal_object_p): should not expose singleton classes
+ without a metaclass. based on patches by ko1 and shugo.
+ [Bug #11740]
- * array.c (rb_ary_shuffle_bang): use RARRAY_PTR_USE() without WB
- because there are not new relations.
+ * class.c (rb_singleton_class_object_p): added.
-Thu Nov 7 10:34:12 2013 Masaki Matsushita <glass.saga@gmail.com>
+Tue Dec 22 22:15:08 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * array.c (rb_ary_sample): use rb_ary_dup().
+ * ext/io/console/io-console.gemspec: bump up to 0.4.4.
-Thu Nov 7 09:39:41 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Dec 22 22:11:06 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * vm_trace.c (rb_threadptr_exec_event_hooks_orig): errinfo should not
- be propagated to trace blocks so that no argument raise does not
- throw internal objects. [ruby-dev:47793] [Bug #9088]
+ * NEWS: Added news entry of Psych 2.0.17
-Wed Nov 6 21:30:55 2013 Masaya Tarui <tarui@ruby-lang.org>
+Tue Dec 22 22:09:01 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * gc.c (gc_before_sweep): Change algorithm of malloc_limit to
- conservative for closing to memory consumption of ruby 2.0.
+ * NEWS: Added news entry of RDoc 4.2.1
- * gc.c (GC_MALLOC_LIMIT, GC_MALLOC_LIMIT_GROWTH_FACTOR):
- Adjust parameters for new algorithm.
+Tue Dec 22 21:20:00 2015 Kenta Murata <mrkn@mrkn.jp>
-Wed Nov 6 21:16:51 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * ext/bigdecimal/bigdecimal.gemspec: bump version to 1.2.8.
- * array.c (rb_ary_shift_m): use RARRAY_PTR_USE() without WB because
- there are not new relations.
+Tue Dec 22 21:08:05 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Wed Nov 6 21:05:20 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * lib/rdoc.rb: bump version to 4.2.1. It contains following fixes.
+ https://github.com/rdoc/rdoc/pull/340
+ https://github.com/rdoc/rdoc/pull/341
+ https://github.com/rdoc/rdoc/pull/367
+ https://github.com/rdoc/rdoc/pull/368
+ * lib/rdoc/*: ditto.
+ * test/rdoc/*: ditto.
- * array.c (rb_ary_reverse): use RARRAY_PTR_USE().
+Tue Dec 22 20:25:33 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Wed Nov 6 19:30:44 2013 Masaya Tarui <tarui@ruby-lang.org>
+ * ext/psych/lib/psych.rb: bump version to 2.0.17
+ * ext/psych/psych.gemspec: ditto.
- * common.mk (help): add texts about gcbench.
+Tue Dec 22 20:14:47 2015 Koichi Sasada <ko1@atdot.net>
-Wed Nov 6 16:32:32 2013 Martin Duerst <duerst@it.aoyama.ac.jp>
+ * vm_insnhelper.c: move vm_callee_setup_block_arg() (and related
+ functions) to the latter location.
+ This moving recovers performance a little.
+ [Bug #11829]
- * lib/open3.rb: tweaked grammar in comments
+Tue Dec 22 15:21:11 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Nov 6 11:46:36 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * string.c (str_compat_and_valid): as scrub does nothing for dummy
+ encoding string now, incompatible encoding is not a matter.
- * array.c (rb_ary_sample): use RARRAY_AREF() and RARRAY_PTR_USE()
- instead of RARRAY_PTR().
+Tue Dec 22 14:31:28 2015 Toru Iwase <tietew@tietew.net>
-Wed Nov 6 10:37:07 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * ext/cgi/escape/escape.c (optimized_escape_html): CGI.escapeHTML
+ should return unfrozen new string.
+ [ruby-core:72426] [Bug #11858]
- * array.c (rb_ary_and): defer hash creation and some refactoring.
+Tue Dec 22 05:39:58 2015 Takashi Kokubun <takashikkbn@gmail.com>
-Wed Nov 6 09:14:31 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/cgi/escape/escape.c (preserve_original_state): Preserve
+ original state for tainted and frozen. [Fix GH-1166]
+ [ruby-dev:49451] [Bug #11855]
- * benchmark/bm_vm1_gc_short_lived.rb: added.
- These GC benchmarks do not reflect practical applications.
- They are only for tuning.
+Tue Dec 22 03:57:20 2015 Eric Wong <e@80x24.org>
- * benchmark/bm_vm1_gc_short_with_complex_long.rb: added.
+ * ext/socket/init.c (rsock_init_sock): check FD after validating
+ * test/socket/test_basicsocket.rb (test_for_fd): new
+ [ruby-core:72418] [Bug #11854]
- * benchmark/bm_vm1_gc_short_with_long.rb: added.
+Mon Dec 21 21:29:45 2015 Naohisa Goto <ngotogenome@gmail.com>
- * benchmark/bm_vm1_gc_short_with_symbol.rb: added.
+ * variable.c (struct ivar_update): rename "extended" to "iv_extended"
+ to avoid name conflict with /usr/include/floatingpoint.h on
+ Solaris. [Bug #11853] [ruby-dev:49448]
- * benchmark/bm_vm1_gc_wb_ary.rb: added.
+Mon Dec 21 12:15:32 2015 Kimura Wataru <kimuraw@i.nifty.jp>
- * benchmark/bm_vm1_gc_wb_obj.rb: added.
+ * test/ruby/test_io.rb: handled rlimit value same as r52277
+ [Bug #11852][ruby-dev:49446]
- * benchmark/bm_vm_thread_queue.rb: added.
- This benchmark is added to know how fast C version of thread.so.
+Mon Dec 21 10:21:22 2015 Ilya Vassilevsky <vassilevsky@gmail.com>
-Wed Nov 6 09:13:32 2013 Koichi Sasada <ko1@atdot.net>
+ * lib/net/http.rb (open_timeout): update default value in RDoc
+ [ruby-core:72413]
- * gc.c: define RGENGC_ESTIMATE_OLDSPACE == 0 if USE_RGENGC is 0.
+Mon Dec 21 10:18:46 2015 Kazuki Yamaguchi <k@rhe.jp>
-Wed Nov 6 07:13:18 2013 Koichi Sasada <ko1@atdot.net>
+ * vm_backtrace.c (rb_profile_frames): ignore ifunc frames as it
+ did before. [ruby-core:72409] [Bug #11851]
- * gc.c (Init_GC): add GC::OPTS to show options.
+Mon Dec 21 09:33:17 2015 Karol Bucek <kares@users.noreply.github.com>
-Wed Nov 6 07:12:17 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/openssl/lib/openssl/ssl.rb (OpenSSL::SSL::SSLSocket): fix
+ NotImplementedError typo. [Fix GH-1165]
- * benchmark/gc/gcbench.rb: add some options to make quiet.
+Sun Dec 20 20:54:51 2015 Takashi Kokubun <takashikkbn@gmail.com>
-Wed Nov 6 04:14:25 2013 Aaron Patterson <aaron@tenderlovemaking.com>
+ * cgi/escape/escape.c: Optimize CGI.escapeHTML for
+ ASCII-compatible encodings. [Fix GH-1164]
- * ext/psych/lib/psych/visitors/to_ruby.rb: process merge keys before
- reviving objects. Fixes GH psych #168
- * test/psych/test_merge_keys.rb: test for change
- https://github.com/tenderlove/psych/issues/168
+Sun Dec 20 15:36:46 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Tue Nov 5 21:21:47 2013 Tanaka Akira <akr@fsij.org>
+ * lib/erb.rb: revert r53123. It breaks compatibility like thor and
+ rspec-rails.
+ We should try with Ruby 2.4 or 3.0.
+ [Bug #11842][ruby-core:72374]
+ * lib/rdoc/erb_partial.rb: ditto.
+ * template/verconf.h.tmpl: ditto.
- * test/ruby/test_thread.rb (test_thread_join_in_trap):
- Run the test in a different process.
+Sun Dec 20 11:43:31 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Nov 5 20:14:32 2013 Masaya Tarui <tarui@ruby-lang.org>
+ * parse.y (parser_yylex): allow here documents in labeled
+ argument. [ruby-core:72396] [Bug #11849]
- * gc.c (is_live_object): A hidden object may be a live object.
- [ruby-dev:47788] [Bug #9072]
+Sun Dec 20 11:14:11 2015 Koichi Sasada <ko1@atdot.net>
-Tue Nov 5 13:37:19 2013 Koichi Sasada <ko1@atdot.net>
+ * proc.c (rb_mod_define_method): should check Symbol or not.
+ [Bug #11850]
- * gc.c: add support to estimate increase of oldspace memory usage.
- This is another approach to solve an issue discussed at r43530.
- This feature is disabled as default.
+ * test/ruby/test_method.rb: add a test.
- This feature measures an increment of memory consumption by oldgen
- objects. It measures memory consumption for each objects when
- the object is promoted. However, measurement of memory consumption
- is not accurate now. So that this measurement is `estimation'.
+Sun Dec 20 11:01:57 2015 Koichi Sasada <ko1@atdot.net>
- To implement this feature, move memsize_of() function from
- ext/objspace/objspace.c and expose rb_obj_memsize_of().
+ * proc.c (rb_mod_define_method): fix notation.
- Some memsize() functions for T_DATA (T_TYPEDDATA) have problem to
- measure memory size, so that we ignores T_DATA objects now.
- For example, some functions skip NULL check for pointer.
+Sun Dec 20 10:54:15 2015 Koichi Sasada <ko1@atdot.net>
- The macro RGENGC_ESTIMATE_OLDSPACE enables/disables this feature,
- and turned off as default.
+ * proc.c (proc_new): fix notation.
- We need to compare 3gen GC and this feature carefully.
- (it is possible to enable both feature)
- We need a help to compare them.
+Sun Dec 20 00:29:00 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * internal.h: expose rb_obj_memsize_of().
+ * proc.c (rb_proc_get_iseq): proc made from symbol does not have
+ iseq. fix infinite loop. [ruby-core:72381] [Bug #11845]
- * ext/objspace/objspace.c: use rb_obj_memsize_of() function.
+Sat Dec 19 20:06:10 2015 Naohisa Goto <ngotogenome@gmail.com>
- * cont.c (fiber_memsize): fix to check NULL.
+ * enc/windows_1250.c: Should not use C++ style comments (C99 feature).
+ [Bug #11843]
- * variable.c (autoload_memsize): ditto.
+Sat Dec 19 17:17:04 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * vm.c (vm_memsize): ditto.
+ * lib/webrick/utils.rb (WEBrick::Utils::TimeoutHandler#initialize):
+ use WEBrick::Utils::TimeoutHandler::Thread, which is ignored by
+ LeakChecker#find_threads, instead of ::Thread to get rid of
+ thread leak checker. since this TimeoutHandler is resident
+ during tests because of Singleton, it waits for the next timeout
+ if it has any schedules. in the case of nested timeouts, inner
+ timeout does not cancel outer timeouts and then those schedules
+ still remain.
-Tue Nov 5 04:03:07 2013 Koichi Sasada <ko1@atdot.net>
+Sat Dec 19 14:28:01 2015 Jake Worth <jakeworth82@gmail.com>
- * gc.c (GC_MALLOC_LIMIT_MAX): fix default value 512MB -> 384MB.
- 512MB is huge.
+ * ext/zlib/zlib.c (Init_zlib): [DOC] Fix double-word typo and
+ grammatical error. [Fix GH-1162]
-Tue Nov 5 03:31:23 2013 Koichi Sasada <ko1@atdot.net>
+Sat Dec 19 14:23:59 2015 Jake Worth <jakeworth82@gmail.com>
- * gc.c: add 3gen GC patch, but disabled as default.
+ * lib/csv.rb (CSV#initialize): [DOC] Fix double-word typo.
+ [Fix GH-1161]
- RGenGC is designed as 2 generational GC, young and old generation.
- Young objects will be promoted to old objects after one GC.
- Old objects are not collect until major (full) GC.
+Sat Dec 19 10:33:33 2015 Martin Duerst <duerst@it.aoyama.ac.jp>
- The issue of this approach is some objects can promoted as old
- objects accidentally and not freed until major GC.
- Major GC is not frequently so short-lived but accidentally becoming
- old objects are not freed.
+ * enc/iso_8859_2.c, enc/windows_1250.c: separate Windows-1250
+ from ISO-8859-2 to fix 0x80..0x9e range (from Kimihito Matsui)
- For example, the program "loop{Array.new(1_000_000)}" consumes huge
- memories because short lived objects (an array which has 1M
- elements) are promoted while GC and they are not freed before major
- GC.
+Fri Dec 18 21:26:54 2015 Naohisa Goto <ngotogenome@gmail.com>
- To solve this problem, generational GC with more generations
- technique is known. This patch implements three generations gen GC.
+ * lib/webrick/utils.rb (WEBrick::Utils::TimeoutHandler): To prevent
+ potential deadlocks, Queue is used to tell update of @timeout_info
+ instead of sleep and wakeup. [Bug #11742] [ruby-dev:49387]
- At first, newly created objects are "Infant" objects.
- After surviving one GC, "Infant" objects are promoted to "Young"
- objects.
- "Young" objects are promoted to "Old" objects after surviving
- next GC.
- "Infant" and "Young" objects are collected if it is not marked
- while minor GC. So that this technique solves this problem.
+Fri Dec 18 17:24:09 2015 Koichi Sasada <ko1@atdot.net>
- Representation of generations:
- * Infant: !FL_PROMOTED and !oldgen_bitmap [00]
- * Young : FL_PROMOTED and !oldgen_bitmap [10]
- * Old : FL_PROMOTED and oldgen_bitmap [11]
+ * compile.c (ibf_load_object_string): use fstring if frozen string.
- The macro "RGENGC_THREEGEN" enables/disables this feature, and
- turned off as default because there are several problems.
- (1) Failed sometimes (Heisenbugs).
- (2) Performance down.
- Especially on write barriers. We need to detect Young or Old
- object by oldgen_bitmap. It is slower than checking flags.
+Fri Dec 18 16:54:38 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- To evaluate this feature on more applications, I commit this patch.
- Reports are very welcome.
+ * ext/stringio/stringio.c (strio_set_encoding): add StringIO's own
+ encoding and separate it from the buffer string to override the
+ encoding of string when reading. [ruby-core:72189] [Bug #11827]
+ note that setting the encoding of its buffer string directly
+ without StringIO#set_encoding may cause unpredictable behavior.
- This patch includes some refactoring (renaming names, etc).
+Fri Dec 18 16:50:35 2015 Koichi Sasada <ko1@atdot.net>
- * include/ruby/ruby.h: catch up 3gen GC.
+ * compile.c (ibf_load_setup): check tainted string argument.
- * .gdbinit: fix to show a prompt "[PROMOTED]" for promoted objects.
+Fri Dec 18 16:12:13 2015 Koichi Sasada <ko1@atdot.net>
-Tue Nov 5 00:05:51 2013 Koichi Sasada <ko1@atdot.net>
+ * vm_core.h: define USE_LAZY_LOAD if it is not defined.
- * node.h: catch up comments for last commit.
+Fri Dec 18 15:40:06 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Nov 5 00:02:00 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/stringio/stringio.c (strio_unget_bytes): extract from
+ strio_ungetbyte to share with strio_ungetc.
- * include/ruby/ruby.h: rename FL_OLDGEN to FL_PROMOTED.
- This flag represents that "this object is promoted at least once."
+Fri Dec 18 12:39:42 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * gc.c, debug.c, object.c: catch up this change.
+ * doc/syntax/*.rdoc: separated modifier at sentence.
+ [ci skip][fix GH-1121] Patch by @clandry94
-Mon Nov 4 22:20:16 2013 Tanaka Akira <akr@fsij.org>
+Fri Dec 18 12:09:21 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/xmlrpc: Don't use fixed ports: 8070 and 8071.
+ * ext/stringio/stringio.c (strio_ungetbyte): pad with \000 when
+ the current position is after the end.
-Mon Nov 4 15:25:52 2013 Tanaka Akira <akr@fsij.org>
+Fri Dec 18 11:24:48 2015 Shugo Maeda <shugo@ruby-lang.org>
- * test/xmlrpc/webrick_testing.rb (start_server): Initialize the server
- at main thread to fail early.
+ * vm_method.c (rb_method_entry_make, check_override_opt_method):
+ should check whether a newly created method overrides an optimize
+ method in case the method is defined in a prepended module of a
+ built-in class.
+ [ruby-core:72226] [Bug #11836]
-Mon Nov 4 10:08:17 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Dec 18 11:09:38 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * eval_intern.h (TH_EXEC_TAG, TH_JUMP_TAG): get rid of undefined
- behavior of setjmp() in rhs of assignment expression.
- [ISO/IEC 9899:1999] 7.13.1.1
+ * vm.c (vm_exec): call RUBY_DTRACE_CMETHOD_RETURN_HOOK instead of
+ RUBY_DTRACE_METHOD_RETURN_HOOK.
-Sun Nov 3 23:06:51 2013 Tanaka Akira <akr@fsij.org>
+Fri Dec 18 10:24:44 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * sample/test.rb: Make temporary file names unique.
+ * lib/irb/ruby-lex.rb: fixed parse error for striped heredocument syntax.
+ [fix GH-1127] Patch by @koic
-Sun Nov 3 20:41:17 2013 Tanaka Akira <akr@fsij.org>
+Fri Dec 18 09:44:47 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * test/xmlrpc: Wrap definitions by TestXMLRPC module.
+ * ext/pty/pty.c: fix double words typo.
+ [ci skip][fix GH-1157] Patch by @jwworth
-Sun Nov 3 20:23:38 2013 Tanaka Akira <akr@fsij.org>
+Fri Dec 18 09:42:45 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * test/xmlrpc/webrick_testing.rb (stop_server): Don't try to shutdown
- the server if the server is not started.
+ * ext/nkf/nkf-utf8/utf8tbl.c: fix a typo.
+ [ci skip][fix GH-1159] Patch by @akshay-vishnoi
+ * ext/nkf/nkf-utf8/utf8tbl.h: ditto.
-Sun Nov 3 09:35:47 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Dec 18 07:39:01 2015 Shugo Maeda <shugo@ruby-lang.org>
- * load.c (rb_feature_p): deal with default loadable suffixes.
+ * vm.c (rb_vm_check_redefinition_opt_method): should check the real
+ class instead of the origin iclass.
+ [ruby-core:72188] [Bug #11826]
- * load.c (load_lock): initialize statically linked extensions.
+Thu Dec 17 22:13:10 2015 Shugo Maeda <shugo@ruby-lang.org>
- * load.c (search_required, rb_require_safe): deal with statically
- linked extensions.
+ * vm_args.c (vm_caller_setup_arg_block): remove code for ifunc
+ because it was made unnecessary by r52138.
- * load.c (ruby_init_ext): defer initialization of statically linked
- extensions until required actually. [Bug #8883]
+Thu Dec 17 16:13:10 2015 Shugo Maeda <shugo@ruby-lang.org>
-Sat Nov 2 15:14:33 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * proc.c (rb_block_arity): should not call GetProcPtr() for symbols.
+ [ruby-core:72205] [Bug #11830]
- * lib/logger.rb (Logger::LogDevice::LogDeviceMutex#lock_shift_log):
- open file can't be removed or renamed on Windows. [ruby-dev:47790]
- [Bug #9046]
+Thu Dec 17 14:16:29 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/logger/test_logger.rb (TestLogDevice#run_children): don't use
- fork.
+ * string.c (rb_str_scrub): the result should be infected by the
+ original string.
-Sat Nov 2 07:08:43 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Thu Dec 17 13:35:27 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/logger.rb: Inter-process locking for log rotation
- Current implementation fails log rotation on multi process env.
- by sonots <sonots@gmail.com>
- https://github.com/ruby/ruby/pull/428 fix GH-428 [Bug #9046]
+ * transcode.c (rb_econv_substr_append, econv_primitive_convert):
+ the result should be infected by the original string.
-Fri Nov 1 23:24:31 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Dec 17 09:46:08 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c (wmap_mark_map): mark live objects only, but delete zombies.
- [ruby-dev:47787] [Bug #9069]
+ * re.c (reg_names_iter): should consider encoding of regexp.
+ [ruby-core:72185] [Bug #11825]
-Fri Nov 1 22:45:54 2013 Masaya Tarui <tarui@ruby-lang.org>
+Thu Dec 17 03:52:10 2015 Koichi Sasada <ko1@atdot.net>
- * gc.c (struct heap_page, gc_page_sweep, gc_sweep): Refactoring for
- performance. Add before_sweep condition to heap_page structure.
+ * vm.c (vm_make_env_each): should not compare with Qfalse and FALSE.
+ Pointed at http://d.hatena.ne.jp/nagachika/20151216/ruby_trunk_changes_53128_53163
- * gc.c (rb_gc_force_recycle): Use before_sweep member.
+Thu Dec 17 03:15:25 2015 Koichi Sasada <ko1@atdot.net>
- * gc.c (heap_is_before_sweep, is_before_sweep): Remove. They have not
- already been used.
+ * vm_insnhelper.c (vm_call_method_each_type): should not set fastpath
+ with keyword arguments for VM_METHOD_TYPE_ATTRSET type methods.
-Fri Nov 1 22:20:28 2013 Masaya Tarui <tarui@ruby-lang.org>
+ Normally, we can not use keyword arguments for this kind of methods,
+ (obj.foo = 1), but we can set alias names for them.
+ [Bug #11657]
- * gc.c (make_deferred): Refactoring. Collect codes which should be
- atomic.
+ * test/ruby/test_keyword.rb: add a test for this fix.
- * gc.c (make_io_deferred, obj_free, rb_objspace_call_finalizer,
- gc_page_sweep): Correspond to the above.
+Wed Dec 16 20:32:43 2015 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
-Fri Nov 1 21:40:35 2013 Masaya Tarui <tarui@ruby-lang.org>
+ * ext/fiddle/handle.c: check tainted string arguments.
+ Patch provided by tenderlove and nobu.
- * gc.c (typedef struct rb_objspace): Refactoring. Move some members
- into profile member.
+ * test/fiddle/test_handle.rb (class TestHandle): add test for above.
- * gc.c (newobj_of): Correspond to the above.
- * gc.c (finalize_list): Ditto.
+Wed Dec 16 19:30:56 2015 Shugo Maeda <shugo@ruby-lang.org>
- * gc.c (objspace_live_num): Ditto.
+ * vm.c (vm_make_proc_from_block): should convert a Symbol to a Proc.
+ [ruby-core:72083] [Bug #11811]
- * gc.c (gc_page_sweep): Ditto.
+Wed Dec 16 16:17:34 2015 Eric Wong <e@80x24.org>
- * gc.c (rb_gc_force_recycle): Ditto.
+ * test/ruby/test_io.rb: fix spelling errors
- * gc.c (garbage_collect_body): Ditto.
+Wed Dec 16 16:04:49 2015 Eric Wong <e@80x24.org>
- * gc.c (rb_gc_count): Ditto.
+ * NEWS: note IO#advise change [ruby-core:72168]
- * gc.c (gc_stat): Ditto.
+Wed Dec 16 15:35:13 2015 Koichi Sasada <ko1@atdot.net>
- * gc.c (gc_prof_set_heap_info): Ditto.
+ * vm.c: fix mark miss for proc given as passed block.
+ [Bug #11750]
- * gc.c (gc_profile_dump_on): Ditto.
+ * vm.c (vm_make_proc_from_block): should return a Proc object
+ if block is given. Previous implementation returns
+ a Proc object only when corresponding Proc object is not
+ available.
-Fri Nov 1 20:53:56 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm.c (vm_make_env_each): ditto.
- * string.c (rb_str_scrub): fix typo, should yield invalid byte
- sequence to be scrubbed. reported by znz at IRC.
+ * test/ruby/test_proc.rb: add a test for this bug.
-Fri Nov 1 17:25:30 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Dec 16 12:24:59 2015 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
- * gc.c (is_live_object): finalizer may not run because of lazy-sweep.
- [ruby-dev:47786] [Bug #9069]
+ * test_struct.rb: Test that initialize is overridable [#11708]
-Fri Nov 1 16:55:52 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Dec 16 10:49:51 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * string.c (rb_str_scrub): export with fixed length arguments, and
- allow nil as replacement string instead of omitting.
+ * parse.y (block_command, block_call): fix `&.` calls after
+ block_call. [Feature #11537]
-Fri Nov 1 06:20:44 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+Wed Dec 16 00:53:45 2015 Naohisa Goto <ngotogenome@gmail.com>
- * thread.c (rb_mutex_struct): reduce rb_mutex_t size by 8 bytes
- on 64bit platform. Patch by Eric Wong. [Feature #9068][ruby-core:58114]
+ * lib/webrick/utils.rb (WEBrick::Utils::TimeoutHandler): Acquire
+ TimeoutMutex only when accessing @timeout_info for avoiding
+ potential deadlock. [Bug #11742] [ruby-dev:49387]
-Fri Nov 1 01:08:33 2013 Koichi Sasada <ko1@atdot.net>
+Wed Dec 16 00:39:27 2015 Jake Worth <jakeworth82@gmail.com>
- * benchmark/gc/gcbench.rb: print HWM (high water mark) if possible.
+ * doc/extension.rdoc: [DOC] fix double-word typo. [Fix GH-1153]
-Thu Oct 31 21:48:31 2013 Kouhei Sutou <kou@cozmixng.org>
+Wed Dec 16 00:25:41 2015 Naohisa Goto <ngotogenome@gmail.com>
- * lib/rexml/parsers/streamparser.rb: Add dependency file require.
- [Bug #9062] [ruby-dev:47779]
- Reported by Ippei Obayashi. Thanks!!!
+ * lib/webrick/utils.rb (WEBrick::Utils::TimeoutHandler#initialize):
+ TimeoutMutex should be acquired when accessing @timeout_info.
+ To avoid deadlock, interrupt() calls are delayed.
+ Due to the mutex, it is safe to treat ary without ary.dup.
+ [Bug #11742] [ruby-dev:49387]
-Thu Oct 31 14:09:32 2013 Koichi Sasada <ko1@atdot.net>
+Tue Dec 15 23:13:10 2015 Naohisa Goto <ngotogenome@gmail.com>
- * vm_method.c (rb_method_entry_make): fix to pass an ISeq value.
- OBJ_WRITTEN() accepts only VALUE.
+ * gc.c: Delete excess semicolon after RUBY_ALIAS_FUNCTION().
+ Suppress "syntax error: empty declaration" warnings by
+ Oracle Solaris Studio 12.x on Solaris. [Bug #11821]
-Wed Oct 30 19:07:57 2013 Akinori MUSHA <knu@iDaemons.org>
+ * hash.c: ditto, after NOINSERT_UPDATE_CALLBACK().
- * misc/ruby-additional.el (ruby-brace-to-do-end)
- (ruby-do-end-to-brace, ruby-toggle-block): Remove functions that
- are already in the latest released version of Emacs (24.3).
- [Bug #7565]
+Tue Dec 15 18:04:04 2015 Martin Duerst <duerst@it.aoyama.ac.jp>
-Wed Oct 30 12:44:28 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * NEWS: added news about EBCDIC encoding
- * win32/Makefile.sub (config.status): add missing variables,
- PLATFORM_DIR and THREAD_MODEL.
+Tue Dec 15 17:57:57 2015 Martin Duerst <duerst@it.aoyama.ac.jp>
-Wed Oct 30 12:20:32 2013 Tanaka Akira <akr@fsij.org>
+ * enc/ebcdic.h, enc/trans/ebcdic.trans,
+ test/ruby/test_transcode.rb: Fixed encoding name
+ to the correct one in the IANA registry (IBM037)
+ and added an alias (ebcdic-cp-us)
- * time.c (v2w): Normalize a rational value to an integer if possible.
- [ruby-core:58070] [Bug #9059] reported by Isaac Schwabacher.
+Tue Dec 15 16:19:26 2015 Takashi Kokubun <takashikkbn@gmail.com>
-Wed Oct 30 12:08:41 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * lib/erb.rb: Render erb with array buffer for function call optimization.
+ [fix GH-1143]
+ * lib/rdoc/erb_partial.rb: ditto.
+ * template/verconf.h.tmpl: ditto.
- * array.c (rb_ary_uniq_bang): use rb_ary_modify_check() instead of
- rb_ary_modify() because the array will be unshared soon.
+Tue Dec 15 13:50:05 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Oct 30 03:25:10 2013 Aaron Patterson <aaron@tenderlovemaking.com>
+ * string.c (rb_str_oct): [DOC] mention radix indicators.
+ [ruby-core:71310] [Bug #11648]
- * ext/psych/lib/psych/visitors/yaml_tree.rb: make less garbage when
- testing if a string is binary.
+Tue Dec 15 12:20:30 2015 Takashi Kokubun <takashikkbn@gmail.com>
-Wed Oct 30 03:08:24 2013 Aaron Patterson <aaron@tenderlovemaking.com>
+ * lib/erb.rb: Simplify regexp to optimize erb scanner.
+ [fix GH-1144]
- * ext/psych/lib/psych/visitors/yaml_tree.rb: string subclasses should
- not be considered to be binary. Fixes Psych / GH 166
- https://github.com/tenderlove/psych/issues/166
+Tue Dec 15 11:56:24 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * test/psych/test_string.rb: test for fix
+ * lib/uri/common.rb: make code block for rdoc.
+ [ci skip][fix GH-1152] Patch by @Tonkpils
-Tue Oct 29 23:01:18 2013 Masaki Matsushita <glass.saga@gmail.com>
+Tue Dec 15 11:55:08 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * array.c (rb_ary_zip): some refactoring.
+ * ext/zlib/zlib.c: fix a typo.
+ [ci skip][fix GH-1149] Patch by @crismali
-Tue Oct 29 22:11:37 2013 Masaki Matsushita <glass.saga@gmail.com>
+Tue Dec 15 09:14:14 2015 Martin Duerst <duerst@it.aoyama.ac.jp>
- * array.c (rb_ary_uniq_bang): use st_foreach() instead of for loop.
+ * tool/transcode_tablegen.rb: detailed documentation
+ for transcode_tblgen function [ci skip]
-Tue Oct 29 20:01:58 2013 Koichi Sasada <ko1@atdot.net>
+Mon Dec 14 22:11:11 2015 Martin Duerst <duerst@it.aoyama.ac.jp>
- * add RUBY_TYPED_FREE_IMMEDIATELY to data types which only use
- safe functions during garbage collection such as xfree().
+ * enc/ebcdic.h: new dummy encoding EBCDIC-US
+ * enc/trans/ebcdic.trans: transcodings between EBCDIC-US
+ and iso-8859-1 [with code from Andrea Ribuoli]
+ * test/ruby/test_transcode.rb: tests for above
+ * tool/transcode_tablegen.rb: additional argument for
+ method transcode_tblgen
- On default, T_DATA objects are freed at same points as finalizers.
- This approach protects issues such as reported by [ruby-dev:35578].
- However, freeing T_DATA objects immediately helps heap usage.
+Mon Dec 14 17:04:14 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- Most of T_DATA (in other words, most of dfree functions) are safe.
- However, we turned off RUBY_TYPED_FREE_IMMEDIATELY by default
- for safety.
+ * ext/socket/lib/socket.rb: use safe navigation operator.
+ [fix GH-1142] Patch by @mlarraz
+ * lib/drb/extservm.rb: ditto.
+ * lib/net/http.rb: ditto.
+ * lib/net/http/response.rb: ditto.
+ * lib/scanf.rb: ditto.
+ * lib/uri/generic.rb: ditto.
- * cont.c: ditto.
+Mon Dec 14 17:03:05 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * dir.c: ditto.
+ * bootstraptest/runner.rb: use safe navigation operator.
+ [fix GH-1142] Patch by @mlarraz
+ * test/openssl/test_pair.rb: ditto.
+ * test/ruby/test_econv.rb: ditto.
+ * test/ruby/test_settracefunc.rb: ditto.
+ * test/thread/test_queue.rb: ditto.
- * encoding.c: ditto.
+Mon Dec 14 14:33:35 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * enumerator.c: ditto.
+ * lib/xmlrpc.rb: added documentation for parser details.
+ [ci skip][fix GH-1124] Patch by @jrafanie
- * error.c: ditto.
-
- * file.c: ditto.
-
- * gc.c: ditto.
+Mon Dec 14 11:46:52 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
+ * enum.c: fix a typo in documentation.
+ [ci skip][fix GH-1140] Patch by @jutaz
* io.c: ditto.
-
* iseq.c: ditto.
-
- * marshal.c: ditto.
-
- * parse.y: ditto.
-
- * proc.c: ditto.
-
+ * numeric.c: ditto.
* process.c: ditto.
-
- * random.c: ditto.
-
- * thread.c: ditto.
-
- * time.c: ditto.
-
- * transcode.c: ditto.
-
- * variable.c: ditto.
-
- * vm.c: ditto.
-
- * vm_backtrace.c: ditto.
-
- * vm_trace.c: ditto.
-
- * ext/bigdecimal/bigdecimal.c: ditto.
-
- * ext/objspace/objspace.c: ditto.
-
- * ext/stringio/stringio.c: ditto.
-
- * ext/strscan/strscan.c: ditto.
-
-Tue Oct 29 19:48:33 2013 Koichi Sasada <ko1@atdot.net>
-
- * include/ruby/ruby.h: fix typo (FL_WB_PROTECT -> FL_WB_PROTECTED).
-
-Tue Oct 29 18:45:08 2013 Koichi Sasada <ko1@atdot.net>
-
- * vm_trace.c (tp_free): removed because empty free function.
- Use RUBY_TYPED_NEVER_FREE instead.
-
-Tue Oct 29 18:37:33 2013 Koichi Sasada <ko1@atdot.net>
-
- * include/ruby/ruby.h: introduce new flags for T_TYPEDDATA.
- * RUBY_TYPED_FREE_IMMEDIATELY: free the data given by DATA_PTR()
- with dfree function immediately. Otherwise (default), the data
- freed at finalization point.
- * RUBY_TYPED_WB_PROTECTED: make this object with FL_WB_PROTECT
- (not shady).
-
- * gc.c (obj_free): support RUBY_TYPED_FREE_IMMEDIATELY.
-
-Tue Oct 29 16:49:03 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c (vm_malloc_increase): decrease it more carefully.
-
-Tue Oct 29 16:24:52 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c (heap_page_resurrect): return a page in tomb heap even if
- freelist is NULL.
-
-Tue Oct 29 15:46:30 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ruby_atomic.h (ATOMIC_SIZE_CAS): new macro, compare and swap size_t.
-
-Tue Oct 29 12:08:05 2013 Tanaka Akira <akr@fsij.org>
-
- * ext/readline/readline.c (readline_getc): Consider
- NULL as input.
-
-Tue Oct 29 11:10:08 2013 Aman Gupta <ruby@tmm1.net>
-
- * gc.c (gc_profile_total_time): fix off-by-one error in
- GC::Profiler.total_time.
- * test/ruby/test_gc.rb (class TestGc): test for above.
-
-Tue Oct 29 09:53:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
-
- * insns.def, vm.c, vm_insnhelper.c, vm_insnhelper.h, vm_method.c: split
- ruby_vm_global_state_version into two separate counters - one for the
- global method state and one for the global constant state. This means
- changes to constants do not affect method caches, and changes to
- methods do not affect constant caches. In particular, this means
- inclusions of modules containing constants no longer globally
- invalidate the method cache.
-
- * class.c, eval.c, include/ruby/intern.h, insns.def, vm.c, vm_method.c:
- rename rb_clear_cache_by_class to rb_clear_method_cache_by_class
-
- * class.c, include/ruby/intern.h, variable.c, vm_method.c: add
- rb_clear_constant_cache
-
- * compile.c, vm_core.h, vm_insnhelper.c: rename vmstat field in
- rb_call_info_struct to method_state
-
- * vm_method.c: rename vmstat field in struct cache_entry to method_state
-
-Mon Oct 28 23:26:04 2013 Tanaka Akira <akr@fsij.org>
-
- * test/readline/test_readline.rb (teardown): Clear Readline.input and
- Readline.output.
-
-Mon Oct 28 21:35:31 2013 Tanaka Akira <akr@fsij.org>
-
- * ext/-test-/file/depend, ext/-test-/postponed_job/depend,
- ext/-test-/tracepoint/depend: New files for dependencies.
-
-Mon Oct 28 15:32:18 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/openssl/depend (ossl.o): work around of dependency of
- thread_native.h, which depends on headers by THREAD_MODEL.
- [ruby-dev:47777]
-
- * ext/openssl/extconf.rb: need THREAD_MODEL.
-
-Mon Oct 28 14:57:01 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * load.c (ruby_init_ext): share feature names between frame name and
- provided features.
-
-Mon Oct 28 14:41:27 2013 Akinori MUSHA <knu@iDaemons.org>
-
- * misc/ruby-electric.el: Import ruby-electric.el 2.1 from
- https://github.com/knu/ruby-electric.el.
-
- * Hitting the newline-and-indent key within a comment fires
- comment-indent-new-line.
-
- * Introduce a new feature
- `ruby-electric-autoindent-on-closing-char`.
-
- * Fix fallback behavior of ruby-electric-space/return that
- caused error with auto-complete.
-
-Mon Oct 28 13:17:17 2013 Or Cohen <orc@fewbytes.com>
-
- * error.c (name_err_to_s): remove no longer needed overriding, since
- r30455 which made exc_to_s almost same. Fixes [GH-413].
-
-Mon Oct 28 12:42:11 2013 Tanaka Akira <akr@fsij.org>
-
- * common.mk, ext/objspace/depend, ext/coverage/depend,
- ext/-test-/debug/depend, ext/date/depend: Update dependencies.
-
-Mon Oct 28 09:29:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
-
- * vm.c: vm_clear_all_cache is not necessary now we use a 64 bit counter
- for global state version.
-
- * vm_insnhelper.h: ruby_vm_global_state_version overflow is unnecessary
-
-Mon Oct 28 07:47:32 2013 Aman Gupta <ruby@tmm1.net>
-
- * vm_backtrace.c (rb_profile_frame_classpath): do not use rb_inspect
- directly, since it might have a custom implementation or show ivars.
-
-Mon Oct 28 04:10:41 2013 Aman Gupta <ruby@tmm1.net>
-
- * vm_backtrace.c (rb_profile_frame_classpath): handle singleton
- methods defined directly on an object.
- * test/-ext-/debug/test_profile_frames.rb: test for above.
-
-Mon Oct 28 00:52:36 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * struct.c (new_struct): fix warning message, class name and encoding.
-
-Sun Oct 27 20:53:08 2013 Tanaka Akira <akr@fsij.org>
-
- * ext/readline/readline.c: Include ruby/thread.h for
- rb_thread_call_without_gvl2.
- (readline_rl_instream, readline_rl_outstream): Record FILE
- structures allocated by this extension.
- (getc_body): New function extracted from readline_getc.
- (getc_func): New function.
- (readline_getc): Use rb_thread_call_without_gvl2 to invoke getc_func.
- [ruby-dev:47033] [Bug #8749]
- (clear_rl_instream, clear_rl_outstream): Close FILE structure
- allocated by this extension reliably. [ruby-core:57951] [Bug #9040]
- (readline_readline): Use clear_rl_instream and clear_rl_outstream.
- (readline_s_set_input): Set readline_rl_instream.
- (readline_s_set_output): Set readline_rl_outstream.
- (Init_readline): Don't call readline_s_set_input because
- readline_getc doesn't block other threads for any FILE structure now.
-
- [ruby-dev:47033] [Bug #8749] reported by Nobuhiro IMAI.
- [ruby-core:57951] [Bug #9040] reported by Eamonn Webster.
-
-Sat Oct 26 19:31:28 2013 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * gc.c: catch up recent changes to compile on GC_DEBUG,
- RGENGC_CHECK_MODE.
-
-Sat Oct 26 19:08:00 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * range.c (range_initialize_copy): disallow to modify after
- initialized.
-
-Sat Oct 26 17:48:54 2013 Tanaka Akira <akr@fsij.org>
-
- * lib/open-uri.rb (meta_add_field): : Re-implemented.
- [ruby-core:58017] [Bug #9051] patch by Eamonn Webster.
-
-Sat Oct 26 14:35:09 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c (gc_profile_dump_on): use "Page" terminology.
-
-Sat Oct 26 13:25:45 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c (gc_sweep, gc_heap_lazy_sweep): fix measurement code.
- We only need one sweep time measurement without lazy sweep.
-
-Sat Oct 26 11:59:13 2013 Tanaka Akira <akr@fsij.org>
-
- * addr2line.c: Include ELF header after system headers (especially
- sys/types.h) to avoid compilation failure,
- "usr/include/sh3/elf_machdep.h:4:2: error: #error Define _BYTE_ORDER!",
- on NetBSD/sh3 (dreamcast, hpcsh, landisk, mmeye).
-
-Sat Oct 26 11:35:22 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c: tuning parameters.
-
- * gc.c (GC_MALLOC_LIMIT): change default value to 16MB.
-
- * gc.c (GC_MALLOC_LIMIT_GROWTH_FACTOR): change default value to 2.0.
-
- * gc.c (gc_before_sweep): change decrease ratio of `malloc_limit'
- from 1/4 to 1/10.
-
-Sat Oct 26 11:30:07 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c (vm_malloc_increase): do gc_rest_sweep() before GC.
- gc_rest_sweep() can reduce malloc_increase, so try it before GC.
- Otherwise, malloc_increase can be less than malloc_limit at
- gc_before_sweep(). This means that re-calculation of malloc_limit
- may be wrong value.
-
-Sat Oct 26 06:35:41 2013 Masaya Tarui <tarui@ruby-lang.org>
-
- * gc.c (gc_before_heap_sweep): Restructure code to mean clearly.
- heap->freelist is connected to end of list.
-
-Sat Oct 26 04:01:35 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c (gc_before_heap_sweep): fix freelist management.
- After rb_gc_force_recycle() for a object belonging to heap->freelist,
- `heap->using_page->freelist' is not null.
-
-Thu Oct 24 21:57:24 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * parse.y: Remove +(binary) and -(binary) special cases
- [Feature #9048]
-
-Thu Oct 24 12:45:53 2013 Zachary Scott <e@zzak.io>
-
- * object.c: [DOC] Document first argument also takes string for:
-
- rb_mod_const_get, rb_mod_const_set, rb_mod_const_defined
-
- Also added note about NameError exception for invalid constant name
-
-Thu Oct 24 12:23:58 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * thread.c (rb_thread_terminate_all): add a comment why we need
- state check and call terminate_i again.
-
-Thu Oct 24 12:15:02 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * thread.c (rb_thread_terminate_all): add a comment why infinite
- sleep is safe.
-
-Thu Oct 24 07:41:42 2013 Aman Gupta <ruby@tmm1.net>
-
- * gc.c: add new initial_growth_max tuning parameter.
- [ruby-core:57928] [Bug #9035]
- * gc.c (heap_set_increment): when initial_growth_max is set,
- do not grow number of slots by more than growth_max at a time.
- * gc.c (rb_gc_set_params): load optional new tuning value from
- RUBY_HEAP_SLOTS_GROWTH_MAX environment variable.
- * test/ruby/test_gc.rb (class TestGc): test for above.
-
-Thu Oct 24 01:34:12 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * include/ruby/win32.h (rb_infinity_float): suppress overflow in
- constant arithmetic warnings. [ruby-core:57981] [Bug #9044]
-
-Thu Oct 24 00:11:24 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * lib/ostruct.rb: raise NoMethodError with a #name and #args.
- Raise RuntimeError when modifying frozen instances
- instead of TypeError.
- (OpenStruct#each_pair): Return an enumerator with size
- (OpenStruct#delete): Use the converted argument.
- Patches by Kenichi Kamiya. [Fixes GH-383]
-
- * test/ostruct/test_ostruct.rb: Added tests for above.
-
-Thu Oct 24 00:10:22 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * array.c: Add Array#to_h [Feature #7292]
-
- * enum.c: Add Enumerable#to_h
-
-Wed Oct 23 23:48:28 2013 Aman Gupta <ruby@tmm1.net>
-
- * gc.c: Rename free_min to min_free_slots and free_min_page to
- max_free_slots. The algorithm for heap growth is:
- if (swept_slots < min_free_slots) pages++
- if (swept_slots > max_free_slots) pages--
-
-Wed Oct 23 22:51:03 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * win32/Makefile.sub (config.h): VC 2013 supports C99 mathematics
- functions. [ruby-core:57981] [Bug #9044]
-
-Wed Oct 23 19:13:18 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c: move increment from heap to heap_pages.
- Share `increment' information with heaps.
-
- * gc.c: change ratio of heap_pages_free_min_page
- to 0.80.
- This change means slow down page freeing speed.
-
-Wed Oct 23 17:52:03 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c (heap_pages_free_unused_pages): cast to (int) for size_t
- variable `i'.
-
-Wed Oct 23 17:39:35 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c: introduce tomb heap.
- Tomb heap is where zombie objects and ghost (freed slot) lived in.
- Separate from other heaps (now there is only eden heap) at sweeping
- helps freeing pages more efficiently.
- Before this patch, even if there is an empty page at former phase
- of sweeping, we can't free it.
-
- Algorithm:
- (1) Sweeping all pages in a heap and move empty pages from the
- heap to tomb_heap.
- (2) Check all existing pages and free a page
- if all slots of this page are empty and
- there is enough empty slots (checking by swept_num)
-
- To introduce this patch, there are several tuning of GC parameters.
-
-Wed Oct 23 14:20:56 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c (gc_prof_sweep_timer_stop): catch up recent changes
- to compile on GC_PROFILE_MORE_DETAIL=1.
-
-Wed Oct 23 11:43:27 2013 Zachary Scott <e@zzak.io>
-
- * file.c: [DOC] fix rdoc format of File#expand_path from r43386
-
-Tue Oct 22 21:58:28 2013 URABE Shyouhei <shyouhei@ruby-lang.org>
-
- * vm_core.h (enum): avoid syntax error.
-
- * method.h: ditto.
-
- * internal.h: ditto.
-
-Tue Oct 22 19:53:16 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c (Init_heap): move logics from heap_pages_init() and remove
- heap_pages_init().
-
-Tue Oct 22 19:19:05 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c: allow multiple heaps.
- Now, objects are managed by page. And a set of pages is called heap.
- This commit supports multiple heaps in the object space.
-
- * Functions heap_* and rb_heap_t manages heap data structure.
- * Functions heap_page_* and struct heap_page manage page data
- structure.
- * Functions heap_pages_* and struct rb_objspace_t::heap_pages
- maintains all pages.
- For example, pages are allocated from the heap_pages.
-
- See https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/GC_design
- and https://bugs.ruby-lang.org/attachments/4015/data-heap_structure_with_multiple_heaps.png
- for more details.
-
- Now, there is only one heap called `eden', which is a space for all
- new generated objects.
-
-Tue Oct 22 18:26:12 2013 Tanaka Akira <akr@fsij.org>
-
- * lib/pp.rb (object_address_group): Use Kernel#to_s to obtain the class
- name and object address.
- This fix a problem caused by %p in C generates variable length
- address.
- Reported by ko1 via IRC.
-
-Tue Oct 22 16:57:48 2013 Benoit Daloze <eregontp@gmail.com>
-
- * file.c (File#expand_path): [DOC] improve documentation of File#expand_path.
- Based on patch by Prathamesh Sonpatki. [ruby-core:57734] [Bug #9002]
-
-Tue Oct 22 15:59:51 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * dir.c (glob_helper): don't skip current directories if FNM_DOTMATCH
- is given. [ruby-core:53108] [Bug #8006]
-
-Tue Oct 22 14:53:11 2013 Koichi Sasada <ko1@atdot.net>
-
- * vm_trace.c: exterminate Zombies.
- There is a bug that T_ZOMBIE objects are not collected.
- Because there is a pass to miss finalizer postponed job
- with multi-threading. This patch solve this issue.
-
- * vm_trace.c (rb_postponed_job_register_one): set
- RUBY_VM_SET_POSTPONED_JOB_INTERRUPT(th) if another same job
- is registered.
- There is a possibility to remain a postponed job without
- interrupt flag.
-
- * vm_trace.c (rb_postponed_job_register_one): check interrupt
- carefully.
-
- * vm_trace.c (rb_postponed_job_register_one): use additional space
- to avoid buffer full.
-
- * gc.c (gc_finalize_deferred_register): check failure.
-
- * thread.c (rb_threadptr_execute_interrupts): check
- `postponed_job_interrupt' immediately. There is a possibility
- to miss this flag.
-
-Tue Oct 22 12:11:16 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in: check if the given CFLAGS and LDFLAGS are working, and
- bail out early if not.
-
-Tue Oct 22 00:06:57 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * file.c (rb_file_exists_p): warn deprecated name. [Bug #9041]
-
-Mon Oct 21 23:57:53 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * encoding.c (load_encoding): should preserve outer errinfo, so that
- expected exception may not be lost. [ruby-core:57949] [Bug #9038]
-
-Sun Oct 20 15:41:22 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * io.c (rb_io_reopen): create a new, temporary FD via rb_sysopen and
- call rb_cloexec_dup2 on it to atomically replace the file fptr->fd
- points to. This leaves no possible window where fptr->fd is invalid
- to userspace (even for any threads running w/o GVL). based on the
- patch by Eric Wong <normalperson@yhbt.net> at [ruby-core:57943].
- [Bug #9036]
-
-Sun Oct 20 15:29:05 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * error.c (rb_syserr_fail_path_in): new function split from
- rb_sys_fail_path_in to raise SystemCallError without errno.
-
- * internal.h (rb_syserr_fail_path): like rb_sys_fail_path but without
- errno.
-
-Sun Oct 20 13:58:47 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * include/ruby/ruby.h (rb_obj_wb_unprotect, rb_obj_written),
- (rb_obj_write): suppress unused-parameter warnings.
-
-Sun Oct 20 10:32:48 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems: Update RubyGems to master 0886307. This commit
- improves documentation and should bring ruby above 75% documented on
- rubyci.
-
-Sun Oct 20 09:30:56 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems: Update to RubyGems master 3de7e0f. Changes:
-
- Only attempt to build extensions for newly-installed gems. This
- prevents compilation attempts at gem activation time for gems that
- already have extensions built.
-
- Fix crash in the dependency resolver for dependencies that cannot be
- resolved.
-
- * test/rubygems: ditto.
-
-Sun Oct 20 05:24:29 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * variable.c (rb_class2name): should return real class name, not
- singleton class or iclass.
-
-Sun Oct 20 04:18:48 2013 Aman Gupta <ruby@tmm1.net>
-
- * variable.c (rb_class2name): call rb_tmp_class_path() directly to
- avoid extra rb_str_dup() from rb_class_name().
-
-Sat Oct 19 19:59:02 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * win32/file.c (code_page): use simple array instead of st_table.
-
- * encoding.c (rb_locale_encindex): defer initialization of win32 code
- page table until encoding db loaded.
-
-Sat Oct 19 08:25:05 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c: fix rb_objspace_t.
- * make "struct heap" and move most of variables
- in rb_objspace_t::heap.
- * rename rb_objspace_t::heap::sorted to
- rb_objspace_t::heap_sorted_pages
- and make a macro heap_sorted_pages.
- * rename rb_objspace_t::heap::range to
- rb_objspace_t::heap_range and rename macros
- lomem/himem to heap_lomem/heap_himem.
-
-Sat Oct 19 07:14:40 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems: Update to RubyGems master 42543b6. Changes:
-
- Fix `gem update` for gems with multiple platforms.
-
- * test/rubygems: ditto.
-
-Sat Oct 19 06:55:52 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems: Update to RubyGems master 0a3814b. Changes:
-
- Fixed extension directory in Gem::Specification#require_paths.
-
- Allow installation of gems when $HOME is nonexistent or unwritable.
-
- Use proper API in InstallCommand.
-
- Improve support for path option in gem dependency files.
-
- Remove warnings.
-
- * test/rubygems: ditto.
-
-Fri Oct 18 15:23:34 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c: change terminology of heap.
- Change "slot" to "page". "Slot" is a space of RVALUE.
- 1. "Heap" consists of a set of "heap_page"s (pages).
- 2. Each "heap_page" has "heap_page_body".
- 3. "heap_page_body" has RVALUE (a.k.a. "slot") spaces.
- 4. "sorted" is a sorted array of "heap_page"s, sorted
- by address of heap_page_body (for "is_pointer_to_heap").
-
- See https://bugs.ruby-lang.org/attachments/4008/data-heap_structure.png.
-
-Fri Oct 18 09:40:43 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems: Update to RubyGems master cee6788. Changes:
-
- Fix test failure on vc10-x64 Server on rubyci.org due to attempting
- to File.chmod where it is not supported.
-
- Continuing work on improved gem dependencies file (Gemfile) support.
-
- * test: ditto.
-
-Fri Oct 18 06:02:49 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems: Update to RubyGems master f738c67. Changes:
-
- Fixed test bug for ruby with ENABLE_SHARED = no
-
- * test/rubygems: ditto.
-
-Fri Oct 18 00:57:07 2013 Tanaka Akira <akr@fsij.org>
-
- * lib/tsort.rb (TSort.tsort): Extracted from TSort#tsort.
- (TSort.tsort_each): Extracted from TSort#tsort_each.
- (TSort.strongly_connected_components): Extracted from
- TSort#strongly_connected_components.
- (TSort.each_strongly_connected_component): Extracted from
- TSort#each_strongly_connected_component.
-
-Thu Oct 17 18:50:08 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c (CALC_EXACT_MALLOC_SIZE_CHECK_OLD_SIZE): introduced.
- This macro enable checker compare with allocated memory and
- declared old_size of sized_xfree and sized_xrealloc.
-
-Thu Oct 17 18:45:41 2013 Koichi Sasada <ko1@atdot.net>
-
- * string.c (STR_HEAP_SIZE): includes TERM_LEN(str).
-
- * string.c (rb_str_memsize): use STR_HEAP_SIZE().
-
-Thu Oct 17 17:43:00 2013 Shugo Maeda <shugo@ruby-lang.org>
-
- * vm_insnhelper.c (vm_call_method): set ci->me to 0 when the
- original method of a refined method is undef to avoid SEGV.
-
- * vm_method.c (rb_method_entry_without_refinements): return 0 when
- the original method of a refined method is undef to avoid SEGV.
-
- * test/ruby/test_refinement.rb: related test.
-
-Thu Oct 17 17:38:36 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c, internal.h: rename ruby_xsizefree/realloc to
- rb_sized_free/realloc.
-
- * array.c: catch up these changes.
-
* string.c: ditto.
+ * vm_trace.c: ditto.
-Thu Oct 17 17:32:51 2013 Koichi Sasada <ko1@atdot.net>
-
- * array.c, string.c: use ruby_xsizedfree() and ruby_xsizedrealloc().
-
- * internal.h (SIZED_REALLOC_N): define a macro as REALLOC_N().
-
-Thu Oct 17 17:11:17 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * win32/win32.c (console_emulator_p): check by comparison between
- module handle of WriteConsoleW and kernel32.dll.
-
- * configure.in, win32/Makefile.sub, win32/setup.mak: no longer need
- psapi.lib.
-
-Thu Oct 17 16:53:30 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c, internal.h: add new internal memory management functions.
- * void *ruby_xsizedrealloc(void *ptr, size_t new_size, size_t old_size)
- * void ruby_xsizedfree(void *x, size_t size)
- These functions accept additional size parameter to calculate more
- accurate malloc_increase parameter which control GC timing.
- [Feature #8985]
-
-Thu Oct 17 14:21:34 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * win32/file.c (rb_file_expand_path_internal): fix memory leaks at
- a non-absolute home exception.
-
-Thu Oct 17 14:06:39 2013 Koichi Sasada <ko1@atdot.net>
-
- * ext/objspace/object_tracing.c (newobj_i): fix memory leak.
- There is possibility to remain info due to missing FREEOBJ event.
- FREEOBJ events are skipped while suppress_tracing state, for example,
- during trace events are invoking.
-
-Thu Oct 17 12:30:16 2013 Tanaka Akira <akr@fsij.org>
-
- * lib/tsort.rb (TSort.each_strongly_connected_component_from):
- Extracted from TSort#each_strongly_connected_component_from.
-
-Thu Oct 17 11:07:06 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems: Update to RubyGems master 941c21a. Changes:
-
- Restored method bundler wants to remove for compatibility.
-
- Improvements to Gemfile compatibility.
-
- * test/rubygems: ditto.
-
-Thu Oct 17 08:08:11 2013 Koichi Sasada <ko1@atdot.net>
-
- * ext/objspace/object_tracing.c (newobj_i): add workaround.
- some bugs hits this check.
-
- * ext/objspace/object_tracing.c (object_allocations_reporter_i): cast as pointer.
-
-Thu Oct 17 07:36:53 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems: Update to RubyGems master 2abce58. Changes:
-
- Fixed documentation generation when sdoc and json are installed as
- gems.
-
- Added some missing documentation.
-
-Thu Oct 17 07:10:26 2013 Zachary Scott <e@zzak.io>
-
- * ext/curses/curses.c: [DOC] Cleaned up formatting consistency of rdoc
- comments for Curses, including period spacing and column width.
-
- This patch also fixed some typos. Thanks to @postmodern for the patch!
- [Fixes GH-420] https://github.com/ruby/ruby/pull/420
-
-Thu Oct 17 06:58:42 2013 Zachary Scott <e@zzak.io>
-
- * ext/date/date_core.c: [DOC] plural grammar fixed by @scott113341
- Contributed via documenting-ruby.org: documenting-ruby/ruby#16
- https://github.com/documenting-ruby/ruby/pull/16
-
-Thu Oct 17 05:52:31 2013 Zachary Scott <e@zzak.io>
-
- * ext/io/nonblock/nonblock.c: [DOC] Document io/nonblock by reprah
- [Fixes GH-418] https://github.com/ruby/ruby/pull/418 based on the
- original discussion from documenting-ruby/ruby#18
-
-Thu Oct 17 05:40:33 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c (objspace_each_objects): do not skip empty RVALUEs.
-
-Thu Oct 17 05:31:31 2013 Koichi Sasada <ko1@atdot.net>
-
- * error.c (rb_bug_reporter_add): return simply 0 if failed.
- Please check return value.
-
-Thu Oct 17 05:17:33 2013 Koichi Sasada <ko1@atdot.net>
-
- * ext/objspace/object_tracing.c: add new method
- ObjectSpace.trace_object_allocations_debug_start for GC debugging.
- If you encounter the BUG "... is T_NONE" (and so on) on your
- application, please try this method at the beginning of your app.
-
-Wed Oct 16 22:35:27 2013 Zachary Scott <e@zzak.io>
-
- * ext/io/nonblock/nonblock.c: use rb_cIO instead of VALUE
-
-Wed Oct 16 17:45:13 2013 Koichi Sasada <ko1@atdot.net>
-
- * bootstraptest/runner.rb: check nil before calling `signal?'
- for a process status.
-
-Wed Oct 16 17:37:17 2013 Koichi Sasada <ko1@atdot.net>
-
- * error.c, internal.h (rb_bug_reporter_add): add a new C-API.
- rb_bug_reporter_add() allows to register a function which
- is called at rb_bug() called.
-
- * ext/-test-/bug_reporter/bug_reporter.c: add a test for this C-API.
-
- * ext/-test-/bug_reporter/extconf.rb: ditto.
-
- * test/-ext-/bug_reporter/test_bug_reporter.rb: ditto.
-
-Wed Oct 16 15:14:21 2013 Koichi Sasada <ko1@atdot.net>
-
- * NEWS: add a line into NEWS for last commit.
-
-Wed Oct 16 15:09:14 2013 Koichi Sasada <ko1@atdot.net>
-
- * ext/objspace/objspace.c: add a new method `reachable_objects_from_root'.
- ObjectSpace.reachable_objects_from_root returns all objects referred
- from root (called "root objects").
- This feature is for deep object analysis.
-
- * test/objspace/test_objspace.rb: add a test.
-
-Wed Oct 16 15:00:21 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems: Update to RubyGems master b955554. Changes:
-
- Fixed NameError for Gem::Ext due to re-entering file lookup in
- RubyGems' overridden require. Bug by Koichi Sasada.
-
- Fixed possible circular require warning in tests.
-
- Used existing constant for `gem install -g` dependency file list.
-
- * test/rubygems: ditto.
-
-Wed Oct 16 09:42:42 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems: Update to RubyGems master 278d00d. Changes:
-
- Fixes building extensions without a "clean" make rule
-
- Adds gem dependency file autodetection to "gem install -g"
-
- * test/rubygems: Tests for the above.
-
-Wed Oct 16 09:12:23 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems: Update to RubyGems master commit 2a74263. This fixes
- several bugs in RubyGems 2.2.0.preview.1.
-
- * test/rubygems: ditto.
-
-Wed Oct 16 07:25:02 2013 Aman Gupta <ruby@tmm1.net>
-
- * gc.c (gc_mark_roots): rename roots to be categories
- instead of function names.
-
-Tue Oct 15 19:18:13 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.h (rb_objspace_reachable_objects_from_root): added.
- This API provides information which objects are root objects.
- `category' shows what kind of root objects.
-
- * gc.c (gc_mark_roots): separate from gc_marks_body().
-
-Tue Oct 15 17:47:59 2013 Tanaka Akira <akr@fsij.org>
-
- * process.c: Fix a typo. MacOS X doesn't have ENOTSUPP.
-
-Mon Oct 14 12:32:52 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ruby.c (process_options): load statically linked extensions before
- rubygems, because of ext/thread.
-
- * 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.
-
-Mon Oct 14 11:07:51 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/mkmf.rb (have_framework): should append framework options to
- $LIBS, not $LDFLAGS. The former is propagated to exts.mk when
- enable-static-linked-ext.
-
- * lib/mkmf.rb (create_makefile): ranlib on static library, not DLLIB.
-
-Sun Oct 13 23:53:40 2013 Andrew Grimm <andrew.j.grimm@gmail.com>
-
- * vsnprintf.c: Fix spelling from compliment to complement.
- Patch by @agrimm.
-
- * include/ruby/ruby.h: ditto
-
-Sun Oct 13 20:59:27 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm.c (Init_BareVM): initialize defined_module_hash here,
- Init_top_self() is too late to register core classes/modules.
-
- * compile.c (compile_array_): no hash to merge if it is empty.
-
- * vm.c (m_core_hash_merge_kwd): just check keys if only one argument
- is given, without merging.
-
-Sat Oct 12 06:35:01 2013-10-11 Eric Hodel <drbrain@segment7.net>
-
- * lib/rake: Update to rake 10.1.0
- * bin/rake: ditto.
- * test/rake: ditto.
-
- * NEWS: Update NEWS to include rake 10.1.0 and links to release notes.
-
-Sat Oct 12 03:26:04 2013 Koichi Sasada <ko1@atdot.net>
-
- * class.c, variable.c, gc.c (rb_class_tbl): removed.
-
- * vm.c, vm_core.h (rb_vm_add_root_module): added to register as a
- defined root module or class.
- This guard helps mark miss from defined classes/modules they are
- only referred from C's global variables in C-exts.
- Basically, it is extension's bug.
- Register to hash object VM has.
- Marking a hash objects allows generational GC supports.
-
- * gc.c (RGENGC_PRINT_TICK): disable (revert).
-
-Sat Oct 12 03:24:49 2013 Koichi Sasada <ko1@atdot.net>
-
- * vm_method.c (rb_gc_mark_unlinked_live_method_entries):
- revert last commit to introduce debug prints.
-
-Fri Oct 11 21:05:19 2013 Koichi Sasada <ko1@atdot.net>
-
- * internal.h, parse.y: use `full_mark' instead of `full_marking'.
-
-Fri Oct 11 20:58:16 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c: use terminology `full_mark' instead of `minor_gc'
- in mark functions.
-
-Fri Oct 11 20:46:09 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c: use __GNUC__ instead of __GCC__.
-
-Fri Oct 11 20:35:59 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c, parse.y: support generational Symbol related marking.
- Each symbols has String objects respectively to represent
- Symbols.
- These objects are marked only when:
- * full marking
- * new symbols are added
- This hack reduce symbols (related strings) marking time.
- For example, on my Linux environment, the following code
- "20_000_000.times{''}"
- with 40k symbols (similar symbol number on Rails 3.2.14 app,
- @jugyo tells me) boosts, from 7.3sec to 4.2sec.
-
- * internal.h: change prototype of rb_gc_mark_symbols().
-
-Fri Oct 11 19:27:22 2013 Akinori MUSHA <knu@iDaemons.org>
-
- * misc/ruby-electric.el: Import ruby-electric.el 2.0.1 which fixes
- a bug and a flaw with auto-end introduced in the revamp.
-
- * ruby-forward-sexp is inappropriate here because it moves the
- cursor past the keyword.
-
- * Fix a reversed looking-back check in
- ruby-electric--block-beg-keyword-at-point-p.
-
- * Do not add end again if space or return is hit repeatedly
- after a block beginning keyword.
-
-Fri Oct 11 18:12:47 2013 Koichi Sasada <ko1@atdot.net>
-
- * ext/objspace/gc_hook.c: prohibit reentrant.
-
-Fri Oct 11 18:11:34 2013 Koichi Sasada <ko1@atdot.net>
-
- * vm_trace.c (rb_postponed_job_flush): fix bit operation.
-
-Fri Oct 11 17:33:24 2013 Akinori MUSHA <knu@iDaemons.org>
-
- * misc/ruby-electric.el: Import ruby-electric.el 2.0 from
- https://github.com/knu/ruby-electric.el which integrates changes
- from another fork by @qoobaa.
-
- * Allow ruby-electric-mode to be disabled by introducing a
- dedicated key map. Electric key bindings are now defined in
- ruby-electric-mode-map instead of overwriting ruby-mode-map.
-
- * Add ruby-electric-mode-hook.
-
- * Use a remap in binding ruby-electric-delete-backward-char.
-
- * Totally revamp electric keywords and then introduce electric
- return. Modifier keywords are now properly detected making
- use of ruby-mode's indentation level calculator, and
-
- * block-mid keywords (then, else, elsif, when, rescue and
- ensure) also become electric with automatic reindentation.
-
- * Add standardized comments for ELPA integration.
-
- * Fix interaction with smartparens-mode by disabling its end
- keyword completion, since ruby-electric has become more clever
- at it.
-
- * The custom variable `ruby-electric-keywords` is changed to
- `ruby-electric-keywords-alist`, allowing user to fine-grained
- configuration.
-
-Fri Oct 11 16:53:28 2013 Koichi Sasada <ko1@atdot.net>
-
- * vm_trace.c (rb_postponed_job_flush): simplify.
-
-Fri Oct 11 03:36:49 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * thread.c (rb_threadptr_execute_interrupts): flush postponed job only
- once at last.
-
- * vm_trace.c (rb_postponed_job_flush): defer calling postponed jobs
- registered while flushing to get rid of infinite reentrance of
- ObjectSpace.after_gc_start_hook. [ruby-dev:47400] [Bug #8492]
-
-Thu Oct 10 23:04:00 2013 Masaki Matsushita <glass.saga@gmail.com>
-
- * array.c (rb_ary_or): remove unused variables.
-
-Thu Oct 10 23:01:16 2013 Masaki Matsushita <glass.saga@gmail.com>
-
- * array.c (rb_ary_or): use rb_hash_keys().
-
-Thu Oct 10 21:36:16 2013 Masaki Matsushita <glass.saga@gmail.com>
-
- * array.c (rb_ary_compact_bang): use ary_resize_smaller().
-
-Thu Oct 10 17:25:28 2013 Koichi Sasada <ko1@atdot.net>
-
- * vm.c (vm_exec): support :b_return event for "lambda{return}.call".
- [Bug #8622]
-
- * test/ruby/test_settracefunc.rb: add a test.
-
-Thu Oct 10 13:52:37 2013 Koichi Sasada <ko1@atdot.net>
-
- * vm_trace.c (postponed_job): use preallocated buffer.
- Pre-allocate MAX_POSTPONED_JOB (1024) sized buffer
- and use it.
- If rb_postponed_job_register() cause overflow, simply it
- fails and returns 0.
- And maybe rb_postponed_job_register() is signal safe.
-
- * vm_core.h: change data structure.
-
-Thu Oct 10 11:11:33 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm.c (Init_VM): hide also the singleton class of frozen-core, not
- only frozen-core itself.
-
-Thu Oct 10 06:02:08 2013 Koichi Sasada <ko1@atdot.net>
-
- * test/ruby/test_rand.rb: fix r43224. local variable `e' is
- no longer available.
-
-Thu Oct 10 00:02:35 2013 Yusuke Endoh <mame@tsg.ne.jp>
-
- * numeric.c (fix_aref): avoid a possible undefined behavior.
- 1L << 63 on 64-bit platform is undefined, at least, according to
- ISO/IEC 9899 (C99) 6.5.7.
-
-Wed Oct 9 23:57:02 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * object.c (id_for_attr): avoid inadvertent symbol creation.
-
-Wed Oct 9 18:03:01 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm_method.c (rb_attr): preserve encoding of the attribute ID in
- error message.
-
-Wed Oct 9 17:40:16 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * string.c (rb_fstring): because of lazy sweep, str may be unmarked
- already and swept at next time, so mark it for the time being.
- [ruby-core:57756]
-
-Wed Oct 9 13:53:14 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * compar.c (cmp_eq): fail if recursion. [ruby-core:57736] [Bug #9003]
-
- * thread.c (rb_exec_recursive_paired_outer): new function which is
- combination of paired and outer variants.
-
-Wed Oct 9 09:18:14 2013 Koichi Sasada <ko1@atdot.net>
-
- * include/ruby/debug.h,
- vm_backtrace.c (rb_profile_frame_full_label): add new C API
- rb_profile_frame_full_label() which returns label with
- qualified method name.
- Note that in future version of Ruby label() may return
- same return value of full_label().
-
- * ext/-test-/debug/profile_frames.c,
- test/-ext-/debug/test_profile_frames.rb: fix a test for this change.
-
-
-Wed Oct 9 00:55:51 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * load.c (load_lock): display backtrace to $stderr at circular
- require.
-
- * vm_backtrace.c (rb_backtrace_print_to): new function to print
- backtrace to the given output.
-
-Tue Oct 8 21:03:35 2013 Koichi Sasada <ko1@atdot.net>
-
- * vm_backtrace.c, include/ruby/debug.h: add new APIs
- * VALUE rb_profile_frame_method_name(VALUE frame)
- * VALUE rb_profile_frame_qualified_method_name(VALUE frame)
-
- * iseq.c (rb_iseq_klass), internal.h: add new internal function
- rb_iseq_method_name().
-
- * ext/-test-/debug/profile_frames.c (profile_frames),
- test/-ext-/debug/test_profile_frames.rb: add a test.
-
-Tue Oct 8 16:11:11 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * array.c (rb_ary_uniq): use rb_hash_values(), as well as the case no
- block is given.
-
- * internal.h: define rb_hash_values() as internal API.
-
-Tue Oct 8 13:53:21 2013 Masaki Matsushita <glass.saga@gmail.com>
-
- * array.c (rb_ary_uniq): use rb_hash_keys().
-
- * internal.h: define rb_hash_keys() as internal API.
-
- * hash.c (rb_hash_keys): ditto.
-
-Tue Oct 8 10:56:39 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * cont.c: disable FIBER_USE_NATIVE on GNU/Hurd because it doesn't
- support a combination getcontext() and threads. Patch by
- Gabriele Giacone (1o5g4r8o@gmail.com). [Bug #8990][ruby-core:57685]
-
-Tue Oct 8 05:58:12 2013 Tanaka Akira <akr@fsij.org>
-
- * lib/time.rb (Time.strptime): Time.strptime('0', '%s') returns local
- time Time object as Ruby 2.0 and before.
-
-Tue Oct 8 05:40:37 2013 Eric Hodel <drbrain@segment7.net>
-
- * .travis.yml: Rebuild Travis CI's "ruby-head" version on successful
- build. Patch by Konstantin Haase. [Fixes GH-417]
- https://github.com/ruby/ruby/pull/417
-
-Tue Oct 8 04:28:25 2013 Akinori MUSHA <knu@iDaemons.org>
-
- * misc/ruby-mode.el: Use preceding-char/following-char
- (returning 0 at BOF/EOF) instead of char-before/char-after
- (returning nil at BOF/EOF) to avoid error from char-syntax when
- at BOF/EOF.
-
-Tue Oct 8 04:12:45 2013 Akinori MUSHA <knu@iDaemons.org>
-
- * misc/ruby-additional.el (ruby-mode-set-encoding): Add a missing
- else clause to unbreak with `cp932`, etc.
-
- * misc/ruby-mode.el (ruby-mode-set-encoding): Ditto.
-
-Tue Oct 8 03:57:34 2013 Akinori MUSHA <knu@iDaemons.org>
-
- * misc/ruby-additional.el (ruby-mode-set-encoding): Use
- `default-buffer-file-coding-system` if the :prefer-utf-8
- property is not available.
-
- * misc/ruby-mode.el (ruby-mode-set-encoding): Ditto.
-
- * misc/ruby-additional.el (ruby-encoding-map): Override the
- default value.
-
-Tue Oct 8 03:19:19 2013 Akinori MUSHA <knu@iDaemons.org>
-
- * misc/ruby-additional.el (ruby-mode-set-encoding): Add support
- for `prefer-utf-8` which was introduced in Emacs trunk.
-
- * misc/ruby-additional.el (ruby-encoding-map): Add a mapping from
- `japanese-cp932` to `cp932` to fix the problem where saving a
- source file written in Shift_JIS twice would end up having
- `coding: japanese-cp932` which Ruby could not recognize.
-
- * misc/ruby-additional.el (ruby-mode-set-encoding): Add support
- for encodings mapped to nil in `ruby-encoding-map`.
-
- * misc/ruby-additional.el (ruby-encoding-map): Map `us-ascii` and
- `utf-8` to nil by default, meaning they need not be explicitly
- declared in magic comment.
-
- * misc/ruby-additional.el (ruby-encoding-map): Add type
- declaration for better customize UI.
-
- * misc/ruby-mode.el: Ditto for the above.
-
-Tue Oct 8 00:14:53 2013 Akinori MUSHA <knu@iDaemons.org>
-
- * misc/ruby-additional.el: Add a standard header and footer,
- including (provide 'ruby-additional).
-
-Mon Oct 7 22:52:45 2013 Akinori MUSHA <knu@iDaemons.org>
-
- * misc/ruby-electric.el (ruby-electric-space-can-be-expanded-p):
- Return nil to avoid "end" insertion when in smartparens-mode
- that is configured to insert "end" for the same keyword.
-
- * misc/ruby-electric.el (ruby-electric-keywords): New custom
- variable to replace `ruby-electric-simple-keywords-re` with.
-
-Mon Oct 7 22:52:16 2013 Akinori MUSHA <knu@iDaemons.org>
-
- * misc/ruby-additional.el: Use preceding-char/following-char
- (returning 0 at BOF/EOF) instead of char-before/char-after
- (returning nil at BOF/EOF) to avoid error from char-syntax when
- at BOF/EOF.
-
-Mon Oct 7 22:45:20 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * cont.c (FIBER_USE_NATIVE): split long conditions.
-
-Mon Oct 7 20:29:31 2013 Zachary Scott <e@zzak.io>
-
- * lib/time.rb: [DOC] typo in Time.rb overview by @srt32 [Fixes GH-416]
- https://github.com/ruby/ruby/pull/416
-
-Mon Oct 7 20:07:20 2013 Tanaka Akira <akr@fsij.org>
-
- * lib/time.rb (Time.strptime): Use :offset.
- Patch by Felipe Contreras. [ruby-core:57694]
-
-Mon Oct 7 16:47:27 2013 Koichi Sasada <ko1@atdot.net>
-
- * test/-ext-/debug/test_profile_frames.rb: rename class C to
- something long name because one test depends on absence of
- class ::C.
-
-Mon Oct 7 16:33:10 2013 Koichi Sasada <ko1@atdot.net>
-
- * ext/-test-/debug/profile_frames.c:
- test/-ext-/debug/test_profile_frames.rb: add a test for new C-APIs.
-
-Mon Oct 7 16:12:36 2013 Koichi Sasada <ko1@atdot.net>
-
- * include/ruby/debug.h: add backtrace collecting APIs for profiler.
- * int rb_profile_frames(int start, int limit, VALUE *buff, int *lines);
- Collect information of frame information.
-
- * VALUE rb_profile_frame_path(VALUE frame);
- * VALUE rb_profile_frame_absolute_path(VALUE frame);
- * VALUE rb_profile_frame_label(VALUE frame);
- * VALUE rb_profile_frame_base_label(VALUE frame);
- * VALUE rb_profile_frame_first_lineno(VALUE frame);
- * VALUE rb_profile_frame_classpath(VALUE frame);
- * VALUE rb_profile_frame_singleton_method_p(VALUE frame);
- Get information about each frame.
-
- These APIs are designed for profilers, for example, no object allocation,
- and enough information for profilers.
- In this version, this API collects only Ruby level frames.
- This issue will be fixed after Ruby 2.1.
-
- * vm_backtrace.c: implement above APIs.
-
- * iseq.c (rb_iseq_klass): return local_iseq's class.
-
-Mon Oct 7 14:26:01 2013 Koichi Sasada <ko1@atdot.net>
-
- * proc.c: catch up last commit.
- Type of return value of rb_iseq_first_lineno() is now VALUE.
-
- * vm_insnhelper.c (argument_error): ditto.
-
- * vm_method.c (rb_method_entry_make): ditto.
-
-Mon Oct 7 14:07:45 2013 Koichi Sasada <ko1@atdot.net>
-
- * iseq.c, internal.h: change to public (but internal) functions
- * VALUE rb_iseq_path(VALUE iseqval);
- * VALUE rb_iseq_absolute_path(VALUE iseqval);
- * VALUE rb_iseq_label(VALUE iseqval);
- * VALUE rb_iseq_base_label(VALUE iseqval);
- * VALUE rb_iseq_first_lineno(VALUE iseqval);
- And new (temporary) function:
- * VALUE rb_iseq_klass(VALUE iseqval);
-
- * iseq.c. vm_core.h (int rb_iseq_first_lineno): remove
- function `int rb_iseq_first_lineno(const rb_iseq_t *iseq)'.
- Use `VALUE rb_iseq_first_lineno(VALUE iseqval)' instead.
-
- * proc.c. vm_insnhelper.c, vm_method.c: catch up this change.
-
-Sun Oct 6 08:37:39 2013 Zachary Scott <e@zzak.io>
-
- * lib/webrick.rb: [DOC] fix grammar in WEBrick overview [Fixes GH-413]
- Based on patch by @chastell https://github.com/ruby/ruby/pull/413
-
-Sat Oct 5 11:21:01 2013 Aaron Pfeifer <aaron.pfeifer@gmail.com>
-
- * thread.c (terminate_atfork_i): fix locking mutexes not unlocked in
- forks when not tracked in thread. [ruby-core:55102] [Bug #8433]
-
-Fri Oct 4 19:54:09 2013 Zachary Scott <e@zzak.io>
-
- * ext/dbm/dbm.c: [DOC] Fix wrong constant name in DBM by @edward
- [Fixes GH-409] https://github.com/ruby/ruby/pull/409
-
-Fri Oct 4 19:49:42 2013 Aman Gupta <ruby@tmm1.net>
-
- * gc.c: rename heap.free_num as heap.swept_num to clarify meaning and
- avoid confusion with objspace_free_num().
-
-Fri Oct 4 19:02:01 2013 Aman Gupta <ruby@tmm1.net>
-
- * gc.c (objspace_free_num): new method for available/free slots on
- heap. [ruby-core:57633] [Bug #8983]
- * gc.c (gc_stat): change heap_free_num definition to use new method.
- * test/ruby/test_gc.rb: test for above.
-
-Fri Oct 4 18:53:42 2013 Aman Gupta <ruby@tmm1.net>
-
- * gc.c: add rb_objspace.limit to keep accurate count of total heap
- slots [ruby-core:57633] [Bug #8983]
-
-Fri Oct 4 09:32:33 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/csv.rb (CSV.foreach): support enumerator. based on a patch by
- Hanmac (Hans Mackowiak) at [ruby-core:57643]. [ruby-core:57283]
- [Feature #8929]
-
-Thu Oct 3 18:20:47 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * win32/win32.c (console_emulator_p, constat_handle): disable built-in
- console colorizing when console-emulator-like DLL is injected.
- [Feature #8201]
-
-Thu Oct 3 18:01:44 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c: define gc_profile_record::allocated_size if
- CALC_EXACT_MALLOC_SIZE is true.
-
-Thu Oct 3 13:42:51 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * common.mk (yes-test-sample): use RUNRUBY instead of MINIRUBY to set
- runtime library path and run the built ruby. [Bug #8971]
-
-Thu Oct 3 00:17:15 2013 Akinori MUSHA <knu@iDaemons.org>
-
- * misc/ruby-additional.el: Properly quote the body. An unquoted
- body given to eval-after-load is evaluated immediately!
-
-Wed Oct 2 21:38:30 2013 Yusuke Endoh <mame@tsg.ne.jp>
-
- * ext/socket/ifaddr.c (rsock_getifaddrs): fix possible memory leak.
- When a system had no interface, this function used xmalloc for root
- but did not return any reference to it. This patch fixes it by
- immediately returning an empty array if no interface is found.
- Coverity Scan found this bug.
-
-Wed Oct 2 21:37:04 2013 Yusuke Endoh <mame@tsg.ne.jp>
-
- * random.c (make_seed_value): a local array declaration was accessed
- out of scope. Coverity Scan found this bug.
-
-Wed Oct 2 18:52:40 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c: relax GC condition due to malloc_limit.
-
- * gc.c (GC_MALLOC_LIMIT_MAX): change default value
- (256MB -> 512MB) and permit zero to ignore max value.
-
- * gc.c (vm_malloc_increase, vm_xrealloc): do not cause GC on realloc.
-
- * gc.c (gc_before_sweep): change debug messages.
-
-Wed Oct 2 16:26:49 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * io.c (rb_io_close_read): duplex IO should wait its child process
- even after close_read.
-
-Wed Oct 2 15:39:13 2013 NARUSE, Yui <naruse@ruby-lang.org>
-
- * vm_core.h: use __has_attribute() instead of __clang__major__ because
- clang says "Note that marketing version numbers should not be used
- to check for language features, as different vendors use different
- numbering schemes. Instead, use the Feature Checking Macros."
- http://clang.llvm.org/docs/LanguageExtensions.html
-
-Wed Oct 2 14:19:57 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * io.c (rb_io_close_write): detach tied IO for writing before closing
- to get rid of race condition. [ruby-list:49598]
-
- * io.c (rb_io_close_read): keep fptr in write_io to be discarded, to
- fix freed pointer access when it is in use by other threads, and get
- rid of potential memory/fd leak.
-
-Tue Oct 1 23:44:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
-
- * vm_core.h: use __attribute__((unused)) in UNINITIALIZED_VAR on clang
- 4.0+ instead of just on 4.2. Clang has supported the unused attribute
- since before version 4, so this should be safe.
-
-Tue Oct 1 22:03:48 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/tempfile.rb (Tempfile#unlink): finalizer is no longer needed
- after unlinking. patched by by normalperson (Eric Wong) at
- [ruby-core:56521] [Bug #8768]
-
-Tue Oct 1 20:54:33 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * file.c (stat_new_0): constify.
-
- * file.c (rb_stat_new): constify and export. based on a patch by
- Hanmac (Hans Mackowiak) at [ruby-core:53225]. [Feature #8050]
-
-Tue Oct 1 16:03:42 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * include/ruby/ruby.h (ruby_safe_level_4_warning): needed by extension
- libraries which check safe level 4. [ruby-dev:47517] [Bug #8652]
-
-Mon Sep 30 23:14:36 2013 Zachary Scott <e@zzak.io>
-
- * ext/objspace/objspace.c: [DOC] Cleaned up many rdoc formatting
- issues and several duplicate grammar bugs.
-
-Mon Sep 30 23:01:01 2013 Zachary Scott <e@zzak.io>
-
- * ext/objspace/object_tracing.c: [DOC] Adjust rdoc formatting and fix
- small grammar typo
-
-Mon Sep 30 17:28:39 2013 Koichi Sasada <ko1@atdot.net>
-
- * ext/objspace/object_tracing.c: [DOC] add some notes for
- ObjectSpace::trace_object_allocations.
-
-Mon Sep 30 16:46:58 2013 Koichi Sasada <ko1@atdot.net>
-
- * ext/objspace/object_tracing.c: add new 3 methods to control tracing.
- * ObjectSpace::trace_object_allocations_start
- * ObjectSpace::trace_object_allocations_stop
- * ObjectSpace::trace_object_allocations_clear
- And some refactoring.
-
- * test/objspace/test_objspace.rb: add a test for new methods.
-
- * NEWS: add a description for new methods.
-
-Mon Sep 30 11:18:04 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c (rb_gc_disable): do rest_sweep() before disable GC.
- This fix may solve a failure of
- TestTracepointObj#test_tracks_objspace_events
- [test/-ext-/tracepoint/test_tracepoint.rb:43].
-
-Mon Sep 30 10:40:20 2013 Shugo Maeda <shugo@ruby-lang.org>
-
- * vm_method.c (rb_undef): raise a NameError if the original method
- of a refined method is not defined.
-
- * vm_insnhelper.c (rb_method_entry_eq): added NULL check to avoid SEGV.
-
- * test/ruby/test_refinement.rb: related test.
-
-Sun Sep 29 23:45:42 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * parse.y (rb_id_attrset, intern_str): allow junk attrset ID for
- Struct.
-
- * parse.y (rb_id_attrset): fix inconsistency with literals, allow
- ID_ATTRSET and return it itself, but ID_JUNK cannot make ID_ATTRSET.
- and raise a NameError instead of rb_bug() for invalid argument.
-
-Sun Sep 29 18:45:05 2013 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * vm_insnhelper.c (vm_callee_setup_arg_complex, vm_yield_setup_block_args):
- clear keyword arguments to prevent GC bug which occurs
- while marking VM stack.
- [ruby-dev:47729] [Bug #8964]
-
- * test/ruby/test_keyword.rb: tests for the above.
-
-Sat Sep 28 23:25:56 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * math.c (math_log, math_log2, math_log10): fix for Bignum argument.
- numbits should be add only when right shifted.
-
-Sat Sep 28 14:30:29 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * test/dl/test_base.rb: {libc, libm} detection now handle GNU/Hurd
- correctly. Patch by Gabriele Giacone (1o5g4r8o@gmail.com).
- [Bug #8937][ruby-core:57311]
- * test/fiddle/helper.rb: ditto.
-
-Sat Sep 28 00:19:41 2013 Shugo Maeda <shugo@ruby-lang.org>
-
- * ext/curses/extconf.rb: check the size of chtype.
-
- * ext/curses/curses.c (NUM2CH, CH2NUM): use proper macros for
- the size of chtype.
-
- [ruby-core:56090] [Bug #8659]
-
-Fri Sep 27 18:33:23 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c: add two GC tuning environment variables.
- RUBY_GC_MALLOC_LIMIT_MAX and RUBY_GC_MALLOC_LIMIT_GROWTH_FACTOR.
- See r43067 for details.
-
- * gc.c (rb_gc_set_params): refactoring. And change verbose notation.
- Mostly duplicated functions get_envparam_int/double is not cool.
- Please rewrite it.
-
- * test/ruby/test_gc.rb: fix a test for this change.
-
-Fri Sep 27 17:44:41 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c (GC_MALLOC_LIMIT): 8,000,000 -> 8 * 1,024 * 1,024.
-
-Fri Sep 27 17:19:39 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c (gc_before_sweep): cast to size_t to suppress warnings.
-
-Fri Sep 27 17:07:55 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c: add some fine-grained profiling codes to tuning marking phase.
- If you enable RGENGC_PRINT_TICK to 1, then profiling results by RDTSC
- (on x86/amd64 environment) are printed at last.
- Thanks Yoshii-san.
-
-Fri Sep 27 16:32:27 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c: simplify threshold of GC caused by malloc_increase.
- Now, malloc_limit is increased/decreased by mysterious logic.
- This fix simplify malloc_limit increase/decrease logic such as:
- if (malloc_increase > malloc_limit) /* so many malloc */
- malloc_limit += malloc_limit * (GC_MALLOC_LIMIT_FACTOR-1);
- else
- malloc_limit -= malloc_limit * (GC_MALLOC_LIMIT_FACTOR-1)/4;
- Default value of GC_MALLOC_LIMIT_FACTOR is 1.8.
- malloc_limit is bounded by GC_MALLOC_LIMIT_MAX (256MB by default).
- This logic runs at gc_before_sweep(). So there are no effect from
- caused by lazy sweep. And we can remove malloc_increase2.
-
- * gc.c (HEAP_MIN_SLOTS, FREE_MIN, HEAP_GROWTH_FACTOR): rename to
- GC_HEAP_MIN_SLOTS, GC_FREE_MIN, GC_HEAP_GROWTH_FACTOR respectively.
- Check them by `#ifndef' so you can specify these values outside gc.c.
-
- * gc.c (ruby_gc_params_t): add initial_malloc_limit_factor and
- initial_malloc_limit_max.
-
- * gc.c (vm_malloc_prepare, vm_xrealloc): use vm_malloc_increase to
- add and check malloc_increase.
-
-Fri Sep 27 01:05:00 2013 Zachary Scott <e@zzak.io>
-
- * re.c: [DOC] arguments of Regexp::union receive #to_regexp [Bug #8205]
-
-Fri Sep 27 00:39:27 2013 Zachary Scott <e@zzak.io>
-
- * struct.c: [DOC] grammar of ArgumentError in Struct.new [Bug #8936]
- Patch by Prathamesh Sonpatki
-
-Thu Sep 26 22:11:56 2013 Zachary Scott <e@zzak.io>
-
- * ext/bigdecimal/bigdecimal.c: [DOC] several fixes by @chastell
- This includes fixing the capitalization of Infinity, return value of
- example "BigDecimal.new('NaN') == 0.0", and code style in example.
- [Fixes GH-398] https://github.com/ruby/ruby/pull/398
-
-Thu Sep 26 22:08:11 2013 Zachary Scott <e@zzak.io>
-
- * lib/observer.rb: [DOC] syntax improvement in example by @chastell
- [Fixes GH-400] https://github.com/ruby/ruby/pull/400
-
-Thu Sep 26 22:03:15 2013 Zachary Scott <e@zzak.io>
-
- * ext/digest/digest.c: [DOC] typo in overview by @chastell
- [Fixes GH-399] https://github.com/ruby/ruby/pull/399
-
-Thu Sep 26 22:00:42 2013 Zachary Scott <e@zzak.io>
-
- * ext/openssl/ossl.c: [DOC] typo in example by @zoranzaric
- [Fixes GH-401] https://github.com/ruby/ruby/pull/401
-
-Thu Sep 26 21:07:49 2013 Akinori MUSHA <knu@iDaemons.org>
-
- * misc/ruby-electric.el (ruby-electric-delete-backward-char): Add
- support for smartparens-mode.
-
- * misc/ruby-electric.el (ruby-electric-cua-replace-region-maybe)
- (ruby-electric-cua-delete-region-maybe): New functions that
- combine `ruby-electric-cua-*-region` with
- `ruby-electric-cua-*-region-p`, using a slightly better way to
- detect if it is in cua-mode.
-
-Thu Sep 26 16:51:00 2013 Shota Fukumori <her@sorah.jp>
-
- * insns.def (opt_regexpmatch2): Check String#=~ hasn't overridden
- before calling rb_reg_match().
-
- * test/ruby/test_string.rb: Test for above.
-
- * vm.c (vm_init_redefined_flag): Add BOP flag for String#=~
-
- [ruby-core:57385] [Bug #8953]
-
-Thu Sep 26 16:43:42 2013 Akinori MUSHA <knu@iDaemons.org>
-
- * misc/ruby-electric.el: Avoid use of the interactive function
- `self-insert-command` which fires `post-self-insert-hook` and
- `post-command-hook`, to make the ruby-electric commands work
- nicely with those minor modes that make use of them to do
- similar input assistance, such as electric-pair-mode,
- autopair-mode and smartparens-mode.
-
-Thu Sep 26 16:24:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
-
- * insns.def (opt_regexpmatch1): check Regexp#=~ is not defined before
- calling rb_reg_match()
-
- * test/ruby/test_regexp.rb: add test
-
- * vm.c (ruby_vm_redefined_flag): change type to short[]
-
- * vm.c (vm_redefinition_check_flag): return REGEXP_REDEFINED_OP_FLAG if
- klass == rb_cRegexp
-
- * vm.c (vm_init_redefined_flag): setup BOP flag for Regexp#=~
-
- * vm_insnhelper.h: add REGEXP_REDEFINED_OP_FLAG
-
- [ruby-core:57385] [Bug #8953]
-
-Thu Sep 26 14:46:49 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * gc.c (mark_locations_array): disable AddressSanitizer. based on a
- patch by halfie (Ruby Guy) at [ruby-core:57372].
- [ruby-core:56155] [Bug #8680]
-
-Wed Sep 25 17:41:29 2013 Koichi Sasada <ko1@atdot.net>
-
- * README.EXT, README.EXT.ja: remove description of RARRAY_PTR()
- and add a caution of accessing internal data structure directly.
- Also add a description of rb_ary_store().
- [Bug #8399]
-
-Wed Sep 25 17:12:08 2013 Koichi Sasada <ko1@atdot.net>
-
- * include/ruby/ruby.h: rename RARRAY_RAWPTR() to RARRAY_CONST_PTR().
- RARRAY_RAWPTR(ary) returns (const VALUE *) type pointer and
- usecase of this macro is not acquire raw pointer, but acquire
- read-only pointer. So we rename to better name.
- RSTRUCT_RAWPTR() is also renamed to RSTRUCT_CONST_PTR()
- (I expect that nobody use it).
-
- * array.c, compile.c, cont.c, enumerator.c, gc.c, proc.c, random.c,
- string.c, struct.c, thread.c, vm_eval.c, vm_insnhelper.c:
- catch up this change.
-
-Wed Sep 25 16:58:33 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * internal.h (rb_float_value, rb_float_new): move inline functions
- from ruby/ruby.h.
-
- * numeric.c (rb_float_value, rb_float_new): define external functions
- for extension libraries.
-
-Wed Sep 25 15:37:02 2013 Koichi Sasada <ko1@atdot.net>
-
- * test/rdoc/test_rdoc_generator_darkfish.rb: add a guard for windows.
-
-Wed Sep 25 09:53:11 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems: Fix CVE-2013-4363. Miscellaneous minor improvements.
-
- * test/rubygems: Tests for the above.
-
-Tue Sep 24 17:38:56 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * string.c (rb_str_inspect): get rid of out-of-bound access.
-
- * string.c (rb_str_inspect): when a UTF-16/32 string doesn't have a
- BOM, inspect as a dummy encoding string.
-
-Tue Sep 24 17:15:10 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * enc/encdb.c (ENC_DUMMY_UNICODE): make BOM-encodings dummy.
-
- * encoding.c (enc_autoload): keep dummy encodings dummy.
-
-Tue Sep 24 16:41:15 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/win32/lib/win32/registry.rb (Win32::Registry#write): data size
- is in bytes, not chars. terminators should be placed automatically.
-
-Tue Sep 24 16:39:36 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/win32/lib/win32/registry.rb (Win32::Registry#each_value): encode
- name.
-
- * ext/win32/lib/win32/registry.rb (Win32::Registry#each_key): ditto.
-
- * ext/win32/lib/win32/registry.rb (Win32::Registry#export_string):
- encode to locale encoding if default internal is not set.
-
-Tue Sep 24 16:35:09 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/win32/lib/win32/registry.rb (Win32::Registry::API#EnumKey):
- size of the name is in WCHARs, not in bytes.
-
-Tue Sep 24 14:07:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
-
- * gc.c (free_method_cache_entry_i): unused function
-
- * gc.c (rb_free_mc_table): ditto
-
- * internal.h (method_cache_entry_t): unused struct
-
- * vm_method.c (verify_method_cache): remove unused variable
-
- * vm_method.c (rb_method_entry): ditto
-
-Tue Sep 24 14:01:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
-
- * class.c (class_alloc): remove mc_tbl
-
- * gc.c (obj_free): ditto
-
- * internal.h (struct rb_classext_struct): ditto
-
- * method.h (rb_method_entry): remove ent param
-
- * vm_method.c: restore the global method cache. Per class cache tables
- turned out to be far too slow.
-
- [ruby-core:57289] [Bug #8930]
-
-Tue Sep 24 12:51:07 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/win32/lib/win32/registry.rb (Win32::Registry::API): need
- Constants.
-
- * ext/win32/lib/win32/registry.rb (Win32::Registry::API#EnumValue):
- size of the name is in WCHARs, not in bytes.
-
-Mon Sep 23 22:16:09 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * enc/encdb.c, enc/utf_16_32.h (ENC_DUMMY_UNICODE): Unicode with BOM
- must be based on big endian variants, so that actual encodings would
- work. [ruby-core:57318] [Bug #8940]
-
-Mon Sep 23 12:11:26 2013 Masaki Matsushita <glass.saga@gmail.com>
-
- * hash.c (env_each_pair): do not call rb_assoc_new() if
- it isn't needed.
-
-Mon Sep 23 10:42:30 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * test/ruby/test_module.rb (TestModule#test_include_toplevel): test
- for top level main.include. based on a part of the patch by
- kyrylo at [GH-395].
-
-Mon Sep 23 05:07:49 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * include/ruby/intern.h (rb_ary_cat): move from internal.h, since it
- is described in README.EXT.
-
-Sun Sep 22 20:55:20 2013 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * vm_insnhelper.c (vm_make_proc_with_iseq): fix bug message.
- This is follow up to changes in r42637.
-
-Sun Sep 22 20:35:38 2013 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * ext/-test-/tracepoint/tracepoint.c (Init_tracepoint): prevent from GC.
-
-Sun Sep 22 19:00:28 2013 Benoit Daloze <eregontp@gmail.com>
-
- * benchmark/bm_app_answer.rb: revert r42990, benchmark scripts should
- be self-contained and avoid dependencies, especially such small one.
- See https://github.com/ruby/ruby/pull/393#issuecomment-24861301.
-
-Sat Sep 21 20:11:06 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * process.c (rb_fork_internal): remove cloexec setting on pipes
- created by rb_cloexec_pipe. patch by normalperson (Eric Wong) at
- [ruby-core:56523]. [Bug #8769]
-
-Sat Sep 21 01:04:25 2013 Zachary Scott <e@zzak.io>
-
- * lib/benchmark.rb: [DOC] grammar of Benchmark#bm [Bug #8888]
- Patch by Prathamesh Sonpatki
-
-Sat Sep 21 00:50:02 2013 Zachary Scott <e@zzak.io>
-
- * enumerator.c: [DOC] Enumerator#each arguments documentation [GH-388]
- Patch by @kachick https://github.com/ruby/ruby/pull/388
-
-Sat Sep 21 00:49:16 2013 Zachary Scott <e@zzak.io>
-
- * enum.c: [DOC] Enumerable#to_a accepts arguments [GH-388]
- Patch by @kachick https://github.com/ruby/ruby/pull/388
-
-Sat Sep 21 00:47:44 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * string.c (rb_str_conv_enc_opts): make sure to scan coderange to get
- rid of unnecessary conversion.
-
-Sat Sep 21 00:21:08 2013 Zachary Scott <e@zzak.io>
-
- * ext/openssl/lib/openssl/ssl.rb: [DOC] Document OpenSSL::SSLServer
- Based on a patch by Rafal Lisowski [Bug #8758]
-
-Fri Sep 20 23:54:03 2013 Zachary Scott <e@zzak.io>
-
- * lib/gserver.rb: [DOC] correct gserver.rb license [Bug #8913]
-
-Fri Sep 20 23:48:34 2013 Zachary Scott <e@zzak.io>
-
- * ext/psych/yaml/yaml.h: [DOC] merge upstream typo fix by @GreenGeorge
- https://github.com/tenderlove/psych/pull/161
-
-Fri Sep 20 23:37:40 2013 Zachary Scott <e@zzak.io>
-
- * lib/securerandom.rb: [DOC] SecureRandom.hex length argument
- [Fixes GH-394] Patch by @avdi https://github.com/ruby/ruby/pull/394
-
-Fri Sep 20 23:34:48 2013 Zachary Scott <e@zzak.io>
-
- * benchmark/bm_app_answer.rb: removed duplicate code [Fixes GH-393]
- Patch by @gouravtiwari https://github.com/ruby/ruby/pull/393
-
-Fri Sep 20 23:24:08 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * common.mk (btest, btest-ruby, test-knownbug): add $(RUN_OPTS) to
- ruby to be run, so that tests are runnable before making exts.
-
- * common.mk (test-sample): ditto, and use $(MINIRUBY) as rubytest.rb
- does not need extension libraries.
-
- * tool/rubytest.rb: pass $(RUN_OPTS) to testing ruby using --run-opt.
-
-Fri Sep 20 15:01:46 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * parse.y (intern_str): sigil only names are junk, at least one
- identifier character is needed. [ruby-dev:47723] [Bug #8928]
-
- * parse.y (rb_enc_symname_type): fix out of bound access.
-
-Fri Sep 20 14:14:32 2013 Tanaka Akira <akr@fsij.org>
-
- * ext/-test-/printf/printf.c (printf_test_call): Fix an end of buffer
- argument.
-
-Thu Sep 19 16:59:02 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * parse.y (lambda): adjust position to the beginning of the block.
-
-Thu Sep 19 16:25:06 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vsnprintf.c (BSD_vfprintf): initialize cp so that size is 0 in the
- commented case. fix an accidental bug at r16716.
-
-Thu Sep 19 14:33:14 2013 Koichi Sasada <ko1@atdot.net>
-
- * NEWS: add a news for r42974.
-
-Thu Sep 19 14:12:02 2013 Koichi Sasada <ko1@atdot.net>
-
- * include/ruby/ruby.h: make Symbol objects frozen.
- [Feature #8906]
- I want to freeze this good day, too.
-
- * test/ruby/test_eval.rb: catch up this change.
-
- * test/ruby/test_symbol.rb: add a test to check frozen symbols.
-
-Thu Sep 19 09:11:33 2013 Eric Hodel <drbrain@segment7.net>
-
- * NEWS: Update for RDoc 4.1.0.preview.1 and RubyGems 2.2.0.preview.1
-
-Thu Sep 19 08:59:41 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rdoc/markdown/literals_1_9.rb: Fix trailing whitespace.
-
- Previously kpeg (which generates this file) added trailing
- whitespace, but this bug is now fixed.
-
- * lib/rdoc/markdown.rb: ditto.
-
-Thu Sep 19 08:33:14 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rdoc: Update to RDoc 4.1.0.preview.1
-
- RDoc 4.1.0 contains a number of enhancements including a new default
- style and accessibility support. You can see the changelog here:
-
- https://github.com/rdoc/rdoc/blob/v4.1.0.preview.1/History.rdoc
-
- * test/rdoc: ditto.
-
-Thu Sep 19 07:16:26 2013 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych.rb: updating Psych version
-
- * ext/psych/psych.gemspec: ditto
-
-Thu Sep 19 06:39:40 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems/dependency_resolver.rb: Switch the iterative resolver
- algorithm from recursive to iterative to avoid possible
- SystemStackError.
-
-Thu Sep 19 06:29:30 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems: Update to RubyGems 2.2.0.preview.1
-
- This brings several new features to RubyGems summarized here:
-
- https://github.com/rubygems/rubygems/blob/v2.2.0.preview.1/History.txt
-
- * test/rubygems: ditto.
-
-Wed Sep 18 23:14:58 2013 Masaki Matsushita <glass.saga@gmail.com>
-
- * string.c (rb_str_enumerate_lines): make String#each_line and
- #lines not raise invalid byte sequence error when it is called
- with an argument. The patch also causes performance improvement.
- [ruby-dev:47549] [Bug #8698]
-
- * test/ruby/test_m17n_comb.rb (test_str_each_line): remove
- assertions which check that String#each_line and #lines will
- raise an error if the receiver includes invalid byte sequence.
-
-Wed Sep 18 16:32:15 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * proc.c (mnew_from_me): allocate structs after allocated wrapper
- object successfully, to get rid of potential memory leak.
-
-Tue Sep 17 15:54:03 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/shell/command-processor.rb (Shell::CommandProcessor#find_system_command):
- return executable file only, should ignore directories and
- unexecutable files. [ruby-core:57235] [Bug #8918]
-
- * lib/test/unit/assertions.rb (Test::Unit::Assertions#assert_throw):
- assertion for throw. MiniTest::Assertions#assert_throws discards
- the caught value.
-
- * lib/test/unit/assertions.rb (Test::Unit::Assertions#assert_nothing_thrown):
- returns the result of the given block.
-
-Tue Sep 17 12:55:58 2013 Eric Hodel <drbrain@segment7.net>
-
- * doc/regexp.rdoc: [DOC] Replace paragraphs in verbatim sections with
- plain paragraphs to improve readability as ri and HTML.
-
-Mon Sep 16 07:32:35 2013 Tadayoshi Funaba <tadf@dotrb.org>
-
- * complex.c: removed meaningless lines.
- * rational.c: ditto.
-
-Mon Sep 16 00:44:23 2013 Masaki Matsushita <glass.saga@gmail.com>
-
- * ext/socket/mkconstants.rb: define MSG_FASTOPEN.
- [ruby-core:57138] [Feature #8897]
-
-Sun Sep 15 13:31:23 2013 Tadayoshi Funaba <tadf@dotrb.org>
-
- * rational.c (nurat_div): reverted r28844, r28886 and r28887.
- REASON: Nobuyoshi Nakada <nobu@ruby-lang.org>'s commits are buggy.
- So Rational#/ may produce exact number with inexact number.
- Moreover, without reducing.
- REALLY NONSENSE COMMITS.
- A bug report by me [ruby-dev:44710] is also caused by this behavior.
- Kenta Murata <mrkn@mrkn.jp> patched it up.
- But he did not fix the origin.
- Today, the bug is still alive in ruby 1.9.3 and 2.0.0.
-
-Sat Sep 14 06:08:10 2013 Eric Hodel <drbrain@segment7.net>
-
- * dir.c (dir_s_glob): [DOC] Improve wording and layout.
-
- * dir.c (file_s_fnmatch): ditto.
-
- * dir.c (Init_Dir): [DOC] Document File::Constants::FNM_XXX
- constants. (These won't show up in RDoc until a new RDoc is
- imported.)
-
-Thu Sep 12 14:58:58 2013 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/uri/generic.rb (URI::Generic.find_proxy): return nil if
- http_proxy environment variable is empty string.
- [ruby-core:57140] [Bug #8898]
-
-Fri Sep 13 10:40:28 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems: Update to RubyGems 2.1.3
-
- Fixed installing platform gems
-
- Restored concurrent requires
-
- Fixed installing gems with extensions with --install-dir
-
- Fixed `gem fetch -v` to install the latest version
-
- Fixed installing gems with "./" in their files entries
-
- * test/rubygems/test_gem_package.rb: Tests for the above.
-
- * NEWS: Updated for RubyGems 2.1.3
-
-Thu Sep 12 22:40:03 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in (RUBY_CHECK_SIGNEDNESS): macro to check signedness of a
- type.
-
- * configure.in (size_t): must be unsigned.
- [ruby-core:57149] [Feature #8890]
-
-Thu Sep 12 22:37:08 2013 Anton Ovchinnikov <revolver112@gmail.com>
-
- * ext/bigdecimal/bigdecimal.c, ext/digest/md5/md5.c,
- ext/json/fbuffer/fbuffer.h, ext/json/generator/generator.c:
- Eliminate less-than-zero checks for unsigned variables.
- According to section 4.1.5 of C89 standard, size_t is an unsigned
- type. These checks were found with 'cppcheck' static analysis tool.
- [ruby-core:57117] [Feature #8890]
-
-Thu Sep 12 21:35:46 2013 Naohisa Goto <ngotogenome@gmail.com>
-
- * Makefile.in (libruby-static.a): change LDFLAGS order. LDFLAGS may
- include library path that should be specified before LIBS.
- [ruby-dev:47707] [Bug #8901]
-
-Thu Sep 12 20:07:29 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vsnprintf.c (MAXEXP, MAXFRACT): calculate depending on constants in
- float.h.
-
- * vsnprintf.c (BSD_vfprintf): limit length for cvt() to get rid of
- buffer overflow. [ruby-core:57023] [Bug #8864]
-
- * vsnprintf.c (exponent): make expbuf size more precise.
-
-Wed Sep 11 17:30:45 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in (RUNRUBY): append -- only after runruby.rb, not
- cross-compiling baseruby, so that $(RUN_OPT) can be command line
- options. [ruby-dev:47703] [Bug #8893]
-
-Wed Sep 11 07:55:17 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * thread.c (rb_mutex_unlock): Mutex#unlock no longer raise
- an exception even if uses on trap. [Bug #8891]
-
-Tue Sep 10 14:37:01 2013 Shota Fukumori <sorah@tubusu.net>
-
- * vm_backtrace.c (vm_backtrace_to_ary): Ignore the second argument if
- it is nil. [Bug #8884] [ruby-core:57094]
-
- * test/ruby/test_backtrace.rb (test_caller_with_nil_length):
- Test for above.
-
-Tue Sep 10 12:39:17 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * class.c (method_entry_i): should exclude refined methods from
- instance method list. [ruby-core:57080] [Bug #8881]
-
-Tue Sep 10 12:05:04 2013 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-
- * io.c (rb_f_printf): [DOC] add missing parenthesis in rdoc.
-
-Tue Sep 10 10:08:00 2013 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-
- * NEWS: Update RubyGems note.
-
-Tue Sep 10 09:51:22 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems: Update to RubyGems 2.1.0. Fixes CVE-2013-4287.
-
- See http://rubygems.rubyforge.org/rubygems-update/CVE-2013-4287_txt.html
- for CVE information.
-
- See http://rubygems.rubyforge.org/rubygems-update/History_txt.html#label-2.1.0+%2F+2013-09-09
- for release notes.
-
- * test/rubygems: Tests for the above.
-
-Mon Sep 9 21:31:45 2013 Tanaka Akira <akr@fsij.org>
-
- * process.c: Remove spaces between SI prefix and unit to follow
- SI brochure.
- http://www.bipm.org/en/si/si_brochure/
- https://www.nmij.jp/library/units/si/
-
- * time.c: Ditto.
-
- * ext/socket/ancdata.c: Ditto.
-
-Mon Sep 9 16:55:59 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm_method.c (rb_add_refined_method_entry): clear cache in the
- refined class since refining a method entry is modifying the class.
- [ruby-core:57079] [Bug #8880]
-
-Mon Sep 9 09:14:58 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * tool/rbinstall.rb (Gem::Specification#initialize): default date to
- RUBY_RELEASE_DATE. [ruby-core:57072] [Bug #8878]
-
- * tool/rbinstall.rb (Gem::Specification#to_ruby): add date.
-
-Sun Sep 8 16:01:54 2013 Tanaka Akira <akr@fsij.org>
-
- * rational.c (f_gcd): Relax the condition to use GMP.
-
-Sun Sep 8 13:56:38 2013 Masaki Suketa <masaki.suketa@nifty.ne.jp>
-
- * ext/win32ole/win32ole.c (folevariant_initialize): check type of
- element of array.
-
- * test/win32ole/test_win32ole_variant.rb (test_s_new_ary): ditto.
-
-Sat Sep 7 21:33:10 2013 Tanaka Akira <akr@fsij.org>
-
- * math.c (math_log): Test the sign for bignums.
- (math_log2): Ditto.
- (math_log10): Ditto.
-
-Sat Sep 7 20:25:47 2013 Tanaka Akira <akr@fsij.org>
-
- * math.c (math_log): Support bignums bigger than 2**1024.
- (math_log2): Ditto.
- (math_log10): Ditto.
-
-Sat Sep 7 15:36:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
-
- * vm_eval.c (vm_call0): fix prototype, the id parameter should be of
- type ID, not VALUE
-
- * vm_insnhelper.c (check_match): the rb_funcall family of functions
- does not care about refinements. We need to use
- rb_method_entry_with_refinements instead to call === with
- refinements. Thanks to Jon Conley for reporting this bug.
- [ruby-core:57051] [Bug #8872]
-
- * test/ruby/test_refinement.rb: add test
-
-Sat Sep 7 13:49:40 2013 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * variable.c (classname): the name of class that has
- non class id should not be nil. This bug was introduced
- in r36577.
-
- * test/thread/test_cv.rb: test for change.
-
-Sat Sep 7 13:29:22 2013 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * lib/find.rb (Find.find): respect the encodings of arguments.
- [ruby-dev:47530] [Feature #8657]
-
- * test/test_find.rb: add tests.
-
-Sat Sep 7 10:40:32 2013 Tanaka Akira <akr@fsij.org>
-
- * ext/socket/mkconstants.rb (TCP_FASTOPEN): Defined for TCP fast open.
- [ruby-core:57048] [Feature #8871] patch by Masaki Matsushita.
-
-Fri Sep 6 23:53:31 2013 Masaki Matsushita <glass.saga@gmail.com>
-
- * common.mk: use RUNRUBY instead of MINIRUBY because MINIRUBY can't
- require extension libraries. The patch is from nobu
- (Nobuyoshi Nakada).
-
- * ext/thread/extconf.rb: for build ext/thread/thread.c.
-
- * include/ruby/intern.h: ditto.
-
- * thread.c: ditto.
-
- * lib/thread.rb: removed and replaced by ext/thread/thread.c.
-
- * ext/thread/thread.c: Queue, SizedQueue and ConditionVariable
- implementations in C. This patch is based on patches from panaggio
- (Ricardo Panaggio) and funny_falcon (Yura Sokolov) and ko1
- (Koichi Sasada). [ruby-core:31513] [Feature #3620]
-
- * test/thread/test_queue.rb (test_queue_thread_raise): add a test for
- ensuring that killed thread should be removed from waiting threads.
- It is based on a code by ko1 (Koichi Sasada). [ruby-core:45950]
-
-Fri Sep 6 22:47:12 2013 Tanaka Akira <akr@fsij.org>
-
- * configure.in: Define ac_cv_func_clock_getres to yes for mingw*.
-
-Fri Sep 6 21:04:10 2013 Tanaka Akira <akr@fsij.org>
-
- * rational.c: Include gmp.h if GMP is used.
- (GMP_GCD_DIGITS): New macro.
- (rb_gcd_gmp): New function.
- (f_gcd_normal): Renamed from f_gcd.
- (rb_gcd_normal): New function.
- (f_gcd): Invoke rb_gcd_gmp or f_gcd_normal.
-
- * internal.h (rb_gcd_normal): Declared.
- (rb_gcd_gmp): Ditto.
-
- * ext/-test-/rational: New directory.
-
- * test/-ext-/rational: New directory.
-
-Fri Sep 6 14:23:22 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * win32/win32.c (clock_getres): required as well as clock_gettime().
- [ruby-dev:47699] [Bug #8869]
-
-Fri Sep 6 11:45:27 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * transcode.c (rb_econv_append): new function to append a string data
- with converting its encoding. split from rb_econv_substr_append.
-
-Fri Sep 6 02:37:22 2013 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych/visitors/yaml_tree.rb: use double quotes when
- strings start with special characters.
- https://github.com/tenderlove/psych/issues/157
-
- * test/psych/test_string.rb: test for change.
-
-Fri Sep 6 00:05:14 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * class.c (rewrite_cref_stack): remove recursion.
-
-Thu Sep 5 18:05:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
-
- * string.c (fstring_cmp): take string encoding into account when
- comparing fstrings [ruby-core:57037] [Bug #8866]
-
- * test/ruby/test_string.rb: add test
-
-Thu Sep 5 17:25:49 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * string.c (rb_fstring, rb_str_free): use st_data_t instead of VALUE.
-
- * string.c (rb_fstring): get rid of duplicating already frozen object.
-
-Thu Sep 5 14:01:22 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/optparse.rb: The Integer acceptable now allows binary and
- hexadecimal numbers per the documentation. [ruby-trunk - Bug #8865]
-
- DecimalInteger, OctalInteger, DecimalNumeric now validate their input
- before converting to a number. [ruby-trunk - Bug #8865]
-
- * test/optparse/test_acceptable.rb: Tests for the above, tests for all
- numeric acceptables for existing behavior.
-
-Thu Sep 5 13:49:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
-
- * include/ruby/ruby.h: add RSTRING_FSTR flag
-
- * internal.h: add rb_fstring() prototype
-
- * string.c (rb_fstring): deduplicate frozen string literals
-
- * string.c (rb_str_free): delete fstrings from frozen_strings table when
- they are GC'd
-
- * string.c (Init_String): initialize frozen_strings table
-
-Thu Sep 5 12:48:00 2013 Kenta Murata <mrkn@cookpad.com>
-
- * configure.in (with_gmp): set with_gmp no if it is empty.
-
-Thu Sep 5 10:41:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
-
- * vm_insnhelper.c (vm_getivar): use class sequence to check class
- identity, instead of pointer + vm state
-
- * vm_insnhelper.c (vm_setivar): ditto
-
-Thu Sep 5 08:20:58 2013 Tanaka Akira <akr@fsij.org>
-
- * bignum.c (GMP_DIV_DIGITS): New macro.
- (bary_divmod_gmp): New function.
- (rb_big_divrem_gmp): Ditto.
- (bary_divmod_branch): Ditto.
- (bary_divmod): Use bary_divmod_branch.
- (bigdivrem): Ditto.
+Mon Dec 14 11:41:59 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * internal.h (rb_big_divrem_gmp): Declared.
+ * lib/cgi.rb: fix a typo in documentation.
+ [ci skip][fix GH-1140] Patch by @jutaz
-Thu Sep 5 06:22:42 2013 Tanaka Akira <akr@fsij.org>
+Mon Dec 14 11:31:00 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * bignum.c (bary_divmod_normal): Reduce temporary array allocations.
+ * compile.c: fix typos.
+ [ci skip][fix GH-1140] Patch by @jutaz
+ * dir.c: ditto.
+ * gc.c: ditto.
+ * io.c: ditto.
+ * node.h: ditto.
+ * thread_pthread.c: ditto.
+ * vm_insnhelper.c: ditto.
+ * vsnprintf.c: ditto.
-Thu Sep 5 02:17:06 2013 Tanaka Akira <akr@fsij.org>
+Mon Dec 14 11:27:01 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * bignum.c (rb_big_divrem_normal): Add GC guards.
+ * enc/iso_2022_jp.h: fix typos.
+ [ci skip][fix GH-1140] Patch by @jutaz
+ * enc/utf_16_32.h: ditto.
+ * enc/utf_7.h: ditto.
-Thu Sep 5 00:38:32 2013 Tanaka Akira <akr@fsij.org>
+Mon Dec 14 11:25:57 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * bignum.c (rb_big_divrem_normal): New function.
+ * benchmark/bm_app_aobench.rb: fix typos.
+ [ci skip][fix GH-1140] Patch by @jutaz
+ * benchmark/bm_vm_thread_pipe.rb: ditto.
- * internal.h (rb_big_divrem_normal): Declared.
+Sun Dec 13 23:46:10 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/-test-/bignum/div.c: New file.
+ * parse.y (trace_lex_state): trace lex_state changes if yydebug is
+ set, and send the messages to rb_stdout.
- * test/-ext-/bignum/test_div.rb: New file.
+ * parse.y (rb_parser_printf): store YYPRINTF messages per lines
+ so that lex_state traces do not mix.
-Thu Sep 5 00:08:44 2013 Tanaka Akira <akr@fsij.org>
+ * tool/ytab.sed: add parser argument to yy_stack_print too.
- * bignum.c (bigdivrem_normal): Removed.
- (bary_divmod_normal): New function.
- (bary_divmod): Use bary_divmod_normal.
- (bigdivrem): Use bary_divmod_normal.
+Sun Dec 13 20:41:16 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Sep 4 23:02:12 2013 Tanaka Akira <akr@fsij.org>
+ * parse.y (build_lex_state_name, trace_lex_state): lex_state is
+ now bit flags and can be set 2 bits or more.
- * bignum.c (bigdivrem): Useless declaration removed.
+Sun Dec 13 20:26:30 2015 Yuki Yugui Sonoda <yugui@yugui.jp>
-Wed Sep 4 22:56:49 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/ruby/test_syntax.rb: fix typo in test
- * numeric.c (NUM_STEP_GET_INF): split from NUM_STEP_SCAN_ARGS(), since
- inf is not used in num_step_size().
+Sun Dec 13 20:12:14 2015 Yuki Yugui Sonoda <yugui@yugui.jp>
-Wed Sep 4 20:22:43 2013 Tanaka Akira <akr@fsij.org>
+ * parse.y (parse_percent): Allow %-literals in labeled arg as
+ r51624 did for parentheses.
+ Fixes [ruby-core:72084] [Bug #11812].
- * bignum.c (bigdivrem_normal): Add assertions.
+Sun Dec 13 20:02:15 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Wed Sep 4 19:18:40 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ChangeLog: fix a typo
- * internal.h (vm_state_version_t): prefer LONG_LONG to uint64_t.
+Sun Dec 13 19:54:26 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Wed Sep 4 16:28:14 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/lib/envutil.rb: move envutil's assertions under Test::Unit::Assertion.
+ * test/lib/test/unit/assertions.rb: ditto.
- * internal.h (vm_state_version_t): use uint64_t when it is larger than
- LONG_LONG, and fallback to unsigned long.
+Sun Dec 13 19:24:20 2015 Yuki Yugui Sonoda <yugui@yugui.jp>
-Wed Sep 4 15:37:05 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * parse.y (lex_state_name): Make it return the correct names.
+ Add new names to follow r51617; Indices ffs(2) returns are 1-origin.
- * enc/trans/utf8_mac-tbl.rb: fix r42789.
- Fix conversion table and logic. [ruby-dev:47680]
+Sun Dec 13 18:40:45 2015 Yuki Yugui Sonoda <yugui@yugui.jp>
-Wed Sep 4 14:08:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ * parse.y: debug output of lex_state transition if PARSER_DEBUG
- * class.c, compile.c, eval.c, gc.h, insns.def, internal.h, method.h,
- variable.c, vm.c, vm_core.c, vm_insnhelper.c, vm_insnhelper.h,
- vm_method.c: Implement class hierarchy method cache invalidation.
+Sun Dec 13 18:49:25 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- [ruby-core:55053] [Feature #8426] [GH-387]
+ * io.c (parse_mode_enc): preserve encoding of mode string in
+ warnings.
-Wed Sep 4 11:13:40 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * io.c (io_encname_bom_p): check BOM prefix only, not including
+ UTF prefix.
- * string.c (str_gsub): use BEG(0) for whole matched position not
- return value from rb_reg_search(), for \K matching.
- [ruby-dev:47694] [Bug #8856]
+ * io.c (parse_mode_enc): warn BOM with non-UTF encoding.
-Wed Sep 4 11:11:37 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * io.c (parse_mode_enc): fix buffer overflow.
- * configure.in (SOLIBS): LIBRUBY_SO also needs linking with gmp, to
- run worker processes in test-all on non-ELF platforms.
+Sun Dec 13 18:35:57 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Sep 3 23:01:41 2013 Kouhei Sutou <kou@cozmixng.org>
+ * ext/fiddle/function.c (initialize): check all arguments first.
+ reported by Marcin 'Icewall' Noga of Cisco Talos.
- * test/rexml/parser/test_tree.rb
- (TestTreeParser::TestInvalid#test_unmatched_close_tag):
- Compute expected value from test value.
+ * ext/fiddle/conversions.h (PTR2NUM): use signed integer to make
+ Fixnum for negative values.
-Tue Sep 3 22:59:58 2013 Kouhei Sutou <kou@cozmixng.org>
+Sun Dec 13 18:33:41 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/rexml/parsers/treeparser.rb (REXML::Parsers::TreeParser#parse):
- Add source information to parse exception on no close tag error.
- [Bug #8844] [ruby-dev:47672]
- Patch by Ippei Obayashi. Thanks!!!
- * test/rexml/parser/test_tree.rb: Add a test for the above case.
+ * pack.c (pack_pack): always check index range against the
+ receiver array length, which can be shortened by elements
+ conversion. reported by Marcin 'Icewall' Noga of Cisco Talos.
-Tue Sep 3 22:57:57 2013 Kouhei Sutou <kou@cozmixng.org>
+Sun Dec 13 18:28:52 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/rexml/parser/test_tree.rb: Fix test name to describe test
- content.
+ * ext/psych/psych_emitter.c (start_document): should not exceed
+ tags array range.
-Tue Sep 3 22:54:46 2013 Kouhei Sutou <kou@cozmixng.org>
+ * ext/psych/psych_emitter.c (start_document): ensure string before
+ encoding conversion.
- * lib/rexml/parsers/treeparser.rb (REXML::Parsers::TreeParser#parse):
- Remove needless nested parse exception information.
- [Bug #8844] [ruby-dev:47672]
- Reported by Ippei Obayashi. Thanks!!!
- * test/rexml/parser/test_tree.rb: Add a test for the above case.
+Sun Dec 13 18:26:31 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Sep 3 22:03:49 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/tk/tkutil/tkutil.c (tk_hash_kv): check types of array
+ argument. reported by Marcin 'Icewall' Noga of Cisco Talos.
- * string.c (rb_enc_str_new_cstr): new function to create a string from
- the C-string pointer with the specified encoding.
+ * ext/tk/tkutil/tkutil.c (cbsubst_table_setup): check length of
+ argument arrays for each access, as callback methods can modify
+ them. reported by Marcin 'Icewall' Noga of Cisco Talos.
-Tue Sep 3 21:41:37 2013 Akira Matsuda <ronnie@dio.jp>
+ * ext/tk/tkutil/tkutil.c (cbsubst_table_setup): check types of
+ argument elements. reported by Marcin 'Icewall' Noga of Cisco
+ Talos.
- * eval.c (Init_eval): Make Module#include and Module#prepend public
- [Feature #8846]
+Sun Dec 13 18:19:20 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/ruby/test_module.rb (class TestModule): Test for above
+ * ext/win32ole/win32ole.c (ole_vstr2wc): check argument type, vstr
+ must be a String here. reported by Marcin 'Icewall' Noga of
+ Cisco Talos.
-Tue Sep 3 21:35:19 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sun Dec 13 16:41:01 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * thread_pthread.c (sys/dyntune.h): for gettune().
+ * configure.in (BOOTSTRAPRUBY): make BASERUBY full path before
+ building ruby to get rid of unexpectedly invoking built ruby.
+ [ruby-core:72065] [Bug #11807]
- * thread_pthread.c (hpux_attr_getstackaddr): fix missing *.
- [ruby-core:56983] [Feature #8793]
+ * configure.in (BOOTSTRAPRUBY): use MINIRUBY but not BASERUBY
+ unless cross compiling. [ruby-core:72065] [Bug #11807]
-Tue Sep 3 20:12:46 2013 Tanaka Akira <akr@fsij.org>
+Sun Dec 13 14:17:19 2015 Akinori MUSHA <knu@iDaemons.org>
- * bignum.c (GMP_STR2BIG_DIGITS): New macro.
- (str2big_gmp): New function.
- (rb_cstr_to_inum): Use str2big_gmp for big bignums.
- (rb_str2big_gmp): New function.
+ * test/test_shellwords.rb (TestShellwords): Add many more tests
+ for handling whitespace characters and frozenness.
- * internal.h (rb_str2big_gmp): Declared.
+Sun Dec 13 14:16:09 2015 Akinori MUSHA <knu@iDaemons.org>
-Tue Sep 3 19:44:40 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * lib/shellwords.rb (Shellwords#shellsplit): Document that this
+ method does not treat shell metacharacters as such.
- * ext/win32/lib/win32/registry.rb (Win32::Registry#values): added.
- [Feature #7763] [ruby-core:51783]
+Sun Dec 13 12:17:43 2015 Eric Wong <e@80x24.org>
-Tue Sep 3 18:26:00 2013 Akinori MUSHA <knu@iDaemons.org>
+ * lib/shellwords.rb (shellescape): duplicate frozen literal
+ * test/test_shellwords.rb (test_stringification): new test
- * misc/inf-ruby.el (inf-ruby-keys, run-ruby): Add magic autoload
- comments.
+Sun Dec 13 11:47:35 2015 Shugo Maeda <shugo@ruby-lang.org>
- * misc/rdoc-mode.el (rdoc-mode): Ditto.
+ * object.c (rb_inspect): check the default internal encoding as
+ String#inspect do.
+ [ruby-dev:49415] [Bug #11787]
- * misc/ruby-electric.el (ruby-electric-mode): Ditto.
+Sun Dec 13 11:38:12 2015 Akinori MUSHA <knu@iDaemons.org>
- * misc/ruby-style.el (ruby-style-c-mode): Ditto.
+ * lib/shellwords.rb: Turn on frozen-string-literal after fixing
+ shellsplit.
-Tue Sep 3 17:06:15 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+Sun Dec 13 10:44:44 2015 Martin Duerst <duerst@it.aoyama.ac.jp>
- * test/ruby/test_rubyoptions.rb
- (TestRubyOptions::SEGVTest::ExpectedStderr): the URL was changed at
- r42800.
+ * KNOWNBUGS.rb: Fixed typo, made more explicit [ci skip]
-Tue Sep 3 14:48:25 2013 Zachary Scott <e@zzak.io>
+Sun Dec 13 10:26:47 2015 NARUSE, Yui <naruse@ruby-lang.org>
- * lib/thread.rb: [DOC] CV#wait typo by @avdi [Fixes GH-386]
- https://github.com/ruby/ruby/pull/386
+ * ext/openssl/ossl_ssl.c (ssl_npn_select_cb_common): fix parsing
+ protocol list.
+ The protocol list from OpenSSL is not null-terminated.
+ patched by Kazuki Yamaguchi [Bug #11810] [ruby-core:72082]
-Tue Sep 3 14:37:53 2013 Zachary Scott <e@zzak.io>
+Sun Dec 13 06:40:30 2015 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
- * error.c: [DOC] Update bug tracker url by @ScotterC [Fixes GH-390]
- https://github.com/ruby/ruby/pull/390
+ * lib/ostruct.rb: Have OpenStruct#dig raise if argument is not a
+ symbol
+ nor a string. See [#11762]
-Tue Sep 3 12:45:23 2013 Tanaka Akira <akr@fsij.org>
+Sun Dec 13 00:05:42 2015 Shugo Maeda <shugo@ruby-lang.org>
- * bignum.c (rb_str2big_poweroftwo): New function.
- (rb_str2big_normal): Ditto.
- (rb_str2big_karatsuba): Ditto.
+ * vm_insnhelper.c (vm_call_method_missing): method_missing should
+ not be refined.
+ [ruby-core:72080] [Bug #11809]
- * internal.h (rb_str2big_poweroftwo): Declared.
- (rb_str2big_normal): Ditto.
- (rb_str2big_karatsuba): Ditto.
+Sat Dec 12 23:00:17 2015 NARUSE, Yui <naruse@ruby-lang.org>
- * ext/-test-/bignum/str2big.c: New file.
+ * ext/nkf/nkf-utf8/nkf.c: Merge nkf 2.1.4.
- * test/-ext-/bignum/test_str2big.rb: New file.
+Sat Dec 12 18:52:26 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/-test-/bignum/depend: Add the dependency for str2big.c.
+ * object.c (rb_obj_dig): raise TypeError if an element does not
+ have #dig method. [ruby-core:71798] [Bug #11762]
-Tue Sep 3 12:09:08 2013 Tanaka Akira <akr@fsij.org>
+Sat Dec 12 17:59:07 2015 Yuichiro Kaneko <yui-knk@ruby-lang.org>
- * process.c (rb_clock_gettime): Support times() based monotonic clock.
- (rb_clock_getres): Ditto.
+ * test/ruby/test_regexp.rb: Add test cases for `$KCODE` and `$=` warning
+ [Misc #11770][ruby-dev:49398]
-Tue Sep 3 12:03:02 2013 Tanaka Akira <akr@fsij.org>
+Sat Dec 12 17:11:57 2015 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
- * bignum.c (str2big_scan_digits): Extracted from rb_cstr_to_inum.
+ * doc/NEWS-0.2.2: add description about incompatible change in Hash
+ duplicated key overriding policy. [Bug #10315] [Bug #11501]
-Tue Sep 3 11:23:57 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+Sat Dec 12 07:44:38 2015 Eric Wong <e@80x24.org>
- * win32/win32.c (rb_w32_select_with_thread): rounding up the fraction of
- tv_usec instead of rounding down.
- this change is an experiment to get rid of failures on vc10-x64 CI.
+ * io.c (do_io_advise): do not raise on ENOSYS
+ * test/ruby/test_io.rb (test_advise): do not skip on Errno::ENOSYS
+ (test_advise_pipe): ditto
+ [ruby-core:72066] [Feature #11806]
-Tue Sep 3 11:00:28 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+Sat Dec 12 07:05:29 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * win32/win32.c (do_select): constify timeout.
+ * enc/windows_1252.c: separate from ISO-8859-1 to fix 0x80..0x9e
+ range. [ruby-core:64049] [Bug #10097]
- * win32/win32.c (rb_w32_select_with_thread): constify 10ms wait and
- 0ms wait structs.
+Fri Dec 11 23:33:40 2015 Yusuke Endoh <mame@ruby-lang.org>
-Tue Sep 3 10:03:42 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * sample/trick2015/: added the award-winning entries of TRICK 2015.
+ See https://github.com/tric/trick2015 for the contest outline.
- * test/openssl/test_pair.rb
- (OpenSSL::TestPair#test_write_nonblock_no_exceptions): on some CIs
- such as Debian 6.0, Ubuntu 10.04, CentOS and vc10-x64 (maybe depend
- on OpenSSL version), writing to SSLSocket after SSL_ERROR_WANT_WRITE
- causes SSL_ERROR_SSL "bad write retry".
+Fri Dec 11 17:59:05 2015 Eric Wong <e@80x24.org>
-Tue Sep 3 08:20:46 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * insns.def (opt_case_dispatch): avoid converting Infinity
+ * test/ruby/test_optimization.rb (test_opt_case_dispatch_inf): new
+ [ruby-dev:49423] [Bug #11804]'
- * enc/trans/utf8_mac-tbl.rb: update conversion table to recent OS X.
- Previous table is used on Mac OS X 10.1 or prior.
- This table is used on 10.2 or later. [ruby-dev:47680]
+Fri Dec 11 16:48:57 2015 Eric Wong <e@80x24.org>
-Tue Sep 3 07:49:25 2013 Akinori MUSHA <knu@iDaemons.org>
+ * hash.c (rb_num_hash_start): avoid pathological behavior
+ [ruby-core:72028] [Feature #11405]
- * numeric.c (NUM_STEP_SCAN_ARGS): On second thought, keep
- Numeric#step backward compatible in that it raises TypeError
- when nil is given as second argument.
+Fri Dec 11 11:58:46 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * test/ruby/test_float.rb (TestFloat#test_num2dbl): Revert.
+ * NEWS: Mentioned rubygems-2.5.1
- * test/ruby/test_numeric.rb (TestNumeric#test_step): Fix test
- cases for the above change.
+Fri Dec 11 11:52:39 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Tue Sep 3 07:39:58 2013 Tanaka Akira <akr@fsij.org>
+ * lib/rubygems: Update to RubyGems 2.5.1
+ * test/rubygems: ditto.
- * bignum.c (bytes_2comp): Define it only for little endian
- environment.
+Fri Dec 11 11:38:14 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Sep 3 07:31:29 2013 Akinori MUSHA <knu@iDaemons.org>
+ * compile.c (iseq_compile_each, ibf_load_object_hash): rehash
+ case-dispatch hash to reduce collisions.
+ http://d.hatena.ne.jp/ku-ma-me/20151210
- * numeric.c (NUM_STEP_SCAN_ARGS): Numeric#step should raise
- TypeError if a non-numeric parameter is given.
+Fri Dec 11 03:44:43 2015 NARUSE, Yui <naruse@ruby-lang.org>
- * test/ruby/test_float.rb (TestFloat#test_num2dbl): Allow nil as
- step, as with the keyword argument.
+ * object.c (rb_inspect): dump inspected result with rb_str_escape()
+ instead of raising Encoding::CompatibilityError. [Feature #11801]
- * test/ruby/test_numeric.rb (TestNumeric#test_step): Add tests for
- nil as step or limit.
+ * string.c (rb_str_escape): added to dump given string like
+ rb_str_inspect without quotes and always dump in US-ASCII
+ like rb_str_dump.
-Tue Sep 3 07:28:49 2013 Tanaka Akira <akr@fsij.org>
+Thu Dec 10 14:59:59 2015 Koichi Sasada <ko1@atdot.net>
- * internal.h (bit_length): Add casts to fix compilation error with
- clang 3.0 -Werror,-Wshorten-64-to-32.
- [ruby-dev:47687] reported by SASADA Koichi.
+ * test/ruby/test_gc.rb (test_expand_heap): relax condition (1->2).
-Tue Sep 3 03:17:26 2013 Koichi Sasada <ko1@atdot.net>
+Thu Dec 10 14:15:59 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * vm_insnhelper.c (vm_search_super_method): use ci->argc instead of
- ci->orig_argc. ci->argc can be changed by splat arguments.
- [ruby-list:49575]
- This fix should be applied to Ruby 2.0.0 series.
+ * cont.c: fix a double word typo.
+ [Bug #11313][ruby-core:69749]
- * test/ruby/test_super.rb: add a test for above.
+Thu Dec 10 14:13:34 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Mon Sep 2 23:46:29 2013 Akinori MUSHA <knu@iDaemons.org>
+ * ext/tk/lib/multi-tk.rb: fix typos.
+ [Bug #11764][ruby-core:71800]
- * numeric.c (num_step): Default the limit argument to infinity and
- allow it to be omitted. Keyword arguments (by: and to:) are
- introduced for ease of use. [Feature #8838] [ruby-dev:47662]
- [ruby-dev:42194]
+Thu Dec 10 11:33:34 2015 Eric Wong <e@80x24.org>
- * numeric.c (num_step): Optimize for infinite loop.
+ * compile.c (iseq_compile_each): reduce needless rb_str_dup
+ [ruby-core:72018] <5668DB6E.8000101@ruby-lang.org>
-Mon Sep 2 22:55:59 2013 Tanaka Akira <akr@fsij.org>
+Thu Dec 10 09:32:51 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * bignum.c (ISDIGIT): Unused macro removed.
+ * lib/mkmf.rb, lib/shellwords.rb: disable frozen-string-literal.
+ [ruby-core:72011] [Bug #11800]
-Mon Sep 2 22:49:15 2013 Tanaka Akira <akr@fsij.org>
+Thu Dec 10 06:33:39 2015 Eric Wong <e@80x24.org>
- * bignum.c (str2big_poweroftwo): Extracted from rb_cstr_to_inum.
- (str2big_normal): Ditto.
- (str2big_karatsuba): Ditto.
+ * marshal.c (memsize_dump_arg): remove NULL check
+ (memsize_load_arg): ditto
-Mon Sep 2 14:39:29 2013 Akinori MUSHA <knu@iDaemons.org>
+Thu Dec 10 05:53:18 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ruby.c (Process#setproctitle): [DOC] Fix and improve rdoc.
+ * tool/mkconfig.rb: rbconfig must not be frozen-string-literal to
+ expand CONFIG hash. [ruby-core:72006] [Bug #11798]
- * ruby.c (Process#argv0): [DOC] Improve rdoc.
+Thu Dec 10 05:03:51 2015 Eric Wong <e@80x24.org>
-Mon Sep 2 14:15:00 2013 Kenta Murata <mrkn@cookpad.com>
+ * ext/socket/ifaddr.c (ifaddr_mark): remove empty function
+ (ifaddr_type): pass zero to rb_data_type_t.function.dmark
- * NEWS: fix description of number literal suffixes.
+Thu Dec 10 04:49:16 2015 Eric Wong <e@80x24.org>
-Mon Sep 2 14:01:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ * proc.c (bm_free): remove, use default free
+ (method_data_type): use RUBY_TYPED_DEFAULT_FREE
- * test/rake/test_rake_rules.rb: add space after string literal to
- prevent conflict with string options syntax "foo"opts
+Thu Dec 10 02:01:41 2015 Koichi Sasada <ko1@atdot.net>
- * test/rss/rss-assertions.rb: ditto
+ * compile.c (iseq_compile_each): do not add debug information
+ without --debug or --debug=frozen-string-literal option
+ because String#dup slows down with debug information.
+ [Feature #11725]
-Mon Sep 2 12:28:38 2013 Tanaka Akira <akr@fsij.org>
+ * NEWS: apply about it.
- * test/ruby/test_bignum.rb (test_interrupt_during_to_s): Disable it
- when GMP is used.
+ * test/ruby/test_rubyoptions.rb: catch up this fix with refactoring.
-Mon Sep 2 07:02:10 2013 Tanaka Akira <akr@fsij.org>
+Thu Dec 10 00:06:56 2015 Koichi Sasada <ko1@atdot.net>
- * bignum.c (Init_Bignum): Define Bignum::GMP_VERSION when GMP is used.
+ * iseq.c: rename methods
+ RubyVM::InstructionSequence#to_binary_format -> #to_binary
+ RubyVM::InstructionSequence.from_binary_format -> .load_from_binary
+ RubyVM::InstructionSequence.from_binary_format_extra_data ->
+ .load_from_binary_extra_data
-Mon Sep 2 01:46:14 2013 Tanaka Akira <akr@fsij.org>
+ * iseq.c: fix document of iseq.to_binary.
+ [Fix GH-1134]
- * bignum.c (big2str_generic): Reduce arguments.
- (big2str_gmp): Ditto.
- (rb_big2str1): Follow the above change.
+ * sample/iseq_loader.rb: catch up this change.
-Mon Sep 2 00:08:08 2013 Tanaka Akira <akr@fsij.org>
+ * test/lib/iseq_loader_checker.rb: ditto.
- * process.c (get_mach_timebase_info): Extracted from rb_clock_gettime.
- (rb_clock_gettime): Use get_mach_timebase_info.
- (rb_clock_getres): Support MACH_ABSOLUTE_TIME_BASED_CLOCK_MONOTONIC.
+Wed Dec 9 17:02:03 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun Sep 1 23:30:47 2013 Tanaka Akira <akr@fsij.org>
+ * regparse.h (SET_NTYPE): get rid of breaking strict aliasing.
+ patch by Zarko Todorovski in [ruby-core:71953]. [Bug #11790]
- * bignum.c (GMP_BIG2STR_DIGITS): New constant.
- (big2str_gmp): New function.
- (rb_big2str1): Use big2str_gmp for big bignums.
+Wed Dec 9 16:10:37 2015 Koichi Sasada <ko1@atdot.net>
- * internal.h (rb_big2str_gmp): Declared.
+ * vm.c (rb_vm_cref_in_context): Module#define_method in non-class
+ expression should be public.
+ [Bug #11754]
- * ext/-test-/bignum/big2str.c (big2str_gmp): New method.
+ * test/ruby/test_method.rb: add a test.
-Sun Sep 1 22:37:51 2013 Tanaka Akira <akr@fsij.org>
+Wed Dec 9 14:45:27 2015 Koichi Sasada <ko1@atdot.net>
- * bignum.c (bary_mul_gmp): Use mpz_init and mpz_clear instead of
- mpz_inits and mpz_clears.
- Older GMP don't have them.
+ * gc.c (gc_mark_stacked_objects): fix typo.
+ reported by XIE Zhibang. [Bug #11763]
-Sun Sep 1 21:17:54 2013 Tanaka Akira <akr@fsij.org>
+Wed Dec 9 14:37:51 2015 Shugo Maeda <shugo@ruby-lang.org>
- * test/net/http/test_http.rb (test_bind_to_local_port): Choose an open
- port more reliably.
+ * doc/syntax/refinements.rdoc: remove outdated description.
-Sun Sep 1 20:32:40 2013 Tanaka Akira <akr@fsij.org>
+Wed Dec 9 09:58:09 2015 Koichi Sasada <ko1@atdot.net>
- * bignum.c (big2str_base_poweroftwo): Renamed from
- big2str_base_powerof2.
- (rb_big2str_poweroftwo): New function for test.
- (big2str_generic): Extracted from rb_big2str1.
- (rb_big2str_generic): New function for test.
+ * ext/**/*.c (*_memsize): same as r52986 for extensions.
- * internal.h (rb_big2str_poweroftwo): Declared.
- (rb_big2str_generic): Ditto.
+Wed Dec 9 09:46:19 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * ext/-test-/bignum/big2str.c: New file.
+ * .gitignore: ignored ISeq binary format.
- * test/-ext-/bignum/test_big2str.rb: New file.
+Wed Dec 9 09:34:41 2015 Koichi Sasada <ko1@atdot.net>
-Sun Sep 1 15:21:21 2013 Tanaka Akira <akr@fsij.org>
+ * *.c (*_memsize): do not check ptr.
+ NULL checking is finished Before call of memsize functions.
+ See r52979.
- * bignum.c (big2str_2bdigits): Renamed from big2str_orig.
+Wed Dec 9 09:25:29 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Sun Sep 1 13:02:24 2013 Tanaka Akira <akr@fsij.org>
+ * test/net/smtp/test_response.rb: use Test::Unit. We should use Test::Unit
+ without rubygems and rdoc.
- * bignum.c: Remove BITSPERDIG >= INT_MAX test. The static assertion,
- SIZEOF_BDIGITS <= sizeof(BDIGIT) is enough.
+Wed Dec 9 06:26:23 2015 Colin Kelley <colindkelley@gmail.com>
-Sun Sep 1 11:38:26 2013 Tanaka Akira <akr@fsij.org>
+ * lib/uri/generic.rb: enable frozen_string_literal
+ (split_userinfo): remove explicit .freeze for string literals
+ (check_path): ditto
+ (query): ditto
+ (fragment): ditto
+ (to_s): ditto
+ [ruby-core:71910] [Bug #11759]
- * bignum.c (maxpow_in_bdigit): Removed.
+Wed Dec 9 06:25:47 2015 Eric Wong <e@80x24.org>
-Sun Sep 1 10:30:42 2013 Tanaka Akira <akr@fsij.org>
+ * test/uri/test_generic.rb (to_s): new test
+ [ruby-core:71820]
- * numeric.c (rb_fix_bit_length): Moved from bignum.c.
+Wed Dec 9 02:18:52 2015 Koichi Sasada <ko1@atdot.net>
-Sun Sep 1 09:55:45 2013 Tanaka Akira <akr@fsij.org>
+ * compile.c (ibf_dump_memsize): should check NULL.
- * internal.h (bit_length): Moved from bignum.c.
- (nlz_int): Ditto.
- (nlz_long): Ditto.
- (nlz_long_long): Ditto.
- (nlz_int128): Ditto.
+Wed Dec 9 01:46:35 2015 NAKAMURA Usaku <usa@ruby-lang.org>
-Sun Sep 1 03:32:22 2013 Tanaka Akira <akr@fsij.org>
+ * string.c (rb_str_init): now accepts new option parameter `encoding'.
+ [Feature #11785]
- * bignum.c (bit_length): Renamed from bitsize.
+Wed Dec 9 00:52:37 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun Sep 1 00:07:09 2013 Tanaka Akira <akr@fsij.org>
+ * file.c (rb_stat_wr, rb_stat_ww): call get_stat only once and
+ reduce checking struct. patch by Yuki Kurihara in
+ [ruby-core:71949]. [Misc #11789]
- * bignum.c (rb_big_bit_length): New method.
- (rb_fix_bit_length): Ditto.
- [ruby-core:56247] [Feature #8700]
+Wed Dec 9 00:24:33 2015 Koichi Sasada <ko1@atdot.net>
-Sat Aug 31 22:18:29 2013 Tanaka Akira <akr@fsij.org>
+ * compile.c (iseq_ibf_dump): dump extra data just string length.
- * process.c (rb_clock_getres): New method.
- (timetick2dblnum_reciprocal): New function.
+ * sample/iseq_loader.rb: add using
+ RubyVM::InstructionSequence.from_binary_format_extra_data method
+ (commented out).
- * configure.in: Check clock_getres.
+Mon Dec 9 00:21:19 2015 Yuki Nishijima <mail@yukinishijima.net>
- [ruby-core:56780] [Feature #8809] accepted as a CRuby feature at
- DevelopersMeeting20130831Japan
- https://bugs.ruby-lang.org/projects/ruby/wiki/DevelopersMeeting20130831Japan
+ * gems/bundled_gems: Upgrade the did_you_mean gem to 1.0.0.rc1
-Sat Aug 31 21:02:07 2013 Tanaka Akira <akr@fsij.org>
+Wed Dec 9 00:17:49 2015 Koichi Sasada <ko1@atdot.net>
- * bignum.c: Use GMP to accelerate big Bignum multiplication.
- (bary_mul_gmp): New function.
- (bary_mul): Use bary_mul_gmp.
- (bigsq): Use different threshold with GMP.
+ * compile.c (ibf_load_setup): cast to int.
- * configure.in: Detect GMP.
+Wed Dec 9 00:13:09 2015 Koichi Sasada <ko1@atdot.net>
- [ruby-core:56658] [Feature #8796]
+ * compile.c (ibf_setup_load): rename to ibf_load_setup().
-Sat Aug 31 15:03:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ * compile.c (iseq_load_setup): check binary format.
- * compile.c (NODE_MATCH3): pass CALL_INFO to opt_regexpmatch2
+Tue Dec 8 23:30:07 2015 Naohisa Goto <ngotogenome@gmail.com>
- * insns.def (opt_regexpmatch2): use CALL_SIMPLE_METHOD to call =~ if
- the receiver is not a T_STRING [Bug #8847] [ruby-core:56916]
+ * test/io/console/test_io_console.rb (run_pty): Avoid waiting twice
+ for a process. Fix Errno::ECHILD in TestIO_Console#test_close and
+ TestIO_Console#test_sync.
-Sat Aug 31 14:07:11 2013 Tanaka Akira <akr@fsij.org>
+Tue Dec 8 23:05:47 2015 Koichi Sasada <ko1@atdot.net>
- * lib/securerandom.rb (random_bytes): Use Process.clock_gettime.
+ * compile.c (iseq_ibf_dump): fix for clang type checker.
-Sat Aug 31 00:25:15 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Dec 8 23:04:02 2015 Koichi Sasada <ko1@atdot.net>
- * include/ruby/encoding.h (rb_{ascii8bit,utf8,usascii}_encindex): get
- rid of conflict with macros defined in internal.h.
+ * iseq.c (iseq_s_load): fix mysterious bug.
-Fri Aug 30 22:37:57 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Dec 8 22:31:58 2015 Koichi Sasada <ko1@atdot.net>
- * thread_pthread.c (native_thread_init_stack): wait the creator thread
- to fill machine stack info, if get_stack_of() is available.
+ * introduce new ISeq binary format serializer/de-serializer
+ and a pre-compilation/runtime loader sample.
+ [Feature #11788]
- * thread_pthread.c (native_thread_create): fill the created thread
- stack info after starting, if get_stack_of() is available.
+ * iseq.c: add new methods:
+ * RubyVM::InstructionSequence#to_binary_format(extra_data = nil)
+ * RubyVM::InstructionSequence.from_binary_format(binary)
+ * RubyVM::InstructionSequence.from_binary_format_extra_data(binary)
- * thread_pthread.c (native_thread_create): define attr only if it is
- used, and merge pthread_create() calls.
+ * compile.c: implement body of this new feature.
- * thread_pthread.c (get_main_stack): separate function to get stack of
- main thread.
+ * load.c (rb_load_internal0), iseq.c (rb_iseq_load_iseq):
+ call RubyVM::InstructionSequence.load_iseq(fname) with
+ loading script name if this method is defined.
-Thu Aug 29 18:05:33 2013 Koichi Sasada <ko1@atdot.net>
+ We can return any ISeq object as a result value.
+ Otherwise loading will be continue as usual.
- * struct.c (rb_struct_define_without_accessor_under): added.
- This function is similar to rb_define_class_under() against
- rb_define_class().
+ This interface is not matured and is not extensible.
+ So that we don't guarantee the future compatibility of this method.
+ Basically, you shouldn't use this method.
- * include/ruby/intern.h: add a declaration of this function.
+ * iseq.h: move ISEQ_MAJOR/MINOR_VERSION (and some definitions)
+ from iseq.c.
-Thu Aug 29 17:03:10 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * encoding.c (rb_data_is_encoding), internal.h: added.
- * vm_insnhelper.c (vm_call_method): a method entry refers the based
- class/module, so should search superclass from the origin i-class
- where the entry belongs to, to get rid of infinite loop when zsuper
- in a prepended class/module. [ruby-core:54105] [Bug #8238]
+ * vm_core.h: add several supports for lazy load.
+ * add USE_LAZY_LOAD macro to specify enable or disable of
+ this feature.
+ * add several fields to rb_iseq_t.
+ * introduce new macro rb_iseq_check().
-Thu Aug 29 05:35:58 2013 Eric Hodel <drbrain@segment7.net>
+ * insns.def: some check for lazy loading feature.
- * ext/zlib/zlib.c (zstream_run): Fix handling of deflate streams that
- need a dictionary but are being decompressed by Zlib::Inflate.inflate
- (which has no option to set a dictionary). Now Zlib::NeedDict is
- raised instead of crashing. [ruby-trunk - Bug #8829]
- * test/zlib/test_zlib.rb (TestZlibInflate): Test for the above.
+ * vm_insnhelper.c: ditto.
-Thu Aug 29 02:40:45 2013 Aaron Patterson <aaron@tenderlovemaking.com>
+ * proc.c: ditto.
- * ext/psych/lib/psych/scalar_scanner.rb: invalid floats should be
- treated as strings.
- https://github.com/tenderlove/psych/issues/156
+ * vm.c: ditto.
- * test/psych/test_string.rb: test for change
+ * test/lib/iseq_loader_checker.rb: enabled iff suitable
+ environment variables are provided.
-Wed Aug 28 17:20:07 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/runner.rb: enable lib/iseq_loader_checker.rb.
- * thread_pthread.c (hpux_attr_getstackaddr): basic support for the
- get_stack() under HP-UX. based on the patch by michal@rokos.cz
- (Michal Rokos) at [ruby-core:56645]. [Feature #8793]
+ * sample/iseq_loader.rb: add sample compiler and loader.
-Wed Aug 28 11:24:20 2013 Michal Rokos <michal@rokos.cz>
+ $ ruby sample/iseq_loader.rb [dir]
- * configure.in (sys/pstat.h): fix missing header check for
- missing/setproctitle.c on HP-UX. [ruby-core:56644] [Bug #8792]
+ will compile all ruby scripts in [dir].
+ With default setting, this compile creates *.rb.yarb files
+ in same directory of target .rb scripts.
-Wed Aug 28 04:54:33 2013 Eric Hodel <drbrain@segment7.net>
+ $ ruby -r sample/iseq_loader.rb [app]
- * ext/openssl/ossl_ssl.c (ossl_ssl_read): Replace duplicate
- wait_writable with wait_readable.
+ will run with enable to load compiled binary data.
-Tue Aug 27 17:18:40 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Dec 8 21:21:16 2015 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
- * lib/timeout.rb (Timeout#timeout): skip rescue clause only when no
- exception class is given.
+ * NEWS: mention about Enumerator::Lazy#grep_v.
+ [ruby-core:71845] [Feature #11773]
-Tue Aug 27 17:02:58 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Dec 8 17:36:36 2015 Martin Duerst <duerst@it.aoyama.ac.jp>
- * io.c (copy_stream_body): should write in binary mode. based on a
- patch by godfat (Lin Jen-Shin) at [ruby-core:56556].
- [ruby-core:56518] [Bug #8767]
+ * string.c: removed unused variable
-Tue Aug 27 17:02:33 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Dec 8 16:23:40 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * io.c (copy_stream_body): move common open flags.
+ * enumerator.c (lazy_grep_v): add Enumerator::Lazy#grep_v as well
+ as Enumerable, to enumerate lazily.
+ [ruby-core:71845] [Feature #11773]
-Tue Aug 27 16:56:50 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Dec 8 14:27:07 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * enumerator.c (enumerator_size): use rb_check_funcall() instead of
- respond_to? and call.
+ * error.c (name_err_local_variables): new method
+ NameError#local_variables for internal use only.
+ [Feature #11777]
- * enumerator.c (enumerator_each): ensure that argument array size
- does not overflow at appending.
+Tue Dec 8 14:20:38 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Aug 27 16:46:05 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * marshal.c (w_objivar): skip internal instance variables in
+ T_OBJECT too.
- * array.c (rb_ary_index, rb_ary_rindex): use optimized equality to
- improve performance. [Feature #8820]
+Tue Dec 8 12:58:04 2015 Naohisa Goto <ngotogenome@gmail.com>
- * vm_insnhelper.c (rb_equal_opt): optimized equality function.
+ * test/io/console/test_io_console.rb (test_getpass): s.getpass
+ should be tested. Narrow ensure block. This reverts r52911.
+ [Bug #11780] [ruby-dev:49412]
-Tue Aug 27 16:11:05 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Dec 8 10:40:21 2015 Eric Wong <e@80x24.org>
- * vm_insnhelper.c (opt_eq_func): use RBASIC_CLASS() instead of HEAP_CLASS_OF().
+ * benchmark/bm_vm2_case_lit.rb: new benchmark
+ * compile.c (case_when_optimizable_literal): add nil/true/false
+ * insns.def (opt_case_dispatch): ditto
+ * vm.c (vm_redefinition_check_flag): ditto
+ * vm.c (vm_init_redefined_flag): ditto
+ * vm_core.h: ditto
+ * object.c (InitVM_Object): define === explicitly for nil/true/false
+ * test/ruby/test_case.rb (test_deoptimize_nil): new test
+ * test/ruby/test_optimization.rb (test_opt_case_dispatch): update
+ (test_eqq): new test
+ [ruby-core:71923] [Feature #11769]
+ Original patch by Aaron Patterson <tenderlove@ruby-lang.org>
- * insns.def (opt_plus, opt_minus, opt_mult, opt_div, opt_mod, opt_lt),
- (opt_gt, opt_ltlt, opt_aref, opt_aset, opt_length, opt_size),
- (opt_empty_p, opt_succ): ditto.
+Tue Dec 8 10:19:02 2015 Jake Worth <jakeworth82@gmail.com>
-Tue Aug 27 16:08:26 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * lib/optparse.rb: fix double word typo in the document.
+ [Misc #10608] [Fix GH-1126]
- * vm_eval.c (rb_check_funcall, rb_check_funcall_with_hook): constify
- argv.
+Tue Dec 8 09:03:19 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Aug 27 13:03:33 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/date/date_core.c (d_lite_lshift): should check the argument
+ before negation.
- * ext/stringio/stringio.c (strio_read_nonblock): declare local
- variables at the first of function.
+Tue Dec 8 08:56:16 2015 Eric Wong <e@80x24.org>
-Tue Aug 27 11:51:37 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
+ * insns.def (opt_case_dispatch): check Float#=== redefinition
+ * test/ruby/test_optimization.rb (test_opt_case_dispatch): new
+ [ruby-core:71920] [Bug #11784]
- * enumerator.c: Allow Enumerator size argument to be any callable.
- Patch by Avdi Grimm. [bug #8641] [ruby-core:56032] [fix GH-362]
+Tue Dec 8 03:56:05 2015 Koichi Sasada <ko1@atdot.net>
- * test/ruby/test_enumerator.rb: Test for above
+ * test/lib/iseq_loader_checker.rb: add iseq dumper/loader checker.
+ If you enable this checker (remove `#' in test/runner.rb),
+ you can see comparison results between an original iseq disassembed
+ result and dumped and loaded iseq disassembed result.
-Tue Aug 27 11:46:31 2013 Koichi Sasada <ko1@atdot.net>
+ There are several bugs around there, because of inexact stack depth
+ calculation. Now, I leave these bugs because they are not critical
+ and difficult to solve completely.
- * gc.c (gc_profile_clear): do rest_sweep() before clearing
- profile.current_record.
+ * test/runner.rb: require test/lib/iseq_loader_checker.rb but
+ disabled at default (commented out).
-Tue Aug 27 07:35:05 2013 Aaron Patterson <aaron@tenderlovemaking.com>
+Tue Dec 8 03:45:47 2015 Eric Wong <e@80x24.org>
- * io.c (io_read_nonblock): support non-blocking reads without raising
- exceptions. As in: `io.read_nonblock(size, exception: false)`
- [ruby-core:38666] [Feature #5138]
- * ext/openssl/ossl_ssl.c (ossl_ssl_read_internal): ditto
- * ext/stringio/stringio.c (strio_sysread): ditto
- * io.c (rb_io_write_nonblock): support non-blocking writes without
- raising an exception.
- * ext/openssl/ossl_ssl.c (ossl_ssl_write_internal): ditto
- * test/openssl/test_pair.rb (class OpenSSL): tests
- * test/ruby/test_io.rb (class TestIO): ditto
- * test/socket/test_nonblock.rb (class TestSocketNonblock): ditto
- * test/stringio/test_stringio.rb (class TestStringIO): ditto
+ * doc/extension.rdoc: warn about kwargs performance in C
+ [Feature #11339] [ci skip]
-Tue Aug 27 05:24:34 2013 Eric Hodel <drbrain@segment7.net>
+Tue Dec 8 03:44:51 2015 Koichi Sasada <ko1@atdot.net>
- * lib/rubygems: Import RubyGems 2.1.0 Release Candidate
- * test/rubygems: ditto.
+ * iseq.c (iseq_load): disable peephole optimization option
+ because apply it multiple times change the sequence.
+ (iseq != peephole_optimize(load(iseq.to_a)))
-Mon Aug 26 16:24:58 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Dec 8 03:43:21 2015 Koichi Sasada <ko1@atdot.net>
- * parse.y (parser_nextc): warn carriage return in middle of line.
- [ruby-core:56240] [Feature #8699]
+ * compile.c (rb_iseq_build_from_ary): do not allocate table
+ if table_size is 0.
-Mon Aug 26 15:27:39 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Dec 8 03:30:34 2015 Eric Wong <e@80x24.org>
- * lib/timeout.rb (Timeout#timeout): should not be caught by rescue
- clause. [Bug #8730]
+ * ext/socket/unixsocket.c (unix_send_io): document args
+ (unix_recv_io): ditto
+ * test/socket/test_unix.rb (test_fd_passing_class_mode): added
-Mon Aug 26 14:44:26 2013 Koichi Sasada <ko1@atdot.net>
+Tue Dec 08 02:21:35 2015 Koichi Sasada <ko1@atdot.net>
- * array.c (rb_ary_splice): use RARRAY_PTR_USE() without WB because
- there are not new relations.
+ * iseq.c (iseq_translate): at the end of constructing an iseq,
+ call RubyVM::InstructionSequence.translate(iseq) if this method
+ is defined. If the return value is also an object of
+ RubyVM::InstructionSequence, then use it instead of created one.
- * enum.c (enum_sort_by): ditto.
+ For example, this method is useful to test iseq dumper/loader
+ such as RubyVM::InstructionSequence#to_a and rb_iseq_load().
- * struct.c (setup_struct): use RARRAY_RAWPTR().
+ Because this method is for such internal experimental usage,
+ the interface is not matured. For example, this interface has
+ no extensibility. Two or more translators can not run
+ simultaneously.
- * vm_eval.c (yield_under): ditto.
+ So that we don't guarantee future compatibility of this method.
+ Basically, do not use this method.
- * ext/pathname/pathname.c (path_entries): use RARRAY_AREF().
+Tue Dec 8 01:57:13 2015 Aaron Patterson <tenderlove@ruby-lang.org>
- * ext/pathname/pathname.c (path_s_glob): ditto.
+ * ext/psych/*: update psych to 2.0.16
+ * test/psych/*: ditto
-Mon Aug 26 13:11:10 2013 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+Mon Dec 7 23:45:20 2015 Koichi Sasada <ko1@atdot.net>
- * array.c (ary_ensure_room_for_push): fix typo in r42658.
+ * string.c: introduce String#+@ and String#-@ to control
+ String mutability.
+ [Feature #11782]
-Mon Aug 26 12:37:10 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Dec 7 23:39:49 2015 Ben Miller <bjmllr@gmail.com>
- * template/sizes.c.tmpl: generate automatically by extracting
- RUBY_CHECK_SIZEOF from configure.in.
+ * parse.y: add heredoc <<~ syntax. [Feature #9098]
-Mon Aug 26 10:16:59 2013 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+Mon Dec 7 23:06:16 2015 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
- * process.c (gcd_timetick_int): Renamed from gcd_timtick_int.
+ * prelude.rb (IO#read_nonblock): [DOC] add missing options to
+ call-seq. [ruby-core:71627] [Bug #11730]
-Sun Aug 25 21:02:15 2013 Tanaka Akira <akr@fsij.org>
+Mon Dec 7 15:50:50 2015 Martin Duerst <duerst@it.aoyama.ac.jp>
- * sizes.c (Init_sizes): Define the size of clock_t.
+ * .gitignore: added cygruby*.def for Cygwin
-Sun Aug 25 01:47:47 2013 Tanaka Akira <akr@fsij.org>
+Sun Dec 6 19:52:31 2015 Eric Wong <e@80x24.org>
- * bignum.c (BARY_SHORT_MUL): Renamed from BARY_MUL1.
- (bary_short_mul): Renamed from bary_mul1.
+ * include/ruby/intern.h (rb_autoload): deprecate
+ * internal.h (rb_autoload_str): declare
+ * load.c (rb_mod_autoload): use rb_autoload_str
+ * variable.c (rb_autoload): become compatibility wrapper
+ (rb_autoload_str): hoisted out from old rb_autoload
+ [ruby-core:71369] [Feature #11664]
-Sat Aug 24 10:35:09 2013 Tanaka Akira <akr@fsij.org>
+Sun Dec 6 18:25:22 2015 NAKAMURA Usaku <usa@ruby-lang.org>
- * process.c (rb_clock_gettime): The emulated clock names changed.
+ * test/webrick/test_cgi.rb (TestWEBrickCGI#test_cgi): gave up the test
+ of binary path info test on Windows because the test had passed
+ occasionally as the comment said.
-Fri Aug 23 22:22:07 2013 Tanaka Akira <akr@fsij.org>
+Sun Dec 6 15:25:06 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * process.c (rb_clock_gettime): Add a cast to fix compile error by
- -Werror,-Wshorten-64-to-32.
+ * ext/io/console/console.c (console_getpass): add IO#getpass
+ method.
-Fri Aug 23 22:12:13 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sun Dec 6 08:39:05 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * process.c (rb_intern): no symbol cache while initialization.
+ * ext/json/json.gemspec: bump version to json 1.8.3. CRuby already contained
+ upstream changes.
-Fri Aug 23 22:07:45 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ https://github.com/ruby/ruby/commit/4d059bf9f5f10f3d3088de49fc87e5555db7770d
+ https://github.com/flori/json/commit/d4c99de78905d96c3f301f48b2c789943bb3f098
- * configure.in (clock_t): needs time.h.
+ * ext/json/lib/json/version.rb: ditto.
-Fri Aug 23 21:37:28 2013 Tanaka Akira <akr@fsij.org>
+Sat Dec 5 17:48:25 2015 Lars Kanis <lars@greiz-reinsdorf.de>
- * process.c (reduce_factors): New function.
- (timetick2dblnum): Use reduce_factors.
- (timetick2integer): Ditto.
- (make_clock_result): Follow the above change.
- (rb_clock_gettime): Ditto.
+ * tool/fake.rb: Fix cross build when srcdir is an absolute path.
-Fri Aug 23 21:00:55 2013 Tanaka Akira <akr@fsij.org>
+ * Makefile.in: PREP dependency is needed when cross build too, not
+ "-r$(arch)-fake" to be used before created. [Fix GH-1125]
- * process.c (timetick_int_t): Renamed from timetick_giga_count_t.
- (gcd_timtick_int): Renamed from gcd_ul and make the arguments
- timetick_giga_count_t.
- (reduce_fraction): Make the arguments timetick_int_t.
- (timetick2integer): Ditto.
- (make_clock_result): Ditto.
- (timetick2dblnum): Fix the return type.
- (rb_clock_gettime): Use timetick_int_t.
+Sat Dec 5 17:26:24 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Aug 23 20:50:40 2013 Tanaka Akira <akr@fsij.org>
+ * hash.c (env_str_new, env_path_str_new): make default string
+ UTF-8 for the case conversion is not possible. [Bug #8822]
- * process.c (gcd_ul): New function.
- (reduce_fraction): Ditto.
- (reduce_fraction): Ditto.
- (timetick2dblnum): Ditto.
- (timetick2integer): Ditto.
- (make_clock_result): Use timetick2dblnum and timetick2integer.
- (rb_clock_gettime): Follow the make_clock_result change.
+ * hash.c (get_env_cstr): convert non-ASCII string to UTF-8 string.
-Fri Aug 23 18:39:04 2013 Koichi Sasada <ko1@atdot.net>
+ * hash.c (ruby_setenv): use wide char version to put environment
+ variable to deal with non-ASCII value.
- * array.c (ary_make_shared): shared ary as shady. Need more effort to
- make it normal object.
+Sat Dec 5 09:56:50 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * array.c (rb_ary_modify): use RARRAY_PTR_USE() without WB because
- there are not new relations.
+ * ruby_atomic.h (ATOMIC_CAS): old value to be swapped should be
+ same as the destination. immediate value may need type
+ promotion.
- * array.c (ary_ensure_room_for_unshift): use RARRAY_RAWPTR() because
- there are not new relations.
+ * ruby_atomic.h (ATOMIC_SIZE_CAS): fix the argument order of
+ InterlockedCompareExchange64. new value and then old value is
+ the last.
-Fri Aug 23 11:25:57 2013 Koichi Sasada <ko1@atdot.net>
+Sat Dec 5 09:23:34 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * array.c: introduce ARY_SHARED_OCCUPIED(shared).
+ * random.c (fill_random_seed): fix the size to be filled, not the
+ size of element, but the whole size of array.
-Fri Aug 23 11:07:08 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Dec 5 06:03:54 2015 Eric Wong <e@80x24.org>
- * win32/Makefile.sub (config.h): now SIZEOF_CLOCK_T is needed for
- unsigned_clock_t.
+ * vm.c (ruby_vm_verbose_ptr): make static
+ (ruby_vm_debug_ptr): ditto
-Thu Aug 22 22:01:04 2013 Tanaka Akira <akr@fsij.org>
+Sat Dec 5 00:56:29 2015 Naohisa Goto <ngotogenome@gmail.com>
- * process.c (rb_clock_gettime): Strip "s" from unit names.
+ * include/ruby/ruby.h (RB_OBJ_TAINT): follow-up of r52881.
+ Turn into void expression not to use unexpected result.
+ Fix "operands have incompatible types" error with
+ Oracle Solaris Studio 12.x on Solaris.
-Thu Aug 22 20:14:59 2013 Tanaka Akira <akr@fsij.org>
+Fri Dec 4 19:52:52 2015 Martin Duerst <duerst@it.aoyama.ac.jp>
- * process.c (unsigned_clock_t): Defined.
- (rb_clock_gettime): Consider clock_t overflow for
- ISO_C_CLOCK_BASED_CLOCK_PROCESS_CPUTIME_ID.
+ * enc/iso_8859_13.c: Added three missing lower/upper-case
+ character pairs (from Kimihito Matsui)
- * configure.in: Check the size of clock_t.
+Fri Dec 4 18:57:57 2015 Martin Duerst <duerst@it.aoyama.ac.jp>
-Thu Aug 22 16:22:48 2013 Koichi Sasada <ko1@atdot.net>
+ * enc/iso_8859_4.c: Added missing lower/upper-case character
+ pair (U+014A and U+014B, LATIN CAPITAL/SMALL LETTER ENG)
+ (from Kimihito Matsui)
- * compile.c (build_postexe_iseq): fix to setup the local table.
+Fri Dec 4 16:48:19 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Aug 22 15:42:43 2013 Koichi Sasada <ko1@atdot.net>
+ * string.c (rb_obj_as_string): fstring should not be infected.
+ re-apply r52872 and fix a typo.
+ TODO: other frozen strings also may not be.
- * compile.c (rb_iseq_compile_node): accept NODE_IFUNC to support
- custom compilation.
+Fri Dec 4 15:21:45 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * compile.c (NODE_POSTEXE): compile to
- "ONCE{ VMFrozenCore::core#set_postexe{...} }" with a new custom
- compiler `build_postexe_iseq()'.
+ * lib/rubygems: Update to RubyGems 2.5.0+ HEAD(fdab4c4).
+ this version includes #1396, #1397, #1398, #1399
+ * test/rubygems: ditto.
- * vm.c (m_core_set_postexe): remove parameters (passed by a block).
+Fri Dec 4 11:22:40 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Aug 22 06:54:15 2013 Tanaka Akira <akr@fsij.org>
+ * thread.c (rb_thread_setname): name must be ascii-compatible, as
+ pthread APIs do not accept legacy wide char strings.
- * process.c (rb_clock_gettime): Change emulation symbols for
- Process.clock_gettime.
+Thu Dec 3 15:39:21 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Thu Aug 22 06:24:54 2013 Tanaka Akira <akr@fsij.org>
+ * lib/scanf.rb: fixed double words typo.
+ [ci skip][fix GH-1123] Patch by @jwworth
- * process.c (make_clock_result): Extracted from rb_clock_gettime.
+Thu Dec 3 15:37:56 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Wed Aug 21 22:30:51 2013 Tanaka Akira <akr@fsij.org>
+ * test/ruby/test_mixed_unicode_escapes.rb: fixed typo.
+ [fix GH-1122] Patch by @davydovanton
+ * test/ruby/test_object.rb: ditto.
+ * test/socket/test_tcp.rb: ditto.
- * process.c (rb_clock_gettime): clock() based CLOCK_PROCESS_CPUTIME_ID
- emulation implemented.
+Thu Dec 3 15:33:08 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Aug 21 21:02:37 2013 Tanaka Akira <akr@fsij.org>
+ * sprintf.c (rb_str_format): fix wrong shifting position in
+ Rational conversion when not at the beginning of the result.
+ [ruby-core:71806] [Bug #11766]
- * process.c (rb_proc_times): Use RB_GC_GUARD to guard objects from GC.
+Thu Dec 3 14:22:16 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Aug 21 20:33:01 2013 Tanaka Akira <akr@fsij.org>
+ * range.c (range_to_s): should be infected by the receiver.
+ str2 infects by appending. [ruby-core:71811] [Bug #11767]
- * process.c (get_clk_tck): Extracted from rb_proc_times.
- (rb_clock_gettime): times() based CLOCK_PROCESS_CPUTIME_ID emulation
- is implemented.
+Thu Dec 3 11:57:12 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Aug 21 19:31:48 2013 Tanaka Akira <akr@fsij.org>
+ * configure.in: separate SET_CURRENT_THREAD_NAME, which can set
+ the name of current thread only, and SET_ANOTHER_THREAD_NAME,
+ which can set the name of other threads.
- * process.c: POSIX_GETTIMEOFDAY_CLOCK_REALTIME is renamed to
- SUS_GETTIMEOFDAY_CLOCK_REALTIME.
+ * thread.c (rb_thread_setname): use SET_ANOTHER_THREAD_NAME. OS X
+ is not possible to set another thread name.
-Wed Aug 21 19:17:46 2013 Tanaka Akira <akr@fsij.org>
+ * thread_pthread.c (native_set_thread_name, thread_timer): use
+ SET_CURRENT_THREAD_NAME.
- * process.c (rb_clock_gettime): CLOCK_PROCESS_CPUTIME_ID emulation
- using getrusage is implemented.
+Wed Dec 02 22:57:46 2015 Koichi Sasada <ko1@atdot.net>
-Wed Aug 21 17:34:27 2013 Tanaka Akira <akr@fsij.org>
+ * vm_core.h, iseq.h: remove rb_iseq_t::variable_body.
+ Fields in rb_iseq_t::variable_body are contained by
+ rb_iseq_t::body::mark_ary (hidden Array object).
- * gc.c (getrusage_time): Fallback clock_gettime to getrusage when
- clock_gettime fails.
- Reported by Eric Saxby. [ruby-core:56762] [Bug #8805]
+ Index 0 to 2 of mark_ary are reserved by these objects.
-Wed Aug 21 02:32:32 2013 Koichi Sasada <ko1@atdot.net>
+ * iseq.c: catch up this fix.
- * insns.def: fix regexp's once option behavior.
- fix [ruby-trunk - Bug #6701]
+ * compile.c (rb_iseq_original_iseq): trivial rewrite.
- * insns.def: remove `onceinlinecache' and introduce `once' instruction.
- `once' doesn't use `setinlinecache' insn any more.
+Wed Dec 2 17:19:02 2015 Koichi Sasada <ko1@atdot.net>
- * vm_core.h: `union iseq_inline_storage_entry' to store once data.
+ * iseq.h: introduce ISEQ_ORIGINAL_ISEQ() and
+ ISEQ_ORIGINAL_ISEQ_ALLOC() macro.
- * compile.c: catch up above changes.
+ * compile.c: use them to access original iseq buffer.
* iseq.c: ditto.
- * vm.c, vm_insnhelper.c: ditto. fix `m_core_set_postexe()' which
- is depend on `onceinlinecache' insn.
-
- * test/ruby/test_regexp.rb: add tests.
-
- * iseq.c: ISEQ_MINOR_VERSION to 1 (should increment major?)
-
-Wed Aug 21 02:30:15 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c (rb_gcdebug_print_obj_condition): add printing information.
-
-Tue Aug 20 13:38:00 2013 Naohisa Goto <ngotogenome@gmail.com>
-
- * test/gdbm/test_gdbm.rb: skip TestGDBM#test_s_open_lock on Solaris.
- On Solaris (and platforms which do not have flock and have lockf),
- with GDBM 1.10, gdbm_open(3) blocks when opening already locked
- gdbm file. [Bug #8790] [ruby-dev:47631]
-
-Tue Aug 20 02:32:52 2013 Zachary Scott <e@zzak.io>
-
- * lib/test/: [DOC] Document Test::Unit, hide most submodules and
- classes from rdoc. Since lib/test is only present as a compatibility
- layer with the legacy test suite many test/unit users will be using
- minitest or the test/unit gem instead. It is recommended to use one
- of these alternatives for writing new tests.
-
- This patch was based on a patch submitted by Steve Klabnik.
- [ruby-core:56694] [Bug #8778]
-
-Tue Aug 20 02:10:19 2013 Zachary Scott <e@zzak.io>
-
- * lib/rss/rss.rb: [DOC] Document for constants by Steve Klabnik
- [ruby-core:56705] [Bug #8798]
-
-Tue Aug 20 02:01:10 2013 Zachary Scott <e@zzak.io>
-
- * lib/rss/xmlparser.rb: [DOC] Hide legacy constant from rdoc
- Patch by Steve Klabnik [ruby-core:56708] [Bug #8799]
-
-Tue Aug 20 01:52:05 2013 Zachary Scott <e@zzak.io>
-
- * ext/socket/unixserver.c: [DOC] Document #accept
- * ext/socket/tcpserver.c: ditto
- * ext/socket/udpsocket.c: [DOC] Fix indentation of documentation
- * ext/socket/socket.c: ditto
- Patches by David Rodr'iguez [ruby-core:56734] [Bug #8802]
-
-Tue Aug 20 01:19:22 2013 Tanaka Akira <akr@fsij.org>
-
- * configure.in: Define ac_cv_func_clock_gettime to yes for mingw*.
-
-Mon Aug 19 21:31:35 2013 Tanaka Akira <akr@fsij.org>
-
- * include/ruby/defines.h: Fix a compilation error with
- i586-mingw32msvc-gcc of gcc-mingw32 package on Debian squeeze.
- ruby/missing.h should be included before include/ruby/win32.h
- because struct timespec, used in the clock_gettime declaration in
- include/ruby/win32.h, is defined in ruby/missing.h instead of
- system headers.
-
-Mon Aug 19 20:55:12 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c: fix around GC_DEBUG.
-
- * gc.c (RVALUE::line): should be VALUE. On some environment
- (such as mswin64), `int' introduces alignment mismatch.
-
- * gc.c (newobj_of): add an assertion to check VALUE alignment.
-
- * gc.c (aligned_malloc): `&' is low priority than `=='.
-
- * gc.c: define GC_DEBUG everytime and use it as value 0 or 1.
-
-Mon Aug 19 17:43:44 2013 Koichi Sasada <ko1@atdot.net>
-
- * test/ruby/test_fiber.rb: collect garbage fibers immediately.
-
-Mon Aug 19 17:41:49 2013 Koichi Sasada <ko1@atdot.net>
-
- * test/profile_test_all.rb: add `failed?' information.
-
-Mon Aug 19 17:00:53 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * process.c (retry_fork): retry with GC if ENOMEM occurred, to free
- swap/kernel space.
-
-Mon Aug 19 13:28:47 2013 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * include/ruby/win32.h (CLOCK_MONOTONIC): typo.
-
- * win32/win32.c: removed duplicated declarations.
-
-Mon Aug 19 13:03:08 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in (clock_gettime): should not overwrite cache variable
- with different condition. otherwise -lrt is not linked and the link
- fails, after reconfig.
-
-Mon Aug 19 12:56:49 2013 Tanaka Akira <akr@fsij.org>
-
- * process.c (Init_process): Add constants: CLOCK_REALTIME_ALARM and
- CLOCK_BOOTTIME_ALARM.
-
-Sun Aug 18 20:17:41 2013 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * variable.c, vm_method.c: remove dead code.
-
- * test/ruby/test_fiber.rb, test/ruby/test_thread.rb:
- change accordingly.
-
-Sun Aug 18 19:32:26 2013 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * error.c, file.c, gc.c, hash.c, thread.c, variable.c, vm_eval.c, bin/erb:
- $SAFE=4 is obsolete.
-
-Sun Aug 18 14:30:47 2013 Tanaka Akira <akr@fsij.org>
-
- * process.c (rb_clock_gettime): Rename POSIX_TIME_CLOCK_REALTIME to
- ISO_C_TIME_CLOCK_REALTIME.
-
-Sun Aug 18 14:22:45 2013 Tanaka Akira <akr@fsij.org>
-
- * configure.in: Revert r42604. It causes linking librt on systems
- with newer glibc uselessly.
-
-Sun Aug 18 13:18:38 2013 Tanaka Akira <akr@fsij.org>
-
- * process.c (Init_process): Add constants: CLOCK_REALTIME_COARSE,
- CLOCK_MONOTONIC_COARSE and CLOCK_BOOTTIME.
-
-Sun Aug 18 12:41:50 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in (clock_gettime): need to check with -lrt prior to check
- for the function only. otherwise -lrt is not linked and the link
- fails, when ac_cv_func_clock_gettime is cached as yes.
-
-Sun Aug 18 10:05:12 2013 Tanaka Akira <akr@fsij.org>
+ * vm_core.h: rename iseq field to support this fix.
- * bignum.c (rb_big2str1): Make an expression more explicit.
+Wed Dec 2 17:10:32 2015 Koichi Sasada <ko1@atdot.net>
-Sun Aug 18 03:18:45 2013 Tanaka Akira <akr@fsij.org>
+ * iseq.h: introduce ISEQ_FLIP_CNT_INCREMENT() macro.
- * bignum.c (rb_big2str1): Use power_level instead of bitsize(xn).
+ * compile.c (iseq_compile_each): use it.
-Sun Aug 18 00:44:58 2013 Tanaka Akira <akr@fsij.org>
+ * vm_core.h: rename flip_cnt field to support this fix.
- * bignum.c (BIGDIVREM_EXTRA_WORDS): Redefine to 1.
- (bigdivrem_num_extra_words): Removed.
- (bigdivrem_normal): Simplified.
- (big2str_karatsuba): Ditto.
+Wed Dec 2 17:05:15 2015 Koichi Sasada <ko1@atdot.net>
-Sat Aug 17 23:25:19 2013 Benoit Daloze <eregontp@gmail.com>
+ * iseq.h: introduce ISEQ_COVERAGE() and ISEQ_COVERAGE_SET() macro.
- * test/ruby/test_time.rb: use the in_timezone() helper
- and define it at the top with other helpers.
+ * compile.c: use them.
-Sat Aug 17 22:20:47 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * time.c (time_mload): ignore auxiliary data, offset and zone, if
- invalid. [ruby-core:56648] [Bug #8795]
-
-Sat Aug 17 20:11:49 2013 Benoit Daloze <eregontp@gmail.com>
-
- * process.c: [DOC] MACH_ABSOLUTE_TIME_CLOCK_MONOTONIC is an
- available emulation for a monotonic clock on Darwin.
- https://developer.apple.com/library/mac/qa/qa1398/_index.html
-
-Fri Aug 16 18:12:05 2013 Koichi Sasada <ko1@atdot.net>
-
- * test/profile_test_all.rb: fix typo.
-
-Fri Aug 16 18:09:20 2013 Koichi Sasada <ko1@atdot.net>
-
- * test/profile_test_all.rb: remove space characters from test names.
-
-Fri Aug 16 17:32:02 2013 Koichi Sasada <ko1@atdot.net>
-
- * test/profile_test_all.rb: refactoring memory profiling tool for
- test-all.
- Add profiling targets /proc/meminfo and /proc/self/status.
-
- * test/runner.rb: accept other than 'true'.
-
-Fri Aug 16 11:23:35 2013 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * file.c (rb_file_size, rb_file_flock): improve performance of Windows.
-
- * file.c (rb_file_truncate): removed unnecessary #ifdef.
-
- * test/test_file.rb (TestFile#test_truncate_size): added an assertion
- for File#size.
-
-Fri Aug 16 10:07:59 2013 Tanaka Akira <akr@fsij.org>
-
- * bignum.c (bigdivrem_single1): Renamed from bigdivrem_single. Add
- x_higher_bdigit argument.
- (bigdivrem_single): Just call bigdivrem_single1.
- (bigdivrem_restoring): Use bigdivrem_single1 to avoid memmove.
-
-Fri Aug 16 09:17:00 2013 Tanaka Akira <akr@fsij.org>
-
- * bignum.c (bary_small_rshift): Specify the higher BDIGIT instead of
- sign bit.
- (big_shift3): Follow the above change.
-
-Fri Aug 16 02:20:39 2013 Tanaka Akira <akr@fsij.org>
-
- * bignum.c (bary_mul_toom3): Reduce a branch.
-
-Fri Aug 16 02:14:09 2013 NARUSE, Yui <naruse@ruby-lang.org>
-
- * process.c (rb_clock_gettime): add CLOCK_MONOTONIC support on OS X.
- http://developer.apple.com/library/mac/qa/qa1398/_index.html
- [Feature #8658]
-
-Fri Aug 16 01:37:43 2013 Tanaka Akira <akr@fsij.org>
-
- * bignum.c (bigdivrem_single): Use shift when y is a power of two.
-
-Fri Aug 16 01:09:33 2013 Tanaka Akira <akr@fsij.org>
-
- * bignum.c (bigdivrem_restoring): Use bigdivrem_single if non-topmost
- BDIGITs of y are zero.
-
-Fri Aug 16 00:33:12 2013 Tanaka Akira <akr@fsij.org>
-
- * bignum.c (rb_big2str1): Truncate topmost zeros of x.
-
-Fri Aug 16 00:00:57 2013 Tanaka Akira <akr@fsij.org>
-
- * bignum.c (bary_divmod): Simplify an expression.
-
-Thu Aug 15 23:26:12 2013 Tanaka Akira <akr@fsij.org>
-
- * bignum.c (bigdivrem_normal): Remove a local variable.
-
-Thu Aug 15 23:08:32 2013 Tanaka Akira <akr@fsij.org>
-
- * bignum.c (big2str_karatsuba): Use bigdivrem_restoring directly to
- reduce working buffer and memory copy.
- (rb_big2str1): Allocate working buffer for big2str_karatsuba here.
-
-Thu Aug 15 20:51:29 2013 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * io.c, internal.h (rb_io_flush_raw): new function to select calling
- fsync() (on Windows).
-
- * io.c (rb_io_flush_raw): use above function.
-
- * file.c (rb_file_truncate): use above function.
-
- * test/ruby/test_file.rb (TestFile#test_truncate_size): test for
- above changes.
-
-Thu Aug 15 18:39:31 2013 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * win32/win32.c (clock_gettime): improve precision when freq is less
- than and nearly equals 10**9.
-
-Thu Aug 15 17:43:15 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c (gc_lazy_sweep): remove heap_increment() here because heap_inc
- may be 0.
-
-Thu Aug 15 16:59:56 2013 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * io.c (rb_io_rewind): remove fsync() for Windows to improve the
- performance.
-
-Thu Aug 15 16:30:23 2013 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/fileutils/test_fileutils.rb (TestFileUtils#test_rmdir):
- FileUtils.rmdir ignores Errno::ENOTEMPTY, so, in such cases, this
- assertion is nonsense.
-
-Thu Aug 15 15:49:35 2013 Tanaka Akira <akr@fsij.org>
-
- * process.c (rb_clock_gettime): [DOC] FreeBSD 7.1 supports
- CLOCK_THREAD_CPUTIME_ID.
- http://www.freebsd.org/releases/7.1R/relnotes.html
-
-Thu Aug 15 14:30:23 2013 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * include/ruby/win32.h, win32/Makefile.sub, win32/win32.c
- (clock_gettime): [experimental] emulates clock_gettime(2) of posix.
-
-Thu Aug 15 02:32:40 2013 Zachary Scott <e@zzak.io>
-
- * hash.c (rb_hash_aset): [DOC] Document key dup patch by @kachick
- [Fixes GH-382] https://github.com/ruby/ruby/pull/382
-
-Wed Aug 14 14:28:39 2013 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * proc.c (rb_mod_define_method): now they return the symbols of the
- defined methods, not the methods/procs themselves.
- [ruby-dev:42151] [Feature #3753]
-
- * NEWS: documents about above change and def-expr (see r42337).
-
- * test/ruby/test_module.rb: tests about above change.
-
-Wed Aug 14 00:51:14 2013 Tanaka Akira <akr@fsij.org>
-
- * bignum.c (bigdivrem_restoring): xn argument removed.
- (bigdivrem_normal): Follow the above change.
-
-Wed Aug 14 00:18:39 2013 Tanaka Akira <akr@fsij.org>
-
- * bignum.c (big_div_struct): Remove xn and j field. Add zn field.
- (bigdivrem1): Follow the above change.
- (bigdivrem_restoring): Ditto.
-
-Tue Aug 13 23:38:17 2013 Tanaka Akira <akr@fsij.org>
-
- * bignum.c (big_div_struct): ynzero field removed.
- (bigdivrem1): Follow the above change.
- (bigdivrem_restoring): Ditto.
-
-Tue Aug 13 23:01:16 2013 Tanaka Akira <akr@fsij.org>
-
- * bignum.c (bigdivrem_restoring): Extracted from bigdivrem_normal.
-
-Tue Aug 13 22:12:59 2013 Kenichi Kamiya <kachick1@gmail.com>
-
- * random.c (rb_random_ulong_limited): coerce before check negative.
- [Fixes GH-379]
-
-Tue Aug 13 21:52:15 2013 Kenichi Kamiya <kachick1@gmail.com>
-
- * object.c (Init_Object): undef Module#prepend_features on Class, as
- well as Module#append_features. [Fixes GH-376]
-
- * test_class.rb: Added test for above. And ensure type checking
- on similar methods as module_function.
-
-Tue Aug 13 08:52:18 2013 Zachary Scott <e@zzak.io>
-
- * doc/syntax/literals.rdoc: [DOC] String literal concat by @cknadler
- [Fixes GH-380] https://github.com/ruby/ruby/pull/380
-
-Mon Aug 12 23:07:21 2013 Masaya Tarui <tarui@ruby-lang.org>
-
- * gc.c (gc_marks_test): inhibit gc for st's operation.
-
-Mon Aug 12 15:59:50 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * parse.y (parser_whole_match_p): treat CR in middle of a line as a
- mere whitespace.
-
-Mon Aug 12 15:16:58 2013 Koichi Sasada <ko1@atdot.net>
-
- * class.c (rb_prepend_module): make T_ICLASS object shady because
- this T_ICLASS object seems to share method table with other class
- objects. It was causes WB miss.
- TODO: need to know the data structure.
+ * iseq.c: ditto.
- * test/ruby/test_module.rb: add a test for WB miss.
+ * iseq.c (rb_iseq_coverage): added.
-Mon Aug 12 13:47:54 2013 Zachary Scott <e@zzak.io>
+ * thread.c (update_coverage): use rb_iseq_coverage().
- * process.c: [DOC] RDoc formatting of Process.clock_gettime
+ * vm_core.h: rename coverage field name to support this fix.
-Mon Aug 12 13:29:09 2013 Zachary Scott <e@zzak.io>
+Wed Dec 2 17:00:54 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/yaml/dbm.rb: [DOC] Document call-seq for YAML::DBM
+ * encoding.c (enc_name, rb_enc_name_list_i, rb_enc_aliases_enc_i):
+ make fstring instead of making each copies.
-Mon Aug 12 12:57:26 2013 Zachary Scott <e@zzak.io>
+Wed Dec 2 16:32:08 2015 Koichi Sasada <ko1@atdot.net>
- * ext/dbm/extconf.rb: [DOC] Hide from RDoc
- Some libraries might want to document extconf.rb so RDoc treats it
- like any other ruby program. However, DBM users shouldn't care about
- these methods.
+ * iseq.h: introduce ISEQ_COMPILE_DATA() macro.
-Mon Aug 12 12:53:39 2013 Zachary Scott <e@zzak.io>
+ * compile.c, iseq.c: use ISEQ_COMPILE_DATA().
- * ext/dbm/dbm.c: [DOC] Reformat headings of DBM class
+ * vm_core.h: rename compile_data field to support this fix.
-Mon Aug 12 12:46:31 2013 Zachary Scott <e@zzak.io>
+Wed Dec 2 16:27:19 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/yaml.rb, lib/yaml/: [DOC] Document YAML::DBM#key and add
- references to similar methods with more detail. This patch brings
- lib/yaml to 100% documentation coverage.
+ * encoding.c (enc_m_loader): defer finding encoding object not to
+ be infected by marshal source. [ruby-core:71793] [Bug #11760]
-Mon Aug 12 02:51:32 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * marshal.c (r_object0): enable compatible loader on USERDEF
+ class. the loader function is called with the class itself,
+ instead of an allocated object, and the loaded data.
- * ext/readline/readline.c (readline_s_set_input): on OS X with editline,
- Readline.readline doesn't work because readline_get doesn't use
- rl_getc. The difference is introduced by r42402 [ruby-dev:47509]
- [Bug #8644]. Before it rb_io_stdio_file set ifp->stdio_file.
- Therefore add manually setting the value.
+ * marshal.c (compat_allocator_table): initialize
+ compat_allocator_tbl on demand.
- * ext/readline/readline.c (readline_s_set_output): ditto.
+ * object.c (rb_undefined_alloc): extract from rb_obj_alloc.
-Sun Aug 11 23:27:00 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Dec 2 15:12:43 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * file.c (rb_str_encode_ospath): OS path encoding on Mac OS X is also
- fixed.
+ * configure.in: Fixed double negative comments.
+ [Bug #11698][ruby-core:71506]
-Sun Aug 11 22:57:24 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Dec 2 14:55:01 2015 yui-knk <spiketeika@gmail.com>
- * test/ruby/test_require.rb (assert_require_nonascii_path): OS path
- encoding on Windows is fixed, so encoding of __FILE__ should be it.
- [ruby-core:56498] [Bug #8764]
+ * test/ruby/test_string.rb: removed non executing tests.
+ [Misc #11757][ruby-dev:49397]
-Sun Aug 11 19:11:45 2013 Kouhei Sutou <kou@cozmixng.org>
+Wed Dec 2 11:23:06 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * test/rexml/parser/test_sax2.rb: Expand abbreviated class name.
+ * lib/csv.rb: enable frozen_string_literal.
+ [fix GH-1116] Patch by @marshall-lee
-Sun Aug 11 19:06:03 2013 Kouhei Sutou <kou@cozmixng.org>
+Wed Dec 2 10:36:25 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * lib/rexml/sax2listener.rb (REXML::SAX2Listener#notationdecl): Fix
- wrong number of arguments in the template listener.
- [Bug #8731] [ruby-dev:47582]
- Reported by Ippei Obayashi.
- * test/rexml/parser/test_sax2.rb: Add tests for parsing notation
- declarations with SAX2 API.
+ * ext/bigdecimal/bigdecimal.c: Fix double word typo.
+ [ci skip][fix GH-1120] Patch by @jwworth
-Sun Aug 11 18:44:04 2013 Kouhei Sutou <kou@cozmixng.org>
+Wed Dec 2 07:43:51 2015 Eric Wong <e@80x24.org>
- * lib/rexml/sax2listener.rb (REXML::SAX2Listener#elementdecl): Fix wrong
- examples. [Bug #8731] [ruby-dev:47582]
- Reported by Ippei Obayashi.
+ * ext/openssl/ossl_ssl.c (mSSLExtConfig): make static
+ (eSSLError): ditto
+ (ID_callback_state): ditto
+ (ossl_ssl_ex_vcb_idx): ditto
+ (ossl_ssl_ex_store_p): ditto
+ (ossl_ssl_ex_ptr_idx): ditto
+ * ext/openssl/ossl_ssl.h: remove extern declarations for
+ mSSLExtConfig and eSSLError
-Sun Aug 11 18:42:13 2013 Kouhei Sutou <kou@cozmixng.org>
+Wed Dec 2 07:41:08 2015 Eric Wong <e@80x24.org>
- * lib/rexml/parsers/sax2parser.rb
- (REXML::Parsers::SAX2Parser#handle_entitydecl): Extract.
+ * missing/explicit_bzero.c (explicit_bzero): fixup r52839
+ for compilers with "weak" attribute
-Sun Aug 11 18:40:25 2013 Kouhei Sutou <kou@cozmixng.org>
+Wed Dec 2 06:47:25 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * lib/rexml/parsers/sax2parser.rb (REXML::Parsers::SAX2Parser#parse):
- Fix wrong "%" position in parameter entity declaration event argument.
- * test/rexml/parser/test_sax2.rb: Add tests for the above case.
+ * missing/explicit_bzero.c: add ruby_explicit_bzero_hook_unused
+ for preventing optimization. Inspired from OpenBSD.
-Sun Aug 11 18:08:40 2013 Kouhei Sutou <kou@cozmixng.org>
+Tue Dec 1 23:36:39 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/rexml/parsers/sax2parser.rb (REXML::Parsers::SAX2Parser#parse):
- Support NDATA in external ID entity declaration.
- * test/rexml/parser/test_sax2.rb: Add tests for the above case.
+ * thread.c (rb_thread_setname): allow to reset thread name.
-Sun Aug 11 18:07:39 2013 Kouhei Sutou <kou@cozmixng.org>
+Tue Dec 1 23:14:04 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/rexml/parsers/baseparser.rb
- (REXML::Parsers::BaseParser#pull_event): Support optional NDATA
- in external ID entity declaration.
+ * thread.c (rb_thread_setname): check the argument if valid
+ string. [ruby-core:71774] [Bug #11756]
-Sun Aug 11 17:54:07 2013 Kouhei Sutou <kou@cozmixng.org>
+Tue Dec 1 17:13:41 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * NEWS (REXML::Parsers::SAX2Parser): Add about this change.
- * lib/rexml/parsers/sax2parser.rb (REXML::Parsers::SAX2Parser#parse):
- Fix wrong number of arguments. Document says "an array of the
- entity declaration" but it passes two or more arguments.
- This is a bug but it break backward compatibility.
- Reported by Ippei Obayashi. [Bug #8731] [ruby-dev:47582]
- * lib/rexml/sax2listener.rb (REXML::SAX2Listener#entitydecl): ditto.
- The listener template accepted two arguments.
- * test/rexml/parser/test_sax2.rb: Add tests for external ID case.
+ * string.c (rb_string_value_cstr): should not raise on frozen
+ string.
-Sun Aug 11 17:41:41 2013 Kouhei Sutou <kou@cozmixng.org>
+Tue Dec 1 09:35:29 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * test/rexml/parser/test_sax2.rb: Add SAX2 API test.
+ * missing/explicit_bzero.c: add a few comment.
-Sun Aug 11 15:10:40 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Dec 1 09:31:19 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * parse.y (rb_enc_symname_type): allow ID_ATTRSET for ID_INSTANCE,
- ID_GLOBAL, ID_CLASS, ID_JUNK too. [Bug #8756]
+ * missing/explicit_bzero.c: add disabling optimization on gcc.
-Sun Aug 11 13:17:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+Tue Dec 1 07:50:33 2015 Eric Wong <e@80x24.org>
- * include/ruby/encoding.h: Reduce ENCODING_INLINE_MAX to 127 as this
- should be sufficient to represent all the encodings Ruby supports.
+ * missing/explicit_bzero.c: new file. define explicit_bzero.
+ Fixup r52806
-Sun Aug 11 11:54:38 2013 Tanaka Akira <akr@fsij.org>
+Thu Oct 22 12:54:43 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * process.c (rb_clock_gettime): New method.
- This is accepted in the meeting:
- https://bugs.ruby-lang.org/projects/ruby/wiki/DevelopersMeeting20130809
- This method is accepted as a CRuby feature.
- I.e. Other Ruby implementations don't need to implement it.
- [ruby-core:56087] [Feature #8658]
+ * thread_pthread.c (register_ubf_list): renamed from
+ add_signal_thread_list.
+ * thread_pthread.c (unregister_ubf_list): renamed
+ from remove_signal_thread_list.
+ * thread_pthread.c (ubf_wakeup_all_threads): renamed from
+ ping_signal_thread_list.
+ * thread_pthread.c (ubf_wakeup_thread): renamed from
+ ubf_select_each.
+ * thread_pthread.c (ubf_threads_empty): renamed from
+ check_signal_thread_list().
+ * thread_pthread.c (ubf_list_lock): renamed from
+ signal_thread_list_lock.
-Sun Aug 11 10:40:48 2013 Zachary Scott <e@zzak.io>
+ * thread_pthread.c (register_ubf_list): large simplification
+ by using ccan/list.h.
+ bonus: removed malloc() and exit(EXIT_FAILURE).
+ * thread_pthread.c (unregister_ubf_list): ditto.
+ * thread_pthread.c (ubf_threads_empty): ditto.
+ * thread_pthread.c (ubf_wakeup_all_threads): ditto.
- * lib/time.rb: [DOC] Correcting rdoc visibility of time.rb constants
- Reported by Tanaka Akira [ruby-core:56517]
+ * thread_pthread.c (print_signal_list): removed.
-Sun Aug 11 04:48:14 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Thu Oct 22 08:03:49 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * file.c (rb_str_normalize_ospath):
- HFS Plus (Mac OS Extended) uses a variant of Normal Form D in which
- U+2000 through U+2FFF, U+F900 through U+FAFF, and U+2F800 through
- U+2FAFF are not decomposed (this avoids problems with round trip
- conversions from old Mac text encodings).
- http://developer.apple.com/library/mac/qa/qa1173/_index.html
- Therefore fix r42457 to exclude the range.
+ * test/ruby/test_rand.rb (TestRand#test_default_seed): add
+ srand case.
-Sun Aug 11 03:26:07 2013 Tanaka Akira <akr@fsij.org>
+Thu Oct 22 06:33:38 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * bignum.c (bitsize): Fix a conditional expression.
+ * random.c (InitVM_Random): move Random::DEFAULT initialization
+ bits to Init_Random_default.
+ * random.c (Init_Random_default): renamed from Init_RandomSeed2.
+ * random.c (Init_RandomSeedCore): renamed from Init_RandomSeed.
-Sun Aug 11 02:44:03 2013 Zachary Scott <e@zzak.io>
+Thu Oct 22 06:20:48 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * lib/time.rb: [DOC] Document constants by @markijbema [Fixes GH-377]
- https://github.com/ruby/ruby/pull/377
+ * random.c (Init_RandomSeed): move all Random::DEFAULT
+ construction bits to Init_RandomSeed2. Random::DEFAULT
+ and Ruby internal hashes are no longer shared their seed.
+ * random.c (Init_RandomSeed2): ditto. And, kill evil
+ rb_obj_reveal() stuff.
-Sun Aug 11 01:28:52 2013 Tanaka Akira <akr@fsij.org>
+ * random.c (init_hashseed): add MT argument.
+ * random.c: (init_siphash): ditto.
- * configure.in: Revert r42458.
- It removes the HAVE_CLOCK_GETTIME from config.h.
- http://www.rubyist.net/~akr/chkbuild/debian/ruby-trunk/log/20130809T044800Z.diff.html.gz
+ * test/ruby/test_rand.rb (TestRand#test_default_seed): new
+ test for Random::DEFAULT::seed.
-Sat Aug 10 13:53:22 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Oct 22 05:23:48 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * parse.y (rb_id_attrset): allow other than ID_ATTRSET.
+ * random.c (init_hashseed, init_siphash): extract initialize
+ functions.
- * parse.y (intern_str): ditto. try stem ID for ID_INSTANCE,
- ID_GLOBAL, ID_CLASS, ID_JUNK too. [Bug #8756]
+Thu Oct 22 01:01:34 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Sat Aug 10 12:49:50 2013 Kouhei Sutou <kou@cozmixng.org>
+ * configure.in: sort AC_CHECK_HEADERS() by alphabetical order.
- * lib/rexml/parsers/baseparser.rb
- (REXML::Parsers::BaseParser::CDATA_END): Use "\A" instead of "^".
- It is not an used constant but I fix it. (Or should I remove it?)
+Thu Oct 22 00:19:07 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Sat Aug 10 12:47:19 2013 Kouhei Sutou <kou@cozmixng.org>
+ * random.c (init_randomseed): remove "initial" argument. It never
+ be used from outside of this function.
- * lib/rexml/parsers/baseparser.rb (REXML::Parsers::BaseParser):
- Fix wrong constant name. "]>" pattern match is the same but
- it is used for "<!DOCTYPE" end mark not "<![CDATA[" end mark.
+Thu Oct 22 00:12:33 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Sat Aug 10 12:43:15 2013 Kouhei Sutou <kou@cozmixng.org>
+ * lib/securerandom.rb (SecureRandom::gen_random): use /dev/urandom
+ for initialize OpenSSL's rand.
- * lib/rexml/parsers/baseparser.rb (REXML::Parsers::BaseParser):
- Use "\A" instead of "^" in document type declaration patterns
- because they are used as the head match in content not the head
- match in line. They don't cause any problems in the current code
- but it should be fixed.
+Wed Oct 21 12:10:04 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Sat Aug 10 12:39:00 2013 Kouhei Sutou <kou@cozmixng.org>
+ * ext/openssl/ossl_rand.c (ossl_rand_bytes): RAND_bytes could
+ be return -1 as an error. Therefore, added error handling.
+ * ext/openssl/ossl_pkey_dsa.c (dsa_generate): ditto.
- * test/rexml/parse/test_document_type_declaration.rb: Add tests for
- parsing document type declaration.
+Wed Oct 21 09:04:09 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Sat Aug 10 12:00:45 2013 Kouhei Sutou <kou@cozmixng.org>
+ * include/ruby/util.h: remove a warning suppression C4723
+ (potential divide by zero) for VisualC++. It's meaningless.
+ Before r26197, there is ruby_div0() in this place and it
+ actually made divide by zero. But now it's just garbage.
- * lib/rexml/parsers/baseparser.rb (REXML::Parsers::BaseParser::SYSTEM):
- Fix loose "head" match regular expression. It doesn't cause any
- problem in the current code but it should be fixed because readers
- may confuse it.
- Patch by Ippei Obayashi. Thanks!!!
+Wed Oct 21 08:23:36 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Sat Aug 10 11:58:24 2013 Kouhei Sutou <kou@cozmixng.org>
+ * random.c: random_raw_seed don't use GRND_NONBLOCK. GRND_NONBLOCK
+ mean the result might not have an enough cryptic strength and
+ easy predictable. That's no good for SecureRandom.
- * test/rexml/parse/test_notation_declaration.rb (#test_system_public):
- Add a test for PUBLIC notation and SYSTEM notation order case.
+Sun Oct 18 17:26:53 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Sat Aug 10 11:31:35 2013 Kouhei Sutou <kou@cozmixng.org>
+ * common.mk: add a rule for explicit_bzero.o.
+ * configure.in: detect explicit_bzero and memset_s.
+ * include/ruby/missing.h: add explicit_bzero.
+ * random.c (init_randomseed): use explicit_bzero() instead of
+ memset(). memset could be eliminated by compiler optimization.
- * lib/rexml/parsers/baseparser.rb (REXML::Parsers::BaseParser::PUBLIC):
- Fix loose "head" match regular expression.
- [Bug #8701] [ruby-dev:47551]
- Patch by Ippei Obayashi. Thanks!!!
- * test/rexml/parse/test_notation_declaration.rb (#test_system_public):
- Add a test for the above case.
+Mon Nov 30 18:46:44 2015 NARUSE, Yui <naruse@ruby-lang.org>
-Sat Aug 10 09:20:21 2013 Zachary Scott <e@zzak.io>
+ * ext/readline/extconf.rb: call dir_config("libedit")
+ if --enable-libedit is specified. [Bug #11751]
+ patched by John Hein
- * NEWS: [DOC] typo in example reported by @moretea
- https://github.com/ruby/ruby/commit/a39e724#commitcomment-3831489
+Mon Nov 30 08:44:29 2015 Eric Wong <e@80x24.org>
-Sat Aug 10 09:19:04 2013 Zachary Scott <e@zzak.io>
+ * variable.c: remove spurious #define for globals
+ [ruby-core:71735] [Feature #11749]
- * proc.c: [DOC] rdoc code formatting
+Sun Nov 29 09:13:03 2015 Conor Landry <clandry94@gmail.com>
-Sat Aug 10 09:12:01 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * NEWS: [DOC] Various grammar corrections and clarifications to
+ increase readability. [Fix GH-1115]
- * parse.y (rb_id_attrset): check if the argument is valid type as an
- attribute.
+Sat Nov 28 19:33:55 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Aug 10 05:44:08 2013 Zachary Scott <e@zzak.io>
+ * parse.y (parser_here_document): store dispatched result of
+ on_tstring_content at the last fragment of a here document.
- * lib/rss/trackback.rb: [DOC] Hide RSS::Trackback from rdoc
- Patch by Steve Klabnik [Bug #8755] [ruby-core:56456]
+Fri Nov 27 19:19:44 2015 NARUSE, Yui <naruse@ruby-lang.org>
-Sat Aug 10 04:52:21 2013 Tanaka Akira <akr@fsij.org>
+ * lib/net/http.rb (connect): detect closed connection and reconnect
+ If the server closes a keep-alive http connection, the client socket
+ reaches EOF. To avoid an EOFError, detect the closed connection and
+ reconnect.
+ Added test to ensure HTTP#post succeeds even if the
+ keep-alive-connection has been closed by the server.
+ by Kristian Hanekamp <kris.hanekamp@gmail.com>
+ https://github.com/ruby/ruby/pull/1089 fix GH-1089
- * bignum.c (big_div_struct): Use size_t.
- (bigdivrem1): Ditto.
- (bigdivrem_num_extra_words): Ditto.
- (bigdivrem_single): Ditto.
- (bigdivrem_normal): Ditto.
- (bary_divmod): Ditto.
+Thu Nov 26 21:36:40 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Aug 9 23:47:15 2013 Kouhei Sutou <kou@cozmixng.org>
+ * compile.c (iseq_peephole_optimize): enable tail call
+ optimization for specialized indexers.
- * lib/rss/rexmlparser.rb: Remove needless REXML version check.
- Both RSS Parser and REXML are bundled in Ruby. RSS Parser can
- always use the latest REXML. [Bug #8754] [ruby-core:56454]
- Patch by Steve Klabnik. Thanks!!!
+ * compile.c (iseq_compile_each): blockiseq should be NULL, but not
+ Qnil.
-Fri Aug 9 22:51:10 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Nov 26 17:22:53 2015 NARUSE, Yui <naruse@ruby-lang.org>
- * configure.in (XLDFLAGS, LIBRUBYARG_STATIC): CoreFoundation framework
- option is now needed always, regardless enable-shared.
- [ruby-core:56467] [Bug #8759]
+ * regcomp.c, regenc.c, regexec.c, regint.h, enc/unicode.c:
+ Merge Onigmo 58fa099ed1a34367de67fb3d06dd48d076839692
+ + https://github.com/k-takata/Onigmo/pull/52
-Fri Aug 9 22:20:51 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Nov 26 09:50:02 2015 yui-knk <spiketeika@gmail.com>
- * ruby.c (load_file_internal): use rb_parser_compile_string_path and
- rb_parser_compile_file_path, String path name versions. [Bug #8753]
+ * test/coverage/test_coverage.rb: Added test-case for Coverage.restart.
+ [Misc #11732][ruby-dev:49379]
-Fri Aug 9 07:16:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+Thu Nov 26 09:46:36 2015 yui-knk <spiketeika@gmail.com>
- * ext/io/console/console.c: delete redefinition of rb_cloexec_open.
- drop support for 1.8 and 1.9 from the next release of io-console gem.
+ * test/coverage/test_coverage.rb: Added test-case for Coverage.peek_result
+ without Coverage.start. [Misc #11726][ruby-core:71622]
-Fri Aug 9 19:13:54 2013 Koichi Sasada <ko1@atdot.net>
+Thu Nov 26 07:22:55 2015 Eric Wong <e@80x24.org>
- * NEWS: update about new methods for Binding.
+ * test/openssl/test_ssl.rb (test_copy_stream): new test
-Fri Aug 9 18:48:09 2013 Koichi Sasada <ko1@atdot.net>
+Wed Nov 25 21:23:39 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * proc.c: add Binding#local_variable_get/set/defined?
- to access local variables which a binding contains.
- Most part of implementation by nobu.
+ * io.c (copy_stream_body): try to_io conversion before read,
+ readpartial, and write methods. [ruby-dev:49008] [Bug #11199]
- * test/ruby/test_proc.rb: add a tests for above.
+Wed Nov 25 10:55:21 2015 Shugo Maeda <shugo@ruby-lang.org>
- * vm.c, vm_core.h (rb_binding_add_dynavars): add a new function
- to add a new environment to create space for new local variables.
+ * io.c (argf_getpartial): should not resize str if the second
+ argument is not given.
+ [ruby-core:71668] [Bug #11738]
-Fri Aug 9 14:02:01 2013 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
+Tue Nov 24 23:56:25 2015 Naohisa Goto <ngotogenome@gmail.com>
- * tool/make-snapshot: Fix order of priority for option parameter.
+ * configure.in: On Solaris, it is safe to define _LARGEFILE_SOURCE
+ when _FILE_OFFSET_BITS=64 is defined (= when 32-bit compile).
-Fri Aug 9 12:06:49 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Nov 24 10:00:10 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * file.c (rb_str_normalize_ospath): normalize to Normalization Form C
- using CFString.
+ * lib/rubygems/installer.rb: Fix two double-word typos.
+ [ci skip][fix GH-1108] Patch by @jwworth
-Fri Aug 9 10:53:57 2013 Kazuki Tsujimoto <kazuki@callcc.net>
+Tue Nov 24 09:17:02 2015 Alexander von Gluck IV <kallisti5@unixzen.com>
- * time.c (get_timeval, get_new_timeval): use rb_obj_class()
- instead of CLASS_OF() because CLASS_OF() may return
- a singleton class.
+ * beos: Drop support for BeOS now that Haiku is stable.
+ [Fix GH-1112]
-Fri Aug 9 10:42:11 2013 Kazuki Tsujimoto <kazuki@callcc.net>
+Tue Nov 24 09:16:35 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * vm_insnhelper.c (vm_invoke_block): returning from lambda proc
- now always exits from the Proc. [ruby-core:56193] [Feature #8693]
+ * internal.h (rb_gc_for_fd): move to export, as referred by
+ ext/socket.
- * NEWS, test/ruby/test_lambda.rb: ditto. Patch by nobu.
+Tue Nov 24 09:04:29 2015 David Rodriguez <deivid.rodriguez@gmail.com>
-Fri Aug 9 00:10:32 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * file.c: [DOC] add a missing period to File docs, to terminate
+ the sentence and separate from the next sentence. [Fix GH-1111]
- * enumerator.c (lazy_zip_func): fix non-single argument. fix
- out-of-bound access and pack multiple yielded values.
- [ruby-core:56383] [Bug #8735]
+Tue Nov 24 08:30:06 2015 JuanitoFatas <katehuang0320@gmail.com>
-Thu Aug 8 23:01:20 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * NEWS: Fix the issue number of `Struct#dig`, which should be
+ [Feature #11688]. [Fix GH-1110]
- * object.c (rb_mod_singleton_p): new method Module#singleton_class? to
- return whether the receiver is a singleton class or not.
- [ruby-core:51087] [Feature #7609]
+Tue Nov 24 07:56:54 2015 Eric Wong <e@80x24.org>
-Thu Aug 8 21:56:44 2013 Tanaka Akira <akr@fsij.org>
+ * ext/socket/init.c (rsock_s_accept): handle ENOMEM
- * time.c (time_overflow_p): Avoid signed integer overflow.
- (rb_time_new): Fix overflow condition.
+Tue Nov 24 07:50:15 2015 Eric Wong <e@80x24.org>
-Thu Aug 8 19:58:02 2013 Koichi Sasada <ko1@atdot.net>
+ * dir.c (dir_initialize): use rb_gc_for_fd for ENOMEM
+ * ext/socket/init.c (rsock_socket): ditto
+ * ext/socket/socket.c (rsock_socketpair): ditto
+ * internal.h (rb_gc_for_fd): prototype
+ * io.c (rb_gc_for_fd): remove static
+ [ruby-core:71623] [Feature #11727]
- * thread.c (rb_threadptr_pending_interrupt_check_mask):
- use RARRAY_RAWPTR() instead of RARRAY_PTR() because
- there is no new reference.
+Tue Nov 24 06:46:27 2015 Eric Wong <e@80x24.org>
-Thu Aug 8 19:56:52 2013 Koichi Sasada <ko1@atdot.net>
+ * io.c (rb_gc_for_fd): new helper function
+ (ruby_dup): use rb_gc_for_fd
+ (rb_sysopen): ditto
+ (rb_fdopen): ditto
+ (rb_pipe): ditto
+ [ruby-core:71623] [Feature #11727]
- * string.c (rb_str_format_m): use RARRAY_RAWPTR() instead of
- RARRAY_PTR() because there is no new reference.
+Tue Nov 24 05:13:35 2015 Eric Wong <e@80x24.org>
-Thu Aug 8 19:55:51 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/fiddle/function.c (struct nogvl_ffi_call_args):
+ new struct for GVL release
+ (nogvl_ffi_call): new function
+ (function_call): adjust for GVL release
+ [ruby-core:71642] [Feature #11607]
+ * ext/fiddle/closure.c (struct callback_args):
+ new struct for GVL acquire
+ (with_gvl_callback): adjusted original callback function
+ (callback): wrapper for conditional GVL acquire
+ * ext/fiddle/depend: add dependencies
+ * ext/fiddle/extconf.rb: include top_srcdir for internal.h
+ * internal.h (ruby_thread_has_gvl_p): expose for fiddle
+ * vm_core.h (ruby_thread_has_gvl_p): moved to internal.h
+ * test/fiddle/test_function.rb (test_nogvl_poll): new test
- * include/ruby/ruby.h: define USE_RGENGC_LOGGING_WB_UNPROTECT.
+Mon Nov 23 19:53:12 2015 Naohisa Goto <ngotogenome@gmail.com>
-Thu Aug 8 16:44:25 2013 Koichi Sasada <ko1@atdot.net>
+ * configure.in: On Solaris, with gcc, "-std=iso9899:1999"
+ in $ansi_options is often also needed in CPPFLAGS,
+ because some feature definitions vary depending on such
+ standards options.
- * include/ruby/ruby.h: add old macro name `RUBY_EVENT_SWITCH'.
- This macro name is obsolete because it is renamed to
- RUBY_INTERNAL_EVENT_SWITCH, but it has compatibility problem
- using this macro name like ruby-prof.
- I want to remove this macro after ruby 2.1.
+Mon Nov 23 12:54:39 2015 Hamish Morrison <hamishm53@gmail.com>
-Thu Aug 8 15:37:53 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * configure.in: remove obsolete workarounds for Haiku.
- * test/coverage/test_coverage.rb (TestCoverage#test_big_code): use `1'
- instead of `p' to get rid of a side effect.
- Kernel#p without any argument seems to do nothing, but flushes stdout.
- and, if stdout is redirected to file, fsync() will be called on
- Windows. so, when running test-all on Windows with redirection, such
- as CI environment, this test took a lot of time.
+ * dln.c, file.c, io.c: remove obsolete Haiku workarounds.
-Thu Aug 8 14:54:18 2013 Shugo Maeda <shugo@ruby-lang.org>
+ * thread_pthread.c: add stack bounds detection for Haiku.
- * NEWS: add description of incompatibility introduced by r42396.
- [ruby-core:56329] [Bug #8722]
+ * signal.c: get stack pointer from signal context on Haiku.
+ [ruby-core:67923] [Bug #10811] [Fix GH-1109]
-Thu Aug 8 14:50:36 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Mon Nov 23 11:44:11 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * common.mk (mini): portable target to build miniruby
+ * gems/bundled_gems: bump version to minitest-5.8.3
- * common.mk (bisect): run git-bisect with miniruby
+Mon Nov 23 08:55:00 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * common.mk (bisect-ruby): run git-bisect with ruby
+ * ChangeLog: fix wrong reference for r52714
- * tool/bisect.sh: script for git-bisect
+Sun Nov 22 22:23:37 2015 Rei Odaira <Rei.Odaira@gmail.com>
-Thu Aug 8 12:11:43 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * gc.c (rb_raw_obj_info): fix compile errors when USE_RGENGC
+ is 0.
- * test/webrick/test_httpresponse.rb (test_send_body_*_chunked): these
- expectations assumes that the IOs are binmode. fixed test failures
- introduced at r42427 on Windows.
+Sun Nov 22 21:58:09 2015 Naohisa Goto <ngotogenome@gmail.com>
-Thu Aug 8 10:27:18 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * lib/cmath.rb: methods which has suffix '!' are now deprecated.
+ Re-apply r52469 made by Kazuki Tanaka, with fixing bug about
+ mathn.rb compatibility. [ruby-core:68528] [Feature #10974]
- * range.c (range_last): revert r42400. [Bug #8739]
+Sun Nov 22 19:36:51 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Thu Aug 8 10:26:25 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/openssl/ossl.c: fix brew command for installation of openssl.
+ [ci skip][fix GH-1107] Patch by @arthurnn
- * file.c (rb_str_normalize_ospath): extract and move from dir.c.
+Sun Nov 22 17:59:50 2015 Naohisa Goto <ngotogenome@gmail.com>
-Thu Aug 8 05:59:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ * configure.in: On Solaris, add -D_XOPEN_SOURCE=n only when both
+ AC_TRY_CPP and AC_TRY_COMPILE pass, because some options
+ (e.g. -std=iso9899:1999) are not set when running C preprocessor
+ or building ext.
- * test/openssl/test_ssl.rb: Fix test for CVE-2013-4073.
- Patch by Antonio Terceiro. [Bug #8750] [ruby-core:56437]
+Sun Nov 22 16:53:34 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Aug 8 03:37:38 2013 Eric Hodel <drbrain@segment7.net>
+ * compile.c (iseq_peephole_optimize): remove unreachable code
+ chunk after jump/leave.
- * lib/webrick/httpresponse.rb: Allow #body to be an IO-like object
- that responds to #readpartial and #read.
- [ruby-trunk - Feature #8155]
- * NEWS: NEWS for above
- * test/webrick/test_httpresponse.rb: Tests for above.
+ * parse.y: move dead code elimination of logical operation to
+ compile.c. not to warn logical operation of literal constants.
-Wed Aug 7 23:06:26 2013 Akinori MUSHA <knu@iDaemons.org>
+Sun Nov 22 16:37:10 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ruby.c (Process.argv0): New method to return the original value
- of $0. [Feature #8696]
+ * compile.c (iseq_peephole_optimize): eliminate always/never
+ branches after a literal object and when the value is used after
+ the branch.
-Wed Aug 7 23:05:55 2013 Akinori MUSHA <knu@iDaemons.org>
+Sun Nov 22 01:23:43 2015 Naohisa Goto <ngotogenome@gmail.com>
- * ruby.c (Process.setproctitle): New method to change the title of
- the running process that is shown in ps(1). [Feature #8696]
+ * configure.in: Add -D_XOPEN_SOURCE=500 (or 600 or 700) on Solaris
+ if available, mainly for enabling some features in sockets.
-Wed Aug 7 20:05:38 2013 Tanaka Akira <akr@fsij.org>
+Sun Nov 22 00:17:22 2015 Naohisa Goto <ngotogenome@gmail.com>
- * bignum.c (rb_big_odd_p): Check the bignum length.
- (rb_big_even_p): Ditto.
+ * test/socket/test_socket.rb (test/socket/test_socket.rb): skip
+ the test when Socket::SO_TIMESTAMP is not defined. Fix error
+ on Solaris 10. [Bug #11728] [ruby-dev:49377]
-Wed Aug 7 19:29:26 2013 Tanaka Akira <akr@fsij.org>
+Sat Nov 21 18:57:28 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * bignum.c (dbl2big): A condition simplified.
+ * ruby.c (need_argument): move frozen-string-literal-debug option
+ from --enable to --debug. [Feature #11725]
-Wed Aug 7 16:34:30 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * ruby.c (proc_options): fix pointer overrun. do not advance argv
+ until it is valid.
- * test/webrick/test_cgi.rb (TestWEBrickCGI#{start_cgi_server,test_cgi}):
- mswin is not only mswin32 but also mswin64. [Bug #8746]
+Sat Nov 21 13:59:09 2015 NARUSE, Yui <naruse@ruby-lang.org>
-Wed Aug 7 16:19:12 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/digest/sha1/extconf.rb: OpenSSL's struct name for SHA1 is
+ SHA_CTX. http://openssl.org/docs/man0.9.8/crypto/SHA1.html
- * cont.c (rb_fiber_start): use RARRAY_RAWPTR() instead of
- RARRAY_PTR() because there is no new reference.
+Sat Nov 21 13:31:52 2015 NARUSE, Yui <naruse@ruby-lang.org>
- * proc.c (curry): ditto.
+ * ext/digest/*/*.[ch]: include ruby.h before digest.h to avoid
+ including ext/digest/extconf.h. [Bug #3231]
+ https://msdn.microsoft.com/library/36k2cdd4.aspx
- * proc.c (rb_proc_call): remove line break.
+ * ext/digest/*/extconf.rb: remove ext/digest from include search path
+ to avoid confusion of cl.exe.
-Wed Aug 7 13:20:12 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/digest/*/*.[ch]: explicitly specify def.h's path.
- * random.c (random_load): use RARRAY_RAWPTR() instead of
- RARRAY_PTR() because there is no new reference.
+Sat Nov 21 13:05:16 2015 NARUSE, Yui <naruse@ruby-lang.org>
-Wed Aug 7 12:58:23 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/openssl/ossl.h: LibreSSL doesn't have and need e_os2.h.
- * thread.c (thread_start_func_2): use RARRAY_RAWPTR() instead of
- RARRAY_PTR() because there is no new reference.
+Sat Nov 21 09:18:10 2015 Koichi Sasada <ko1@atdot.net>
-Wed Aug 7 09:00:24 2013 Zachary Scott <e@zzak.io>
+ * thread_sync.c: reduce the specification of Queue#close.
+ * Queue#close accepts no arguments.
+ * deq'ing on closed queue returns nil, always.
+ [Feature #10600]
- * string.c: [DOC] Description of rb_str_equal [Fixes GH-375]
- Based on a patch by @markijbema
- https://github.com/ruby/ruby/pull/375
+ * test/thread/test_queue.rb: catch up this fix.
-Wed Aug 7 08:30:38 2013 Zachary Scott <e@zzak.io>
+Sat Nov 21 08:44:21 2015 Koichi Sasada <ko1@atdot.net>
- * ext/openssl/ossl_hmac.c: [DOC] Documentation for OpenSSL::HMAC
- based on a patch by @repah documenting-ruby/ruby#14
- https://github.com/documenting-ruby/ruby/pull/14
+ * compile.c (iseq_compile_each): add debug information to NODE_STR
+ strings as default.
+ [Feature #11725]
-Wed Aug 7 07:46:23 2013 Zachary Scott <e@zzak.io>
+ * insns.def (freezestring): add new instruction to support adding
+ debug information for dynamically constructed strings.
- * lib/rss/utils.rb: [DOC] RSS::Utils by Steve Klabnik [Bug #8745]
+ * compile.c (iseq_compile_each): support adding debug information
+ for NODE_DSTR with freezestring instruction.
-Wed Aug 7 07:38:39 2013 Tanaka Akira <akr@fsij.org>
+ * error.c (rb_error_frozen): change the debug information ID name
+ id_debug_created_info and this field should have a 2 element array
+ containing path and line information.
- * bignum.c (nlz16): Removed.
- (nlz32): Ditto.
- (nlz64): Ditto.
- (nlz128): Ditto.
- (nlz_int): New function.
- (nlz_long): New function.
- (nlz_long_long): New function.
- (nlz_int128): New function.
- (nlz): Follow above changes.
- (bitsize): Follow above changes.
+ * defs/id.def: ditto.
-Tue Aug 6 22:38:15 2013 Zachary Scott <e@zzak.io>
+ * test/ruby/test_rubyoptions.rb: catch up this fix.
- * time.c: [DOC] Typo in Time overview by @sparr [Fixes GH-374]
- https://github.com/ruby/ruby/pull/374
+ * test/ruby/test_iseq.rb: now frozen strings are not same.
-Tue Aug 6 22:35:32 2013 Zachary Scott <e@zzak.io>
+Sat Nov 21 04:34:16 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/rss/1.0.rb: [DOC] Document RSS10 by Steve Klabnik [Bug #8740]
+ * symbol.c (rb_str_intern): should not freeze the receiver itself
+ unexpectedly. [ruby-core:71611] [Bug #11721]
-Tue Aug 6 22:14:11 2013 Kouji Takao <kouji.takao@gmail.com>
+Fri Nov 20 23:15:18 2015 Naotoshi Seo <sonots@gmail.com>
- * ext/readline/readline.c (readline_s_delete_text): remove
- checking "$SAFE == 4".
+ * lib/logger.rb: expose logger mutex
+ [fix GH-541] Patch by @arthurnn
- * ext/readline/readline.c: fix rdoc, remove "Raises SecurityError"
- and add "Raises NotImplementedError".
+Fri Nov 20 15:05:28 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Tue Aug 6 22:04:38 2013 Kouji Takao <kouji.takao@gmail.com>
+ * Added missing reference of GitHub
- * ext/readline/readline.c, test/readline/test_readline.rb: fix
- indent.
+Fri Nov 20 14:57:01 2015 Trevor Rowe <trevorrowe@gmail.com>
-Tue Aug 6 21:59:56 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * lib/net/http.rb: Fixed regression for Net::HTTP::PUT with "Expect-100"
+ header. [fix GH-949]
+ * test/net/http/test_http.rb: added test.
- * range.c (range_last): return nil for empty range, or in the case the
- predecessor is smaller than the begin. [Bug #8739]
+Fri Nov 20 14:39:56 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Tue Aug 6 21:48:31 2013 Kouji Takao <kouji.takao@gmail.com>
+ * lib/net/http.rb: set hostname before call ossl_ssl_set_session.
+ [Bug #11401][ruby-core:70152][fix GH-964] Patch by @mkarnebeek
- * ext/readline/readline.c (readline_s_set_point, Init_readline):
- add Readline.point=(pos). Patched by naruse. [ruby-dev:47535]
- [Feature #8675]
+Fri Nov 20 12:53:19 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Tue Aug 6 21:14:11 2013 Kouji Takao <kouji.takao@gmail.com>
+ * array.c: clarify docs for take_while/drop_while samples.
+ [ci skip][fix GH-1028] Patch by @leriksen
- * ext/readline/readline.c (Init_readline, readline_s_set_output)
- (clear_rl_outstream, readline_s_set_input, clear_rl_instream)
- (readline_readline): fix causing SEGV if closed IO object that is
- set Readline.input or Readline.output. Patched by akr
- [ruby-dev:47509] [Bug #8644]
+Fri Nov 20 12:48:04 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Tue Aug 6 17:56:40 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/socket/socket.c: remove mention of :UNIX in getaddrinfo().
+ It's typically not a support option.
+ [ci skip][fix GH-990] Patch by @eam
- * vm_insnhelper.c (vm_push_frame): change type of stack_max to size_t.
+Fri Nov 20 12:44:06 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Tue Aug 6 17:42:47 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * lib/rss/syndication.rb: Add nodoc marker for #validate_sy_updatePeriod.
+ [ci skip][fix GH-1105] Patch by @davydovanton
- * range.c (range_last): exclude the last number of the exclusive range
- if the end is Numeric. [ruby-dev:47587] [Bug #8739]
+Fri Nov 20 09:05:21 2015 Koichi Sasada <ko1@atdot.net>
-Tue Aug 6 17:42:21 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm.c (rb_vm_cref_replace_with_duplicated_cref): added.
- * win32/win32.c (rb_w32_conv_from_wchar): converted string to CP_UTF8
- should have UTF-8 encoding. otherwise no conversion takes place
- later.
+ CREFs should not be shared by methods between `using'.
+ [Bug #11247]
-Tue Aug 6 17:21:38 2013 Koichi Sasada <ko1@atdot.net>
+ * vm_insnhelper.c (vm_cref_replace_with_duplicated_cref): ditto.
- * vm_insnhelper.c (vm_push_frame): fix stack overflow check codes.
- Stack overflow check should be done *after* pushing a stack frame.
- However, some stack overflow checking codes checked *before*
- pushing a stack frame with iseq->stack_max.
- To solve this problem, add a new parameter `stack_max' to specify
- a possible consuming stack size.
+ * vm.c (vm_cref_dup): should copy refinements correctly.
- * vm_core.h (CHECK_VM_STACK_OVERFLOW0): add to share the stack overflow
- checking code.
+ * eval.c: use rb_vm_cref_replace_with_duplicated_cref().
- * insns.def: catch up this change.
+ * eval_intern.h: add a decl. of
+ rb_vm_cref_replace_with_duplicated_cref().
- * vm.c, vm_eval.c: ditto.
+ * vm_eval.c (eval_string_with_cref): do not need to pass
+ scope's CREF because VM can find out CREF from stack frames.
- * test/ruby/test_exception.rb: add a stack overflow test.
- This code is reported by nobu.
+ * test/ruby/test_refinement.rb: add a test.
-Tue Aug 6 17:02:17 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Nov 20 06:52:53 2015 Eric Wong <e@80x24.org>
- * win32/win32.c (rb_w32_conv_from_wchar): use WideCharToMultiByte(),
- as like as mbstr_to_wstr(), in the first step of the conversion from
- WCHAR.
+ * .gitattributes: new file for git users
+ [ruby-core:71578] [Feature #11713]
-Tue Aug 6 16:14:32 2013 Shugo Maeda <shugo@ruby-lang.org>
+Thu Nov 19 22:35:31 2015 Tanaka Akira <akr@fsij.org>
- * vm_eval.c (eval_string_with_cref): copy cref to limit the scope of
- refinements in the eval string. [ruby-core:56329] [Bug #8722]
+ * ext/socket/ancdata.c: Check buffer full and ignore MSG_TRUNC flag.
+ buffer fullness is more robust to detect the message is too big for
+ the buffer.
+ AIX 7.1 recvmsg doesn't set MSG_TRUNC for rflags when MSG_PEEK is
+ given.
- * test/ruby/test_refinement.rb: related test.
+Thu Nov 19 21:55:11 2015 Koichi Sasada <ko1@atdot.net>
-Tue Aug 6 12:23:12 2013 Tanaka Akira <akr@fsij.org>
+ * gc.c (gc_start): force to invoke GC by GC.start
+ even if it is GC.disable'd.
- * bignum.c (rb_big_realloc): Use VALGRIND_MAKE_MEM_UNDEFINED to
- declare undefined memory area.
- (bignew_1): Ditto.
+ * test/ruby/test_gc.rb: add a test.
- * internal.h (VALGRIND_MAKE_MEM_DEFINED): Moved from gc.c
- (VALGRIND_MAKE_MEM_UNDEFINED): Ditto.
+Thu Nov 19 20:08:59 2015 Koichi Sasada <ko1@atdot.net>
-Tue Aug 6 01:40:37 2013 Zachary Scott <e@zzak.io>
+ * gc.c: trivial performance improvements.
- * process.c: [DOC] Document caveats of command form of Process.spawn
- with regard to the shell and OS. Patched by Steve Klabnik [Bug #8550]
+ name modified
+ vm1_gc_short_lived* 1.015
+ vm1_gc_short_with_complex_long* 1.014
+ vm1_gc_short_with_long* 1.000
+ vm1_gc_short_with_symbol* 1.016
+ vm1_gc_wb_ary* 1.002
+ vm1_gc_wb_ary_promoted* 0.996
+ vm1_gc_wb_obj* 1.045
+ vm1_gc_wb_obj_promoted* 1.014
+ vm3_gc 1.021
-Tue Aug 6 01:28:35 2013 Zachary Scott <e@zzak.io>
+ * gc.c (gc_writebarrier_generational): reorder parameters to optimize
+ register passing function call.
- * lib/rss/0.9.rb: [DOC] Typo in example [Bug #8732]
+ * gc.c (gc_writebarrier_incremental): ditto.
-Tue Aug 6 01:22:37 2013 Zachary Scott <e@zzak.io>
+ * gc.c (rb_gc_writebarrier): remove LIKELY().
+ LIKELY() seems to move related functions not better places.
- * lib/rss/2.0.rb: [DOC] Document RSS::Rss by Steve Klabnik #8740
- * lib/rss/atom.rb: [DOC] Typo in rdoc by Steve Klabnik
+Thu Nov 19 19:45:05 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Aug 5 23:47:59 2013 Tanaka Akira <akr@fsij.org>
+ * ruby.c (ruby_prog_init): [DOC] ARGV does not contain the name of
+ the executable. [ruby-core:71561] [Bug #11711]
- * bignum.c: Rename local variables.
+Thu Nov 19 15:53:21 2015 Koichi Sasada <ko1@atdot.net>
-Mon Aug 5 22:23:59 2013 Zachary Scott <e@zzak.io>
+ * signal.c: should also clear ruby_disable_gc.
+ [Bug #11692]
- * vm_trace.c: [DOC] Fix TracePoint return values in examples
- Based on a patch by @sho-h [Fixes GH-373]
- https://github.com/ruby/ruby/pull/373
+Thu Nov 19 15:31:45 2015 Koichi Sasada <ko1@atdot.net>
-Mon Aug 5 17:38:15 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * compile.c (iseq_compile_each): T_IMEMO/iseq objects should be
+ wrap with ISeq wrappers. [Bug #11676]
- * win32/win32.c (rb_w32_write_console): use MultiByteToWideChar() for
- the last step of conversion to WCHAR, to get rid of warnings from
- rb_enc_find() in miniruby. [ruby-dev:47584] [Bug #8733]
+Thu Nov 19 15:16:12 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * win32/win32.c (wstr_to_mbstr, mbstr_to_wstr): fix wrong trimming.
- WideCharToMultiByte() and MultiByteToWideChar() do not count
- NUL-terminator in the size for conversion result, unless the input
- length is -1.
+ * lib/rubygems: Update to RubyGems 2.5.0+ HEAD(c6b4946).
+ this version includes #1114, #1314, #1322, #1375, #1383, #1387
+ * test/rubygems: ditto.
-Mon Aug 5 11:51:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+Thu Nov 19 14:14:37 2015 NAKAMURA Usaku <usa@ruby-lang.org>
- * include/ruby/encoding.h: document which user flags are used by
- ENCODING_MASK for better greppability
+ * win32/win32.c (finish_overlapped_socket): return value of this
+ function should be only 0 or SOCKET_ERROR.
-Mon Aug 5 10:01:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+Thu Nov 19 14:12:12 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * object.c (rb_class_inherited_p): allow iclasses to be tested for
- inheritance. [Bug #8686] [ruby-core:56174]
+ * compile.c (iseq_tailcall_optimize): apply tail call optimization
+ before conversion to specialized instructions. when looking
+ back from `leave` instruction, `send` instructions have been
+ translated already.
- * test/ruby/test_method.rb: add test
+Thu Nov 19 13:57:58 2015 NAKAMURA Usaku <usa@ruby-lang.org>
-Mon Aug 5 06:13:48 2013 Zachary Scott <e@zzak.io>
+ * win32/win32.c (finish_overlapped_socket): ignore EMSGSIZE when input,
+ because POSIX platforms just do so. fixes test errors revealed by
+ r52647.
- * enumerator.c: [DOC] Remove reference to Enumerator::Lazy#cycle
- Patch by @kachick [Fixes GH-372]
- https://github.com/ruby/ruby/pull/372
+Thu Nov 19 02:52:30 2015 NAKAMURA Usaku <usa@ruby-lang.org>
-Mon Aug 5 03:57:16 2013 Zachary Scott <e@zzak.io>
+ * ext/socket/ancdata.c (bsock_recvmsg_internal): stretch the buffer size
+ only when vmaxdatlen is nil.
- * lib/rss/0.9.rb: [DOC] Document RSS09 by Steve Klabnik [Bug #8732]
+Thu Nov 19 02:20:11 2015 Tanaka Akira <akr@fsij.org>
-Mon Aug 5 03:35:11 2013 Zachary Scott <e@zzak.io>
+ * test/socket/test_socket.rb (test_udp_recvmsg_truncation): rflags is
+ nil on Solaris 10 which have no HAVE_STRUCT_MSGHDR_MSG_CONTROL.
+ Reported by Naohisa Goto. [ruby-core:71557] [Bug #11709]
- * lib/rexml/attribute.rb: [DOC] Update example for #namespace
- Patch by Ippei Obayashi [Bug #8685] [ruby-core:56173]
+Thu Nov 19 01:48:05 2015 NAKAMURA Usaku <usa@ruby-lang.org>
-Sun Aug 4 21:08:29 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * configure.in: add -static-libgcc for mingw automatically if available.
- * array.c (rb_ary_zip): performance implement by using
- ALLOCA_N() to allocate tmp buffer.
+Thu Nov 19 00:53:26 2015 NAKAMURA Usaku <usa@ruby-lang.org>
-Sun Aug 4 07:14:49 2013 Tanaka Akira <akr@fsij.org>
+ * ext/extmk.rb (--extflags): new option to pass EXTLDFLAGS to children,
+ especially exts.mk.
- * README.EXT, README.EXT.ja: Mention rb_integer_pack and
- rb_integer_unpack.
+ * common.mk (EXTMK_ARGS): use above option.
-Sun Aug 4 01:54:45 2013 Tanaka Akira <akr@fsij.org>
+Wed Nov 18 22:50:43 2015 Koichi Sasada <ko1@atdot.net>
- * bignum.c (BARY_TRUNC): New macro.
- (bary_cmp): Use BARY_TRUNC.
- (bary_mul_toom3): Ditto.
- (bary_divmod): Ditto.
- (abs2twocomp): Ditto.
- (bigfixize): Ditto.
- (rb_cstr_to_inum): Ditto.
- (big2str_karatsuba): Ditto.
- (bigdivrem): Ditto.
+ * vm_method.c (rb_class_clear_method_cache): should clear all
+ RCLASS_CALLABLE_M_TBLs of all sub-classes (T_ICLASS).
-Sun Aug 4 00:57:58 2013 Tanaka Akira <akr@fsij.org>
+ RCLASS_CALLABLE_M_TBL() caches complemented method entries.
+ It should be cleared when the modules are cleared.
+ On previous version clears only for direct children.
+ It is enough for normal modules because corresponding T_ICLASSes
+ are direct children.
- * bignum.c (big2str_karatsuba): Don't allocate new temporary buffer
- if the buffer is enough for current invocation.
+ However, refinements create complex data structure. So that
+ we need to clear all children (and descendants).
+ [ruby-core:71423] [Bug #11672]
-Sun Aug 4 00:22:34 2013 Tanaka Akira <akr@fsij.org>
+ * vm_method.c (rb_clear_method_cache_by_class): rb_mKernel
+ doesn't call rb_class_clear_method_cache, so that
+ clear child T_ICLASSes.
- * bignum.c (bary2bdigitdbl): New function.
- (bdigitdbl2bary): Ditto.
- (bary_mul_single): Use bdigitdbl2bary.
- (power_cache_get_power): Ditto.
- (bary_divmod): Use bary2bdigitdbl.
- (big2str_orig): Ditto.
- (bigdivrem): Ditto.
+ * test/ruby/test_refinement.rb: enable disabled test.
-Sat Aug 3 22:47:11 2013 Tanaka Akira <akr@fsij.org>
+Wed Nov 18 21:09:08 2015 Koichi Sasada <ko1@atdot.net>
- * bignum.c: The branch condition of selecting multiplication
- algorithms should check smaller argument because Karatsuba and Toom3
- is effective only if both arguments are big.
- (bary_mul_toom3_branch): Compare the smaller argument to
- TOOM3_MUL_DIGITS.
- (bary_mul): Compare the smaller argument to KARATSUBA_MUL_DIGITS.
+ * vm_method.c (prepare_callable_method_entry): use
+ RCLASS_CALLABLE_M_TBL() instead of accessing a filed directly.
-Sat Aug 3 22:23:31 2013 Tanaka Akira <akr@fsij.org>
+Wed Nov 18 17:08:18 2015 Koichi Sasada <ko1@atdot.net>
- * bignum.c (big2str_orig): Receive the number to stringize as
- BDIGIT array and size.
- (big2str_karatsuba): Receive the number to stringize as BDIGIT array
- and size. Use an temporary array of BDIGIT.
- (rb_big2str1): Follow the above change.
+ * method.h: introduce the following field and macros.
-Sat Aug 3 13:30:04 2013 Tanaka Akira <akr@fsij.org>
+ * rb_method_definition_t::complemented_count to count shared method
+ entries because of complemented method entries and separate from
+ alias_count.
- * bignum.c (MAX_BASE36_POWER_TABLE_ENTRIES): Renamed from
- MAX_BIG2STR_TABLE_ENTRIES.
- (base36_power_cache): Renamed from big2str_power_cache.
- (base36_numdigits_cache): Renamed from big2str_numdigits_cache.
+ Shared `def' only by complemented method entries should not prevent
+ method re-definition warning.
-Sat Aug 3 10:33:52 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * METHOD_ENTRY_COMPLEMENTED(me) to represent complemented method entry.
+ * METHOD_ENTRY_COMPLEMENTED_SET(me) to check it as complemented me.
- * parse.y (parser_set_integer_literal): use rb_rational_raw1() for
- integral rational because no reduction is needed with 1.
+ * vm_insnhelper.c (aliased_callable_method_entry): should also
+ check me->def->complemented_count.
-Sat Aug 3 09:46:07 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm_method.c (method_definition_addref_complement): add to count
+ complemented method entries number.
- * ext/etc/etc.c (setup_passwd, setup_group): set proper encodings to
- string members.
+ * vm_method.c (rb_method_definition_release): release `def' iff
+ alias_count == 0 and complemented_count == 0.
-Sat Aug 3 09:30:57 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/ruby/test_module.rb: add a test.
- * struct.c (rb_struct_define_under): new function to define Struct
- under the given namespace, not under Struct. [Feature #8264]
+Wed Nov 18 17:06:19 2015 Koichi Sasada <ko1@atdot.net>
- * ext/etc/etc.c: use rb_struct_define_under.
+ * gc.c (rb_raw_obj_info): fix trivial issues.
-Sat Aug 3 06:55:29 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * support SPECIAL_CONSTs.
+ * fix IMEMO/ment outputs.
- * parse.y (value_expr_gen): now NODE_DEFN and NODE_DEFS are not void
- value expressions. get rid of wrong warning with -w, and make to
- pass tests with chkbuild. ref. [Feature #3753]
+Wed Nov 18 11:32:15 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Aug 3 04:23:48 2013 Eric Hodel <drbrain@segment7.net>
+ * compile.c (iseq_peephole_optimize): eliminate always/never
+ branches after a literal object. this sequence typically
+ appears by defined? operator for a method call on a local
+ variable.
- * doc/syntax/refinements.rdoc: Remove mention of instance_eval and
- module_eval from scope section per:
- http://twitter.com/shugomaeda/status/363219951336693761
+Wed Nov 18 10:33:06 2015 NAKAMURA Usaku <usa@ruby-lang.org>
-Sat Aug 3 02:22:05 2013 Tanaka Akira <akr@fsij.org>
+ * ext/socket/ancdata.c (bsock_recvmsg_internal): stretch the buffer size
+ when EMSGSIZE occurs on non HAVE_STRUCT_MSGHDR_MSG_CONTROL platforms
+ (such as, Windows). fixes a test error revealed by r52625.
- * bignum.c (big2str_orig): Refactored.
+Wed Nov 18 10:12:36 2015 Eric Wong <e@80x24.org>
-Sat Aug 3 01:20:19 2013 Tanaka Akira <akr@fsij.org>
+ * ext/socket/ancdata.c (bsock_recvmsg_internal): use 4096 as
+ default size to match pre-r52610, which also maps to a common
+ page size.
- * bignum.c (bigadd_core): Removed.
- (bigadd): Use bary_add instead of bigadd_core.
+Wed Nov 18 10:05:25 2015 Shugo Maeda <shugo@ruby-lang.org>
-Sat Aug 3 00:52:43 2013 Tanaka Akira <akr@fsij.org>
+ * doc/syntax/refinements.rdoc: update documentation to reflect
+ recent changes.
+ [ci skip] [ruby-core:71466] [Misc #11681] Patch by James Adam
- * bignum.c (rb_big2str1): Simplify power_level calculation.
+Wed Nov 18 09:50:21 2015 Naotoshi Seo <sonots@gmail.com>
-Sat Aug 3 00:34:20 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * test/logger/test_logdevice.rb: Fix tests of logger to make it work on
+ windows (windows can not remove opened file) [Bug #11702]
- * array.c (rb_ary_zip): use rb_ary_new2() to create buffer
- if rb_block_arity() > 1.
+Wed Nov 18 06:59:52 2015 Eric Wong <e@80x24.org>
-Sat Aug 3 00:12:00 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * ext/socket/ancdata.c (bsock_recvmsg_internal): grow buffer
+ on unspecified maxdatlen
+ [ruby-core:71517] [Bug #11701]
+ * ext/socket/lib/socket.rb (Socket#recvmsg): nil default for dlen
+ (Socket#recvmsg_nonblock): ditto
+ * test/socket/test_socket.rb (test_recvmsg_udp_no_arg): new test
- * NEWS: Add the description that IO#seek supports SEEK_DATA
- and SEEK_HOLE.
+Tue Nov 17 19:50:06 2015 NAKAMURA Usaku <usa@ruby-lang.org>
-Fri Aug 2 23:57:57 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * win32/win32.c (fstat): declare for mingw.
- * vm.c (m_core_define_method, m_core_define_singleton_method): now
- the value of def-expr is the Symbol of the name of the method, not
- nil.
- ref. [ruby-dev:42151] [Feature #3753]
+Tue Nov 17 19:02:59 2015 NAKAMURA Usaku <usa@ruby-lang.org>
- * test/ruby/test_syntax.rb (TestSyntax#test_value_of_def): test for
- above changes.
+ * configure.in (BASERUBY): use Kernel#print instead of Kernel#p because
+ the baseruby may output CRLF as end of line.
-Fri Aug 2 23:54:11 2013 Masaki Matsushita <glass.saga@gmail.com>
+Tue Nov 17 15:34:34 2015 Martin Duerst <duerst@it.aoyama.ac.jp>
+ * NEWS: Added update from Unicode 7.0.0 to 8.0.0 [ci skip]
- * array.c (rb_ary_zip): performance improvement by avoiding
- array creation if rb_block_arity() > 1.
+Tue Nov 17 15:30:30 2015 Martin Duerst <duerst@it.aoyama.ac.jp>
+ * enc/unicode/casefold.h, name2ctype.h: Change Unicode
+ Version for regular expressions from 7.0.0 to
+ 8.0.0 (with help from Kimihito Matsui) [Feature #11563]
-Fri Aug 2 23:50:53 2013 Tanaka Akira <akr@fsij.org>
+Tue Nov 17 14:36:00 2015 Kenichi Kamiya <kachick1@gmail.com>
- * bignum.c (power_cache_get_power): Apply bigtrunc to the result of
- bigsq.
- (big2str_karatsuba): Fix number of leading zero characters.
+ * lib/ostruct.rb (dig): Implement OpenStruct#dig
+ [Feature #11688]
-Fri Aug 2 23:48:36 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Nov 17 14:04:14 2015 NAKAMURA Usaku <usa@ruby-lang.org>
- * parse.y (parser_yylex): calculate denominator directly as powers of
- ten, not parsing string.
+ * ext/socket/lib/socket.rb (Socket#recvmsg{,_nonblock}): default values
+ of clen must be nil.
- * parse.y (parser_number_literal_suffix): return bit set of found
- suffixes.
+ * ext/socket/ancdata.c (bsock_sendmsg_internal): handle nil of clen.
+ fixes test errors introduced at r52602.
- * parse.y (parser_set_number_literal, parser_set_integer_literal):
- split from parser_number_literal_suffix to set yylval.
+Tue Nov 17 13:43:46 2015 NAKAMURA Usaku <usa@ruby-lang.org>
- * parse.y (parser_yylex): parse rational number literal with decimal
- point precisely.
+ * ext/socket/lib/socket.rb: UNIXSocket is not always exists. fixes
+ install error on Windows, introduced at r52601.
- * parse.y (simple_numeric): integrate numeric literals and simplify
- numeric rules.
+Tue Nov 17 11:27:23 2015 Eric Wong <e@80x24.org>
- * ext/ripper/eventids2.c (ripper_init_eventids2): ripper support for
- new literals, tRATIONAL and tIMAGINARY.
+ * ext/socket/lib/socket.rb (Socket#recvfrom_nonblock):
+ UDPSocket#recvfrom_nonblock):
+ update doc for `exception: false` and destination buffer
+ [ruby-core:69542] [Feature #11229]
+ [ruby-core:69543] [Feature #11242]
-Fri Aug 2 18:33:28 2013 Tanaka Akira <akr@fsij.org>
+Tue Nov 17 11:25:05 2015 Eric Turner <ericturnerdev@gmail.com>
- * bignum.c (big2str_karatsuba): Reduce power_level more than one at
- recursion, if possible.
- (rb_big2str1): Follow the above change.
+ * array.c (rb_ary_dig), hash.c (rb_hash_dig): [DOC] Update
+ comments describing dig methods. [Fix GH-1103]
-Fri Aug 2 12:25:15 2013 Tanaka Akira <akr@fsij.org>
+ * struct.c (rb_struct_dig): [DOC] add rdoc.
- * bignum.c (bary_mul): Swap x and y for bary_mul1 if x is longer than y.
- [ruby-dev:47565] [Bug #8719] Reported by Narihiro Nakamura.
+Tue Nov 17 11:22:22 2015 Martin Duerst <duerst@it.aoyama.ac.jp>
+ * NEWS: Small grammatical fix [ci skip]
-Fri Aug 2 10:39:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+Tue Nov 17 10:12:30 2015 Eric Wong <e@80x24.org>
- * parse.y (negate_lit): add T_RATIONAL and T_COMPLEX to the switch
- statement, and call rb_bug() if an unknown type is passed to
- negate_lit(). [ruby-core:56316] [Bug #8717]
+ * ext/socket/lib/socket.rb (Socket.accept_loop): avoid exceptions
+ (Socket.udp_server_recv): ditto
- * bootstraptest/test_literal_suffix.rb (assert_equal): add test
+Tue Nov 17 09:59:00 2015 Eric Wong <e@80x24.org>
-Fri Aug 2 09:14:47 2013 Eric Hodel <drbrain@segment7.net>
+ * ext/socket/ancdata.c (bsock_sendmsg_internal): avoid arg parsing
+ [ruby-core:71439] [Feature #11339]
+ (rsock_bsock_sendmsg): make private, adjust for above
+ (rsock_bsock_sendmsg_nonblock): ditto
+ * ext/socket/rubysocket.h: adjust prototypes
+ (rsock_opt_false_p): remove
+ * ext/socket/basicsocket.c (rsock_init_basicsocket):
+ define private methods
+ * ext/socket/lib/socket.rb (BasicSocket#sendmsg): new wrapper
+ (BasicSocket#sendmsg_nonblock): ditto
- * doc/syntax/refinements.rdoc: Improve description of where you may
- activate refinements.
+Tue Nov 17 09:45:18 2015 Eric Wong <e@80x24.org>
-Fri Aug 2 07:45:55 2013 Tanaka Akira <akr@fsij.org>
+ * ext/socket/ancdata.c (bsock_recvmsg_internal): avoid arg parsing
+ (rsock_bsock_recvmsg): adjust for above change
+ (rsock_bsock_recvmsg_nonblock): ditto
+ [ruby-core:71439] [Feature #11339]
+ * ext/socket/rubysocket.h: adjust prototypes for above
+ * ext/socket/basicsocket.c (rsock_init_basicsocket):
+ adjust private methods
+ * ext/socket/lib/socket.rb (BasicSocket#recvmsg): wrapper method
+ (BasicSocket#recvmsg_nonblock): ditto
- * bignum.c (big2str_orig): Remove len argument.
- (big2str_karatsuba): Ditto.
- (rb_big2str1): Follow above change.
+Tue Nov 17 08:36:34 2015 Eric Wong <e@80x24.org>
-Thu Aug 2 02:32:00 2013 Kenta Murata <mrkn@mrkn.jp>
+ * ext/socket/init.c (rsock_s_accept_nonblock): avoid parsing args
+ [ruby-core:71439] [Feature #11339]
+ * ext/socket/rubysocket.h: adjust prototype
+ * ext/socket/socket.c (sock_accept_nonblock): make private
+ * ext/socket/tcpserver.c (tcp_accept_nonblock): ditto
+ * ext/socket/unixserver.c (unix_accept_nonblock): ditto
+ * ext/socket/lib/socket.rb (Socket#accept_nonblock):
+ implement as wrapper, move RDoc
+ (TCPServer#accept_nonblock): ditto
+ (UNIXServer#accept_nonblock): ditto
- * NEWS: Add the description of number literal suffixes.
+Tue Nov 17 08:25:57 2015 Eric Wong <e@80x24.org>
-Thu Aug 2 00:02:00 2013 Kenta Murata <mrkn@mrkn.jp>
+ * ext/socket/socket.c (sock_connect_nonblock):
+ avoid argument parsing in C.
+ [ruby-core:71439] [Feature #11339]
+ * ext/socket/lib/socket.rb (Socket#connect_nonblock):
+ new wrapper for private method, move RDoc
- * bootstraptest/test_literal_suffix.rb: add two test cases to
- examine that "1if true" and "1rescue nil" are recognized as 1.
+Tue Nov 17 08:16:09 2015 Eric Wong <e@80x24.org>
-Thu Aug 1 23:45:00 2013 Kenta Murata <mrkn@mrkn.jp>
+ * ext/socket/init.c (rsock_s_recvfrom_nonblock):
+ avoid arg parsing with C API
+ [ruby-core:71439] [Feature #11339]
+ * ext/socket/basicsocket.c (bsock_recv_nonblock):
+ adjust for above change, make private
+ * ext/socket/socket.c (sock_recvfrom_nonblock): ditto
+ * ext/socket/udpsocket.c (udp_recvfrom_nonblock): ditto
+ * ext/socket/lib/socket.rb (BasicSocket#recv_nonblock):
+ new wrapper for private method, move RDoc
+ (Socket#recvfrom_nonblock): ditto
+ (UDPSocket#recvfrom_nonblock): ditto
- * rational.c (rb_flt_rationalize_with_prec): new public C function
- to rationalize a Float instance with a precision.
+Mon Nov 16 21:27:54 2015 Naohisa Goto <ngotogenome@gmail.com>
- * rational.c (rb_flt_rationalize): new public C function to
- rationalize a Float instance. A precision is calculated from
- the given float number.
+ * test/dtrace/helper.rb (Dtrace::TestCase#trap_probe): dtrace buffer
+ size is set as 8m on Solaris (default 4m). [Bug #11697]
- * include/ruby/intern.h: Add rb_flt_rationalize_with_prec and
- rb_flt_rationalize.
+Mon Nov 16 20:03:14 2015 Naotoshi Seo <sonots@gmail.com>
- * parse.y: implement number literal suffixes, 'r' and 'i'.
- [ruby-core:55096] [Feature #8430]
+ * lib/logger.rb: Add Logger#reopen
- * bootstraptest/test_literal_suffix.rb: add tests for parser to scan
- number literals with the above tsuffixes.
+Mon Nov 16 18:21:52 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Aug 1 23:55:08 2013 Tanaka Akira <akr@fsij.org>
+ * object.c (rb_obj_dig): dig in nested structs too.
- * bignum.c (rb_big2str1): Remove a local variable.
+ * struct.c (rb_struct_dig): new method Struct#dig.
+ [Feature #11688]
-Thu Aug 1 23:33:01 2013 Tanaka Akira <akr@fsij.org>
+Mon Nov 16 17:41:33 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * bignum.c (rb_cstr_to_inum): Use power_cache_get_power.
+ * compile.c (iseq_peephole_optimize): optimize tail calls on aref
+ and aset specialized instructions.
-Thu Aug 1 21:02:48 2013 Tanaka Akira <akr@fsij.org>
+ * compile.c (iseq_peephole_optimize): optimize replaced leave
+ instruction copied to jump instruction too.
- * bignum.c (rb_big2str1): Raise an error for too big number.
+Mon Nov 16 16:39:38 2015 Akinori MUSHA <knu@iDaemons.org>
-Thu Aug 1 20:46:29 2013 Tanaka Akira <akr@fsij.org>
+ * lib/set.rb: Enable frozen_string_literal.
- * bignum.c (power_cache_get_power): Hide cached Bignum objects.
+ * lib/set.rb: Move << out of the begin block that ensures pop.
-Thu Aug 1 19:15:05 2013 Tanaka Akira <akr@fsij.org>
+Mon Nov 16 16:28:30 2015 Akinori MUSHA <knu@iDaemons.org>
- * bignum.c (rb_big2str1): Remove non-trim mode.
- (rb_big2str0): Non-trim mode implemented here.
- (big2str_find_n1): Change the result type to long again.
- (big2str_base_powerof2): Don't take arguments: len and trim.
- (rb_big2str): Follow above change.
+ * lib/set.rb (Hash#flatten!, #add?, #delete?, #collect!, #reject!,
+ #select!, #^, #classify): Micro-optimize some methods for
+ performance and readability.
-Thu Aug 1 12:37:58 2013 Tanaka Akira <akr@fsij.org>
+Mon Nov 16 16:17:58 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * bignum.c (big2str_alloc): New function to allocate the result string.
- It is called after actual length is calculated.
- (big2str_struct): Add fields: negative, result and ptr.
- (big2str_orig): Write out the result via b2s->ptr.
- (big2str_orig): Ditto.
- (rb_big2str1): Don't allocate the result string at beginning.
+ * ChangeLog: fixed accidentally commit.
-Thu Aug 1 07:36:27 2013 Tanaka Akira <akr@fsij.org>
+Mon Nov 16 16:10:51 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * bignum.c (big2str_orig): Use temporary buffer when trim mode.
+ * mkconfig.rb: Add some high-level documentation.
+ [ci skip][fix GH-1081] Patch by @ulfalizer
-Thu Aug 1 06:28:48 2013 Tanaka Akira <akr@fsij.org>
+Mon Nov 16 15:59:14 2015 yui-knk <spiketeika@gmail.com>
- * bignum.c (big2str_orig): Simplified because RBIGNUM_LEN(x) <= 2 now.
- (big2str_struct): Two fields added: hbase2, hbase2_numdigits.
- (rb_big2str1): Initialize above fields.
+ * proc.c: Add call-seq of `Method#super_method`
+ [ci skip][fix GH-1094]
-Thu Aug 1 04:06:17 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Nov 16 15:58:39 2015 Kenichi Kamiya <kachick1@gmail.com>
- * lib/rdoc/options.rb (RDoc#finish): include root path in include
- paths, to work in another directory than the source directory.
- [ruby-core:56282] [Bug #8712]
+ * struct.c: Standardize a method signature of Struct#[]=.
+ [ci skip][fix GH-1095]
- * test/test_rdoc_markup_pre_process.rb (TestRDocMarkupPreProcess#setup):
- fix input_file_name, as the test script is not pre-processed.
+Mon Nov 16 15:42:36 2015 Akinori MUSHA <knu@iDaemons.org>
-Thu Aug 1 01:45:18 2013 Tanaka Akira <akr@fsij.org>
+ * lib/set.rb (#>=, #>, #<=, #<): Make use of Hash#>=, #>, #<, and
+ #<= when comparing against an instance of the same kind.
- * bignum.c (big2str_karatsuba): Fix a condition of power_level.
+Mon Nov 16 15:37:11 2015 Naotoshi Seo <sonots@gmail.com>
-Thu Aug 1 01:09:02 2013 Tanaka Akira <akr@fsij.org>
+ * lib/logger.rb: Support symbol and string log level setting
- * bignum.c (LOG2_KARATSUBA_BIG2STR_DIGITS): Removed.
- (KARATSUBA_BIG2STR_DIGITS): Removed.
- (big2str_numdigits_cache): New variable.
- (power_cache_get_power): Merged with power_cache_get_power0.
- This function returns maxpow_in_bdigit_dbl(base)**(2**power_level).
- (rb_big2str1): use power_cache_get_power.
+Mon Nov 16 15:33:11 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Wed Jul 31 23:59:28 2013 Tanaka Akira <akr@fsij.org>
+ * tool/rbinstall.rb: fix wrong permission for gem specification without
+ zlib runtime. [Bug #11685][ruby-dev:49343]
- * bignum.c (big2str_find_n1): Change the return type to size_t.
- (big2str_orig): Ditto.
- (big2str_karatsuba): Ditto.
- (rb_big2str1): Follow the above changes.
+Mon Nov 16 12:11:11 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Wed Jul 31 23:19:06 2013 Tanaka Akira <akr@fsij.org>
+ * lib/webrick/httpauth/basicauth.rb: fix a typo.
+ [ci skip][fix GH-1099] Patch by @jwworth
+ * lib/webrick/httpauth/digestauth.rb: ditto.
- * bignum.c (power_cache_get_power): Change numdigits_ret to size_t *.
- (big2str_orig): Change len argument to size_t.
- (big2str_karatsuba): Ditto.
- (rb_big2str1): Follow the above changes.
+Sun Nov 15 18:28:43 2015 Kenichi Kamiya <kachick1@gmail.com>
-Wed Jul 31 22:59:47 2013 Kouhei Sutou <kou@cozmixng.org>
+ * vm_method.c (set_method_visibility): should fail if the receiver
+ is frozen. [ruby-core:71489] [Bug #11687]
- * test/rexml/parse/test_notation_declaration.rb: Change class
- name to follow file name change.
+Sat Nov 14 22:15:07 2015 Tanaka Akira <akr@fsij.org>
-Wed Jul 31 22:57:50 2013 Kouhei Sutou <kou@cozmixng.org>
+ * ext/socket/lib/socket.rb: Specify frozen_string_literal: true.
- * test/rexml/test_notationdecl_parsetest.rb: Rename to ...
- * test/rexml/parse/test_notation_declaration.rb: ... this.
+Sat Nov 14 21:44:56 2015 Tanaka Akira <akr@fsij.org>
-Wed Jul 31 22:54:39 2013 Kouhei Sutou <kou@cozmixng.org>
+ * lib/time.rb: Use "<<" to reduce string allocation.
- * test/rexml/test_notationdecl_mixin.rb: Remove duplicated tests.
+Sat Nov 14 17:45:49 2015 Tanaka Akira <akr@fsij.org>
-Wed Jul 31 22:52:55 2013 Kouhei Sutou <kou@cozmixng.org>
+ * lib/tsort.rb: Specify frozen_string_literal: true.
- * test/rexml/test_notationdecl_parsetest.rb: Fix typos in expected
- value.
- pubilc ->
- public
- ^^
+Sat Nov 14 17:25:15 2015 Tanaka Akira <akr@fsij.org>
-Wed Jul 31 22:50:51 2013 Kouhei Sutou <kou@cozmixng.org>
+ * lib/resolv-replace.rb: Specify frozen_string_literal: true.
- * test/rexml/test_notationdecl_parsetest.rb: Add tests that focus
- system literal in external ID system notation declaration.
+Sat Nov 14 17:00:13 2015 Tanaka Akira <akr@fsij.org>
-Wed Jul 31 22:36:21 2013 Tanaka Akira <akr@fsij.org>
+ * lib/time.rb: Specify frozen_string_literal: true.
- * bignum.c (bary_cmp): Extracted from rb_big_cmp.
- (power_cache_get_power): Change n1 argument (number of digits) to
- power_level which is just passed to power_cache_get_power0.
- (big2str_karatsuba): Ditto.
- (rb_big2str1): Calculate the initial power_level.
+Sat Nov 14 16:43:02 2015 Tanaka Akira <akr@fsij.org>
-Wed Jul 31 22:04:36 2013 Kouhei Sutou <kou@cozmixng.org>
+ * lib/open3.rb: Specify frozen_string_literal: true.
- * test/rexml/test_notationdecl_parsetest.rb: Fix a typo.
- Extern ID ->
- ExternalID
- ^^
+Sat Nov 14 05:04:09 2015 Koichi Sasada <ko1@atdot.net>
-Wed Jul 31 22:01:36 2013 Kouhei Sutou <kou@cozmixng.org>
+ * node.h: remove old comments.
- * test/rexml/test_notationdecl_parsetest.rb: Add tests that focus
- public ID in external ID notation declaration.
+Sat Nov 14 04:55:36 2015 Koichi Sasada <ko1@atdot.net>
-Wed Jul 31 22:01:24 2013 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+ * refactoring CREF related code.
- * parse.y: fix build error with bison-3.0.
+ * eval_intern.h: remove unused setter functions.
+ CREF_CLASS_SET()
+ CREF_NEXT_SET()
+ CREF_SCOPE_VISI_COPY()
-Wed Jul 31 21:58:53 2013 Kouhei Sutou <kou@cozmixng.org>
+ * eval_intern.h: rename flags:
+ * NODE_FL_CREF_PUSHED_BY_EVAL_ -> CREF_FL_PUSHED_BY_EVAL
+ * NODE_FL_CREF_OMOD_SHARED_ -> CREF_FL_OMOD_SHARED
+ and use IMEMO_FL_USER1/2.
- * test/rexml/test_notationdecl_parsetest.rb: Split test patterns.
+ * vm.c (vm_cref_new): accept push_by_eval parameter.
-Wed Jul 31 21:42:33 2013 Kouhei Sutou <kou@cozmixng.org>
+ * vm.c (vm_cref_new_use_prev): added for rb_vm_rewrite_cref().
- * test/rexml/test_notationdecl_parsetest.rb: Group tests.
+ * vm_insnhelper.c (vm_cref_push): accept pushed_by_eval parameter.
-Wed Jul 31 21:37:51 2013 Kouhei Sutou <kou@cozmixng.org>
+ * vm_insnhelper.h: remove unused macros:
+ COPY_CREF_OMOD() and COPY_CREF().
- * test/rexml/test_notationdecl_mixin.rb (TestNotationDecl#test_name):
- Move to ...
- * test/rexml/test_notationdecl_parsetest.rb
- (TestNotationDecl#test_name): ... here.
+ * vm_eval.c, insns.def: catch up this fix.
-Wed Jul 31 21:37:47 2013 Kouhei Sutou <kou@cozmixng.org>
+Sat Nov 14 02:58:03 2015 Koichi Sasada <ko1@atdot.net>
-Wed Jul 31 21:31:49 2013 Kouhei Sutou <kou@cozmixng.org>
+ * vm.c (vm_define_method): refactoring.
+ * get CREF in this function.
+ * cbase is no longer needed (CREF_CLASS(cref) is enough).
- * test/rexml/test_notationdecl_parsetest.rb: Remove setup because it
- doesn't share anything with other tests.
+ * compile.c: RubyVM::FrozenCore.define_method only accept 2 args.
-Wed Jul 31 21:24:55 2013 Kouhei Sutou <kou@cozmixng.org>
+Sat Nov 14 02:34:43 2015 Koichi Sasada <ko1@atdot.net>
- * test/rexml/test_attributes_mixin.rb: Remove a needless shebang.
- * test/rexml/test_notationdecl_mixin.rb: ditto.
- * test/rexml/test_doctype.rb: ditto.
- * test/rexml/test_xml_declaration.rb: ditto.
- * test/rexml/test_changing_encoding.rb: ditto.
+ * vm.c (vm_define_method): do not use current CREF immediately,
+ but check CREF in environment or methods. Methods defined in methods
+ should be public.
+ [Bug #11571]
-Wed Jul 31 21:20:08 2013 Kouhei Sutou <kou@cozmixng.org>
+ * vm_method.c (rb_scope_module_func_check): check CREF in env or me.
+ if CREF is contained by `me', then return FALSE.
- * test/rexml/test_notationdecl_parsetest.rb: remove a needless shebang.
+ * test/ruby/test_method.rb: add a test.
-Wed Jul 31 20:11:01 2013 Masaki Matsushita <glass.saga@gmail.com>
+Sat Nov 14 02:19:16 2015 Koichi Sasada <ko1@atdot.net>
- * string.c (rb_str_rindex): fix bug introduced in r42269.
- "".rindex("") should return 0.
- (str_rindex): ditto.
+ * method.h: constify rb_cref_t::scope_visi;
-Wed Jul 31 19:55:33 2013 Tanaka Akira <akr@fsij.org>
+ * eval_intern.h (CREF_SCOPE_VISI_COPY): catch up this fix.
- * bignum.c (MAX_BIG2STR_TABLE_ENTRIES): Use SIZEOF_SIZE_T.
- (power_cache_get_power0): Add rb_bug call for too bit i argument.
- (power_cache_get_power): Simplified.
+ * vm_method.c: ditto.
-Wed Jul 31 18:32:25 2013 Akinori MUSHA <knu@iDaemons.org>
+Sat Nov 14 01:53:52 2015 Naohisa Goto <ngotogenome@gmail.com>
- * lib/uri/common.rb (URI.decode_www_form_component): Use String#b.
+ * pack.c (pack_unpack, AVOID_CC_BUG): Very ugly workaround for
+ optimization bug of Oracle Solaris Studio 12.4 on Solaris
+ with -xO4 optimization option. [Bug #11684]
-Wed Jul 31 18:24:02 2013 Shugo Maeda <shugo@ruby-lang.org>
+Fri Nov 13 23:00:23 2015 Hiroshi Shirosaki <h.shirosaki@gmail.com>
- * eval.c (rb_mod_refine, mod_using, top_using): don't show
- warnings because Refinements are no longer experimental.
- [ruby-core:55993] [Feature #8632]
+ * configure.in: unset LD_PRELOAD on mingw. msys2 child processes
+ crash at make test-all with LD_PRELOAD.
+ [ruby-core:71461] [Bug #11680]
- * test/ruby/test_refinement.rb: related test.
+Fri Nov 13 14:00:43 2015 Zachary Scott <zzak@ruby-lang.org>
- * NEWS: fixes for the above change.
+ * ext/openssl/ossl_pkey.c: Merge ruby/openssl@b9ea8ef [Bug #10735]
-Wed Jul 31 17:55:55 2013 Shota Fukumori <her@sorah.jp>
+Fri Nov 13 13:09:16 2015 Zachary Scott <zzak@ruby-lang.org>
- * lib/uri/common.rb (URI.decode_www_form_component):
- Don't raise error when str includes multibyte characters.
+ * ext/openssl/ossl_ssl.c: Merge ruby/openssl@81e1a30
-Wed Jul 31 17:45:39 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * test/openssl/test_ssl.rb: ditto
- * string.c (rb_str_rindex): performance improvement by using
- memrchr(3).
+Fri Nov 13 13:05:37 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Jul 31 16:43:30 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * prelude.rb (Thread.exclusive): warn as deprecated.
- * string.c (rb_str_rindex): refactoring and avoid to call str_nth() if
- pos == 0.
+Fri Nov 13 10:36:39 2015 Victor Nawothnig <Victor.Nawothnig@gmail.com>
-Wed Jul 31 14:41:36 2013 Akinori MUSHA <knu@iDaemons.org>
+ * parse.y (new_unless): optimize constant condition for `unless`
+ as well as `if`. [Fix GH-1092]
- * lib/set.rb: [DOC] Add a couple of notes on Hash as storage.
- ref. [Feature #6589]
+Fri Nov 13 10:08:41 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Wed Jul 31 14:38:52 2013 Akinori MUSHA <knu@iDaemons.org>
+ * ext/psych/psych.gemspec: bump version to 2.0.15
- * lib/set.rb: [DOC] Fix example result. Hash is now ordered.
+Thu Nov 12 18:44:26 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Jul 31 14:38:10 2013 Akinori MUSHA <knu@iDaemons.org>
+ * parse.y (parser_magic_comment): should match exactly.
+ [ruby-core:71460] [Bug #11679]
- * lib/set.rb: [DOC] Use the term "sorted" instead of "ordered"
- when mentioning SortSet.
+Thu Nov 12 16:16:20 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Jul 31 12:18:47 2013 Tanaka Akira <akr@fsij.org>
+ * template/prelude.c.tmpl: enable tail call optimization.
- * bignum.c (big2str_struct): New structure.
- (big2str_orig): Use big2str_struct.
- (big2str_karatsuba): Ditto.
- (rb_big2str1): Ditto.
+Thu Nov 12 14:17:01 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Jul 31 12:02:16 2013 Zachary Scott <e@zzak.io>
+ * parse.y (parser_yylex): ANDDOT at the head of the line denote
+ line continuation from previous one to support fluent interface,
+ as well as single dot.
- * lib/rubygems.rb: [DOC] typo in url patch by @Red54 [Fixes #369]
- https://github.com/ruby/ruby/pull/369
+Thu Nov 12 13:49:50 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Wed Jul 31 07:09:07 2013 Eric Hodel <drbrain@segment7.net>
+ * lib/rubygems: Update to RubyGems 2.5.0+ HEAD(db78980).
+ this version includes #1367 , #1373 , #1375
+ * test/rubygems: ditto.
- * lib/rubygems: Import RubyGems from master as of commit 523551c
- * test/rubygems: ditto.
+Thu Nov 12 10:53:41 2015 Eric Wong <e@80x24.org>
-Tue Jul 30 22:21:54 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * benchmark/bm_io_nonblock_noex2.rb: new benchmark based
+ on bm_io_nonblock_noex.rb
+ * io.c (io_read_nonblock): move documentation to prelude.rb
+ (io_write_nonblock): ditto
+ (Init_io): private, internal methods for prelude.rb use only
+ * prelude.rb (IO#read_nonblock): wrapper + documentation
+ (IO#write_nonblock): ditto
+ [ruby-core:71439] [Feature #11339]
- * test/ruby/test_hash.rb: add a test for enumeration order of Hash.
+Wed Nov 11 18:30:28 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Jul 30 18:52:27 2013 Akinori MUSHA <knu@iDaemons.org>
+ * sprintf.c (rb_str_format): look up the key, then get default
+ value and raise KeyError if the returned value is nil.
+ [ruby-dev:49338] [Ruby trunk - Bug #11677]
- * lib/set.rb (Set#intersect?, Set#disjoint?): Add new methods for
- testing if two sets have any element in common.
- [ruby-core:45641] [Feature #6588] Based on the code by marcandre.
+Wed Nov 11 17:38:24 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Jul 30 17:16:15 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm_eval.c (local_var_list_add): skip internal local variable
+ name by its type but not if it has a name. internal local
+ variable names are just unique per frame, not globally.
+ [ruby-core:71437] [Bug #11674]
- * sprintf.c (ruby__sfvextra): add QUOTE flag to escape unprintable
- characters.
+Wed Nov 11 14:14:33 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Tue Jul 30 11:00:52 2013 Zachary Scott <e@zzak.io>
+ * transcode.c: fix a typo
+ [ci skip][fix GH-1091] Patch by @jwworth
- * ext/curses/extconf.rb: [DOC] nodoc to reduce Object pollution
+Wed Nov 11 11:58:38 2015 Shugo Maeda <shugo@ruby-lang.org>
-Tue Jul 30 08:19:42 2013 Tanaka Akira <akr@fsij.org>
+ * lib/net/ftp.rb (initialize): Connections are in passive mode per
+ default now. The default mode can be changed by
+ Net::FTP.default_passive=.
+ [ruby-core:71146] [Feature #11612]
- * sizes.c (Init_sizes): Define sizes only if the type actually exists.
+ * lib/net/ftp.rb (default_passive=, default_passive): new methods.
-Mon Jul 29 22:55:26 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Nov 11 09:03:12 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * sizes.c (Init_sizes): define RbConfig::SIZEOF. [Feature #8568]
+ * sprintf.c (rb_str_format): respect default value of a hash. no
+ longer raises KeyError unless the default value of the hash is
+ nil. [ruby-core:71354] [Bug #11661]
-Mon Jul 29 22:25:20 2013 Zachary Scott <e@zzak.io>
+Tue Nov 10 20:35:12 2015 Tanaka Akira <akr@fsij.org>
- * ext/curses/curses.c: [DOC] Update location of samples
- * samples/curses/*: Move Curses samples and refactor from mixin
- The samples are included in rdoc for module and use of mixin is
- confusing
+ * lib/open-uri.rb: Remove indicator for "frozen_string_literal: true".
-Mon Jul 29 22:16:11 2013 Tanaka Akira <akr@fsij.org>
+ * lib/pp.rb: Ditto.
- * bignum.c (LOG2_KARATSUBA_BIG2STR_DIGITS): Renamed from
- LOG2_KARATSUBA_DIGITS.
- (KARATSUBA_BIG2STR_DIGITS): Renamed from KARATSUBA_DIGITS.
+ * lib/prettyprint.rb: Ditto.
-Mon Jul 29 22:04:45 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * lib/resolv.rb: Ditto.
- * hash.c (rb_hash_compare_by_id): add function prototype.
+ * lib/securerandom.rb: Ditto.
-Mon Jul 29 21:53:41 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * lib/tmpdir.rb: Ditto.
- * hash.c (rb_hash_compare_by_id): don't call rb_hash_rehash()
- if self.compare_by_identity? == true.
+ * lib/unicode_normalize/tables.rb: Ditto.
-Mon Jul 29 21:29:48 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * test/net/ftp/test_buffered_socket.rb: Ditto.
- * hash.c (rb_hash_assoc): performance improvement by replacing
- compare function in RHASH(hash)->ntbl->type temporarily like r42224.
- it falls back to rb_hash_foreach() if st_lookup() doesn't find the key.
+ * test/net/ftp/test_mlsx_entry.rb: Ditto.
- * test/ruby/test_hash.rb: add a test for above.
+ * test/open-uri/test_open-uri.rb: Ditto.
-Mon Jul 29 21:15:30 2013 Akinori MUSHA <knu@iDaemons.org>
+ * test/open-uri/test_ssl.rb: Ditto.
- * test/ruby/test_lazy_enumerator.rb
- (TestLazyEnumerator#test_initialize): Make sure
- Enumerator::Lazy#initialize raises error if the object is
- frozen. The check was performed by rb_ivar_set() before
- rb_check_frozen() was added to enumerator_init().
+ * test/pathname/test_pathname.rb: Ditto.
-Mon Jul 29 21:06:42 2013 Akinori MUSHA <knu@iDaemons.org>
+ * test/test_pp.rb: Ditto.
- * enumerator.c (enumerator_init): Add a frozenness check to
- prevent a frozen Enumerator object from being reinitialized with
- a different enumerable object. This is the least we should do,
- and more fixes will follow. [Fixes GH-368] Patch by Kenichi
- Kamiya.
+ * test/test_prettyprint.rb: Ditto.
- * enumerator.c (generator_init): Ditto.
+ * tool/transcode-tblgen.rb: Ditto.
-Mon Jul 29 20:14:24 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * ext/pathname/lib/pathname.rb: Ditto.
- * hash.c (rb_hash_assoc): revert r42224. table->type->compare is
- called only if hashes are matched.
+Tue Nov 10 18:42:24 2015 Aleksandrs Ledovskis <aleksandrs@ledovskis.lv>
- * test/ruby/test_hash.rb: add a test to check using #== to compare.
+ * defs/id.def, parse.y: Switch internal token name to reflect
+ current form of safe-call operator. [Fix GH-1090]
-Mon Jul 29 17:00:31 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Nov 10 18:25:56 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * parse.y (yycompile): store file name as String to keep the encoding.
+ * hash.c (rb_hash_to_proc): use rb_func_proc_new to make light
+ weight proc. [Feature #11653]
- * parse.y (rb_parser_compile_string_path, rb_parser_compile_file_path):
- new functions to pass file name as a String.
+Tue Nov 10 18:23:35 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * parse.y (gettable_gen): return a copy of the original file name, not
- a copy in filesystem encoding.
+ * proc.c (cfunc_proc_t): add room for me.
- * vm_eval.c (eval_string_with_cref): use Qundef instead of "(eval)".
+ * proc.c (cfunc_proc_new): generalise for cfunc proc without env.
-Mon Jul 29 16:53:18 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * proc.c (rb_func_proc_new, rb_func_lambda_new): new functions to
+ make proc/lambda without env from cfunc.
- * hash.c (rb_hash_initialize_copy): copy st_table type even if empty.
- [ruby-core:56256] [Bug #8703]
+Tue Nov 10 17:32:35 2015 Naohisa Goto <ngotogenome@gmail.com>
-Mon Jul 29 16:34:29 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * bootstraptest/test_fork.rb ([ruby-dev:37934]): :NPROC (RLIMIT_NPROC)
+ is not supported on some platforms (e.g. Solaris 10).
- * hash.c (rb_hash_initialize_copy): clear old table before copy new
- table.
+Tue Nov 10 16:57:14 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Jul 29 16:34:09 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * hash.c (rb_hash_to_proc): new method Hash#to_proc.
+ [Feature #11653]
- * hash.c (rb_hash_assoc): aggregate object can be initialized only
- with link time constants.
+Tue Nov 10 14:34:09 2015 NARUSE, Yui <naruse@ruby-lang.org>
-Mon Jul 29 14:54:44 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * time.c (rb_time_timespec_new): swap utc and localtime
+ to generate gmt flag by INT_MAX - gmtoff.
- * hash.c (rb_hash_assoc): performance improvement by replacing
- compare function in RHASH(hash)->ntbl->type temporarily.
+Tue Nov 10 14:01:59 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Jul 29 14:52:46 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * hash.c (rb_hash_{le,lt,ge,gt}): new methods, Hash#<=, Hash#<,
+ Hash#>=, Hash#>, to test if all elements of a hash are also
+ included in another hash, and vice versa.
+ [ruby-core:68561] [Feature #10984]
- * lib/mkmf.rb (xsystem): expand environment variable in all macros not
- expanded with RbConfig. [Bug #8702]
+Tue Nov 10 11:25:29 2015 NARUSE, Yui <naruse@ruby-lang.org>
- * test/mkmf/test_framework.rb (create_framework): replace all $@ not
- only once.
+ * time.c (rb_timespec_now): added. [Feature #11558]
-Mon Jul 29 06:54:30 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * time.c (rb_time_timespec_new): added. [Feature #11558]
- * win32/win32.c (rb_w32_pipe): use enum for compile time constants,
- instead of const int for debugging.
+Tue Nov 10 06:17:17 2015 Eric Wong <e@80x24.org>
-Mon Jul 29 00:11:49 2013 Tanaka Akira <akr@fsij.org>
+ * variable.c (rb_autoload_load): allow recursive calls
+ [ruby-core:71345] [Bug #11658]
+ * test/ruby/test_autoload.rb (test_autoload_while_autoloading):
+ new test by: Hiroshi Shirosaki <h.shirosaki@gmail.com>
+ [ruby-core:71390]
- * bignum.c (bigdivrem): Specialized implementation added for
- nx == 2 && ny == 2
+Tue Nov 10 00:36:46 2015 Tanaka Akira <akr@fsij.org>
-Sun Jul 28 20:28:41 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * lib/resolv.rb (Resolv::DNS::Message::MessageEncoder#put_labels):
+ Prevent overflow of pointer to labels.
+ Patch by Hannes Georg. [ruby-core:71248] [Bug #11632]
- * io.c (io_getpartial): use rb_str_locktmp_ensure().
- [ruby-core:56121] [Bug #8669]
+Tue Nov 10 00:25:41 2015 Kazuki Tsujimoto <kazuki@callcc.net>
- * io.c (rb_io_sysread): ditto.
+ * gems/bundled_gems: update to power_assert 0.2.6.
- * test/ruby/test_io.rb: add tests for above.
+Mon Nov 9 21:48:17 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun Jul 28 20:10:49 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm_eval.c (rb_check_funcall_default): split from
+ rb_check_funcall to return the given fallback value.
- * ext/extmk.rb (extmake): should make static libraries for extensions
- to be statically linked. [Bug #7948]
+ * object.c (rb_obj_dig): use rb_check_funcall_default so that tail
+ call optimization will be possible. [Feature #11643]
-Sun Jul 28 17:38:32 2013 Masaki Matsushita <glass.saga@gmail.com>
+Mon Nov 9 21:27:23 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * string.c: add internal API rb_str_locktmp_ensure().
+ * array.c (rb_ary_dig): new method Array#dig.
- * io.c (io_fread): use rb_str_locktmp_ensure().
- [ruby-core:56121] [Bug #8669]
+ * hash.c (rb_hash_dig): new method Hash#dig.
- * test/ruby/test_io.rb: add a test for above.
+ * object.c (rb_obj_dig): dig in nested arrays/hashes.
+ [Feature #11643]
-Sun Jul 28 13:04:39 2013 Masaki Matsushita <glass.saga@gmail.com>
+Mon Nov 9 18:00:47 2015 Yuki Nishijima <mail@yukinishijima.net>
- * io.c (interpret_seek_whence): support SEEK_DATA and SEEK_HOLE.
- These are whences for lseek(2) supported by Linux since version 3.1.
- [ruby-core:56123] [Feature #8671]
+ * gems/bundled_gems: Upgrade the did_you_mean gem to 1.0.0.beta3
- * test/ruby/test_io.rb: Add tests for above.
+Mon Nov 9 17:38:14 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Sun Jul 28 12:41:39 2013 Tanaka Akira <akr@fsij.org>
+ * test/runner.rb: use official repository for coverage tool.
+ * Makefile.in: ditto.
+ * common.mk: ditto.
+ * .gitignore: ignored third party repositories.
- * bignum.c (absint_numwords_generic): The char_bit variable changed
- to static constant.
+Mon Nov 9 17:29:09 2015 Shugo Maeda <shugo@ruby-lang.org>
-Sun Jul 28 12:03:23 2013 Tanaka Akira <akr@fsij.org>
+ * compile.c (iseq_compile_each): Dynamic string literals should be
+ frozen.
+ [ruby-core:57574] [Feature #8976]
- * bignum.c: Constify bary_* functions.
+Mon Nov 9 15:56:07 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Sun Jul 28 11:12:07 2013 Tanaka Akira <akr@fsij.org>
+ * common.mk: Use ruby organization url for simplecov repository.
- * include/ruby/intern.h (rb_absint_size): Declaration moved from
- internal.h to calculate required buffer size to pack integers.
- (rb_absint_numwords): Ditto.
- (rb_absint_singlebit_p): Ditto.
- [ruby-core:42813] [Feature #6065]
+Sun Nov 8 16:24:09 2015 Masaki Matsushita <glass.saga@gmail.com>
-Sun Jul 28 10:54:26 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * NEWS: describe addition of File::TMPFILE
- * win32/win32.c (rb_w32_pipe): fix pipe name formatting. as "%x" may
- not contain '0' at all, fill at fixed position instead.
+Sun Nov 8 15:19:17 2015 Masaki Matsushita <glass.saga@gmail.com>
-Sun Jul 28 00:35:14 2013 Tanaka Akira <akr@fsij.org>
+ * file.c: Add O_TMPFILE.
- * bignum.c (rb_big_size): Return the bignum "bytewise" size.
- [ruby-core:55578] [Feature #8553]
- This is accepted by matz on DevelopersMeeting20130727Japan.
+Sun Nov 8 14:24:43 2015 windwiny <windwiny.ubt@gmail.com>
-Sun Jul 28 00:07:48 2013 Tanaka Akira <akr@fsij.org>
+ * method.h (METHOD_ENTRY_{VISI,BASIC,FLAGS}_SET): suppress
+ shift-op-parentheses warnings. [Fix GH-1082]
- * include/ruby/intern.h (rb_integer_pack): Declaration moved from
- internal.h.
- (rb_integer_unpack): Ditto.
- [ruby-core:42813] [Feature #6065]
+Sun Nov 8 14:01:22 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Fri Jul 26 23:18:13 2013 Kouhei Sutou <kou@cozmixng.org>
+ * ext/psych/psych_emitter.c: backport 5bd7744 from tenderlove/psych.
+ support backward compatibility of Ruby 2.0
- * NEWS: Add a new feature that REXML::Parsers::StreamParser
- supports "entity" event.
+Sun Nov 8 10:55:10 2015 Anton Davydov <antondavydov.o@gmail.com>
-Fri Jul 26 23:14:31 2013 Kouhei Sutou <kou@cozmixng.org>
+ * io.c (rb_io_gets_m): Update IO#gets doc for characters more than
+ 1 byte. [Fix GH-1085]
- * lib/rexml/parsers/streamparser.rb
- (REXML::Parsers::StreamParser#parse): Add "entity" event support to
- listener. [Bug #8689] [ruby-dev:47542]
- Reported by Ippei Obayashi.
- * test/rexml/test_stream.rb (StreamTester#entity): Add a test for
- the above case.
+Sun Nov 8 10:37:58 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Fri Jul 26 23:05:27 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * lib/uri/ftp.rb: fix a typo.
+ [fix GH-1084][ci skip] Patch by @windwiny
- * parse.y (parser_yylex): separate numeric literal from succeeding
- token, and treat 'e' as floating point number only if followed by
- exponent part.
+Sun Nov 8 08:10:31 2015 Koichi Sasada <ko1@atdot.net>
-Fri Jul 26 22:14:10 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm_trace.c (exec_hooks_precheck): check need_clean everytime
+ to clean-up unused hooks.
- * vm_exec.h (CHECK_VM_STACK_OVERFLOW_FOR_INSN): surround with
- do/while (0), and remove unnecessary casts.
+ * vm_trace.c (list->need_clean): use as boolean value.
-Fri Jul 26 20:12:07 2013 Akinori MUSHA <knu@iDaemons.org>
+Sun Nov 8 01:31:27 2015 NARUSE, Yui <naruse@ruby-lang.org>
- * ext/syslog/lib/syslog/logger.rb (Syslog::Logger): Add facility
- to Syslog::Logger. [Fixes GH-305] patch by Max Shytikov
- https://github.com/ruby/ruby/pull/305
+ * lib/net/http.rb (Net::HTTP#initialize):
+ default value of Net::HTTP#open_timeout is now 60 (was nil).
-Fri Jul 26 19:25:17 2013 Koichi Sasada <ko1@atdot.net>
+Sat Nov 7 12:18:05 2015 Eric Wong <e@80x24.org>
- * vm_exec.h, tool/instruction.rb: not an error, but a BUG if stack
- overflow checking failed just before/after the beginning of an
- instruction. It should be treated as a BUG.
- Please tell us if your code cause BUG with this problem.
- This check will removed soon (for performance).
+ * string.c (id_to_s): remove redundant variable
+ (rb_obj_as_string): trade id_to_s for idTo_s
+ (rb_str_equal): replace rb_intern(...) with pre-defined ID
+ (rb_str_cmp_m): ditto
+ (rb_str_match): ditto
+ (str_upto_each): ditto
+ (rb_str_sum): ditto
+ (Init_String): remove id_to_s initialization
-Fri Jul 26 18:30:14 2013 Koichi Sasada <ko1@atdot.net>
+Sat Nov 7 11:40:05 2015 Eric Wong <e@80x24.org>
- * array.c (ary_memcpy): cast to int to suppress a warning.
+ * thread.c (rb_cThreadShield): make static
-Fri Jul 26 18:21:58 2013 Koichi Sasada <ko1@atdot.net>
+Sat Nov 7 09:51:38 2015 Koichi Sasada <ko1@atdot.net>
- * array.c (ary_memcpy): try to enable optimization.
- At least on my environments, I don't see any errors
- with many trials. Please tell us if you find any GC bugs.
+ * vm_trace.c (rb_threadptr_exec_event_hooks_orig):
+ maintain trace_running counter on internal events.
-Fri Jul 26 17:49:26 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ This patch is made by Takashi Kokubun <takashikkbn@gmail.com>.
+ [Bug #11603] https://github.com/ruby/ruby/pull/1059
- * win32/file.c (fix_string_encoding): fix target encoding. the
- parameter `encoding' is not the target encoding but the original
- encoding.
+Sat Nov 7 03:32:27 2015 Koichi Sasada <ko1@atdot.net>
-Fri Jul 26 14:05:19 2013 Zachary Scott <e@zzak.io>
+ * include/ruby/ruby.h (RSTRUCT_PTR): need a close parenthesis.
- * ext/fiddle/*: [DOC] More doc on dlopen and RTLD_DEFAULT from r42184
+Sat Nov 7 01:32:06 2015 Naohisa Goto <ngotogenome@gmail.com>
-Fri Jul 26 13:08:53 2013 Zachary Scott <e@zzak.io>
+ * dir.c (dir_fileno, dirfd): support of Dir#fileno on Solaris 10.
+ Solaris 10 does not have dirfd, but the file descriptor of a
+ directory is stored in the d_fd or dd_fd member in the DIR struct.
+ Note that Solaris 11 has dirfd(3C).
- * ext/fiddle/lib/fiddle.rb: [DOC] Document Fiddle.dlopen(nil)
- * ext/fiddle/handle.c: [DOC] Document Fiddle::Handle.new(nil)
+ * configure.in: checks for DIR.d_fd and DIR.dd_fd on Solaris 10.
-Fri Jul 26 13:04:15 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Nov 6 23:13:53 2015 Kazuki Tanaka <gogotanaka@ruby-lang.org>
- * load.c (rb_load_internal): use rb_load_file_str() to keep path
- encoding.
+ * array.c: clarifies Array#reject! documentation.
+ [fix GH-894][ci skip] Patch by @GxSplinter
- * load.c (rb_require_safe): search in OS path encoding for Windows.
+Fri Nov 6 20:18:25 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * ruby.c (rb_load_file_str): load file with keeping path encoding.
+ * test/runner.rb: extracted test helper.
+ * test/lib/zombie_hunter.rb: ditto.
- * win32/file.c (rb_file_load_ok): use WCHAR type API assuming incoming
- path is encoded in UTF-8. [ruby-core:56136] [Bug #8676]
+Fri Nov 6 18:07:47 2015 Naohisa Goto <ngotogenome@gmail.com>
- * file.c (rb_str_encode_ospath): simplify using rb_str_conv_enc().
+ * include/ruby/ruby.h (rb_array_const_ptr, rb_struct_const_ptr):
+ Suppress pointer type mismatch warnings occurred with old version
+ of Fujitsu C Compiler (fcc) on Solaris 10. The warnings cause
+ failure of TestMkmf::TestConvertible. [Bug #11644] [ruby-dev:49326]
+ * include/ruby/ruby.h (FIX_CONST_VALUE_PTR): macro for the above,
+ only effective with fcc.
- * win32/file.c (fix_string_encoding): simplify with rb_str_conv_enc().
+Fri Nov 6 12:39:21 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * win32/file.c (convert_mb_to_wchar): use bare pointer instead of
- VALUE, and remove useless argument.
+ * defs/id.def (token_ops), parse.y (parser_yylex): change DOTQ
+ from ".?" to "&.". [ruby-core:71363] [Feature #11537]
-Fri Jul 26 11:42:07 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Nov 6 09:01:26 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * rational.c (f_round_common): Rational is expected to be returned by
- Rational#*, but mathn.rb breaks that assumption. [ruby-core:56177]
- [Bug #8687]
+ * parse.y (kwd_append): fix segv after invalid keyword argument,
+ preceding keyword list is NULL when syntax error is there.
+ [ruby-core:71356] [Bug #11663]
-Fri Jul 26 01:37:45 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Fri Nov 6 06:59:37 2015 Eric Wong <e@80x24.org>
- * include/ruby/ruby.h: check defined(USE_RGENGC_LOGGING_WB_UNPROTECT)
+ * test/ruby/test_autoload: hoist out ruby_impl_require
-Fri Jul 26 01:21:41 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Thu Nov 5 13:03:58 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * file.c (rb_file_expand_path_internal): fix r42160; skip '~'.
+ * defs/id.def (token_ops): gather associations between IDs,
+ operators, and parser tokens.
-Thu Jul 25 17:53:18 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Thu Nov 5 10:17:17 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/net/http.rb (Net::HTTP#connect): disable Nagle's algorithm on
- HTTP connection. [ruby-core:56158] [Feature #8681]
+ * ext/socket/socket.c (make_addrinfo): use RARRAY_ASET for
+ write-barrier.
-Thu Jul 25 17:49:42 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * ext/tk/tcltklib.c ({call,eval,invoke}_queue_handler): ditto.
- * re.c (rb_reg_to_s): convert closing parenthesis to the target encoding
- if it is ASCII incompatible encoding. [ruby-core:56063] [Bug #8650]
+ * ext/tk/tkutil/tkutil.c (ary2list, ary2list2): ditto.
-Thu Jul 25 17:21:21 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Nov 5 10:09:12 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * encoding.c (is_obj_encoding): new macro to check if obj is an
- Encoding. obj can be any type while is_data_encoding expects T_DATA
- only.
+ * ext/**/*.c: prefer RARRAY_AREF to indexing RARRAY_CONST_PTR.
+ pointed out by hanmac.
+ https://github.com/ruby/ruby/commit/3553a86#commitcomment-14187670
-Thu Jul 25 17:17:52 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Nov 4 17:33:24 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * file.c (rb_file_expand_path_internal): should clear coderange after
- copying user name as binary data.
+ * lib/debug.rb: Add documentation for #thread_list_all.
+ [Misc #11580][ci skip]
-Thu Jul 25 16:17:55 2013 Koichi Sasada <ko1@atdot.net>
+Wed Nov 4 15:45:59 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * encoding.c (check_encoding): Check T_DATA or not.
- is_data_encoding(obj) assumes that `obj' is T_DATA.
+ * class.c: fix documentation for rb_define_class{_id}_under.
+ [fix GH-991][ci skip] Patch by @kachick
-Thu Jul 25 13:06:46 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Nov 4 15:40:45 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * dir.c (dir_s_home): use rb_home_dir_of and rb_default_home_dir.
+ * method.h: fix typo. Patch by @davydovanton
+ [fix GH-1076][ci skip]
- * file.c (rb_home_dir_of): split from rb_home_dir() for the home
- directry of the given user, and the user name is a VALUE, not a bare
- pointer. should raise if the user does not exist.
+Wed Nov 4 15:39:32 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * file.c (rb_default_home_dir): split from rb_home_dir() for the home
- directry of the current user.
+ * hash.c: use correct grammar. Patch by @tveastman
+ [fix GH-1079][ci skip]
-Thu Jul 25 12:32:11 2013 Koichi Sasada <ko1@atdot.net>
+Wed Nov 4 11:38:23 2015 Jake Worth <jakeworth82@gmail.com>
- * ext/openssl/ossl.c: support additional three thread synchronization
- functions. [ruby-trunk - Bug #8386]
+ * process.c (proc_getsid): [DOC] Fix double word 'for' and typo.
+ [Fix GH-1080]
-Thu Jul 25 07:15:58 2013 Eric Hodel <drbrain@segment7.net>
+Wed Nov 4 06:01:52 2015 Eric Wong <e@80x24.org>
- * lib/rubygems: Import RubyGems from master as of commit 4ff70cc
- * test/rubygems: ditto.
+ * include/ruby/ruby.h (struct RObject): hide iv_index_tbl type
+ [ruby-core:71306] [Feature #11647]
-Wed Jul 24 20:57:44 2013 Koichi Sasada <ko1@atdot.net>
+Tue Nov 3 06:48:58 2015 Eric Wong <e@80x24.org>
- * compile.c (iseq_set_arguments): use RARRAY_RAWPTR() instead of
- RARRAY_PTR() because there is no new reference.
+ * variable.c (find_class_path): remove cast for rb_class_ivar_set
+ (rb_ivar_set): ditto
+ (rb_cvar_set): ditto
- * compile.c (iseq_set_exception_table): ditto.
+Tue Nov 3 06:18:21 2015 Eric Wong <e@80x24.org>
-Wed Jul 24 19:49:54 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * variable.c (rb_global_tbl): convert to id_table
- * lib/uri/generic.rb (find_proxy): raise BadURIError if the URI is
- a relative URI. [Bug #8645]
+Tue Nov 3 01:58:46 2015 Naohisa Goto <ngotogenome@gmail.com>
-Wed Jul 24 18:56:06 2013 Koichi Sasada <ko1@atdot.net>
+ * parse.y (NO_QCALL): fix type mismatch of operands that causes
+ compile error with Oracle Solaris Studio on Solaris.
+ [Bug #11645] [ruby-dev:49327]
- * vm_insnhelper.c (vm_expandarray): use RARRAY_RAWPTR() instead of
- RARRAY_PTR() because there is no new reference.
+Sun Nov 1 17:14:36 2015 Koichi Sasada <ko1@atdot.net>
- * vm_insnhelper.c (vm_caller_setup_args): ditto.
+ * id_table.c (mix_id_table_insert): do not touch list during
+ list->hash transition because GC can run during transition.
- * vm_insnhelper.c (vm_yield_setup_block_args): ditto.
+Sun Nov 1 11:07:31 2015 Eric Wong <e@80x24.org>
-Wed Jul 24 18:40:11 2013 Koichi Sasada <ko1@atdot.net>
+ * iseq.c (iseq_memsize): account for rb_call_cache entries
- * array.c, gc.c: move ary_unprotect_logging() into
- rb_gc_unprotect_logging() which is general version
+Sun Nov 1 09:12:10 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * include/ruby/ruby.h: add USE_RGENGC_LOGGING_WB_UNPROTECT
- to enable.
+ * parse.y (parser_yylex): ':' separated by a comment and a newline
+ is not valid as symbol.
-Wed Jul 24 17:37:50 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Oct 31 20:15:48 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * file.c (rb_file_expand_path_internal): preserve the file name
- encoding in an exception message.
+ * test/openssl/test_pair.rb: skipped tests if openssl doesn't support
+ ECDH cipher.
-Wed Jul 24 08:04:49 2013 Koichi Sasada <ko1@atdot.net>
+Sat Oct 31 14:58:10 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/-ext-/tracepoint/test_tracepoint.rb: add GC on/off to count
- GC events strictly.
+ * man/ruby.1 (SYNOPSIS): remove extraneous space for -F option as
+ it does not allow spaces before its argument.
+ [ruby-core:71283] [Bug #11641]
-Tue Jul 23 23:19:24 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Sat Oct 31 14:58:01 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/openssl/extconf.rb (CRYPTO_THREADID): check exist or not.
+ * man/ruby.1 (SYNOPSIS): remove extraneous space for -F option as
+ it does not allow spaces before its argument.
+ [ruby-core:71283] [Bug #11641]
- * ext/openssl/ossl.c (ossl_thread_id): use rb_nativethread_self()
- implemented at r42137 to allow threads which doesn't associated with
- Ruby thread to use openssl functions.
+Sat Oct 31 10:22:49 2015 yui-knk <spiketeika@gmail.com>
- * ext/openssl/ossl.c (Init_ossl_locks): If CRYPTO_THREADID is defined
- (OpenSSL 1.0.0 or later has it) use CRYPTO_THREADID_set_callback()
- instead of CRYPTO_set_id_callback() because its argument is
- unsigned long; it may cause id collision on mswin64
- whose sizeof(unsigned long) < sizeof(void*).
- http://www.openssl.org/docs/crypto/threads.html
+ * eval_error.c (undef_mesg_for): fix typo. Before this commit
+ `ArgumentError: malformed format string - %$` was raised when
+ `NameError#message` is called. [ruby-core:71282] [Bug #11640]
+ [Fix GH-1077]
- * ext/openssl/ossl.c (ossl_threadid_func): defined for above.
+Fri Oct 30 21:12:45 2015 Kazuki Tsujimoto <kazuki@callcc.net>
-Tue Jul 23 20:47:36 2013 Tanaka Akira <akr@fsij.org>
+ * gems/bundled_gems: update to power_assert 0.2.5.
- * bignum.c: Move functions.
+Fri Oct 30 19:29:52 2015 Koichi Sasada <ko1@atdot.net>
-Tue Jul 23 20:14:55 2013 Tanaka Akira <akr@fsij.org>
+ * gc.c (newobj_slowpath): do not need to use flags hack (commit miss).
- * bignum.c (bary_divmod): Add special cases for x < y easily detected
- and nx == 2 && ny == 2.
+Fri Oct 30 19:08:48 2015 Koichi Sasada <ko1@atdot.net>
-Tue Jul 23 19:48:38 2013 Koichi Sasada <ko1@atdot.net>
+ * gc.c (heap_get_freeobj_from_next_freepage): not so UNLIKELY.
- * thread_(pthread|win32).h: rename rb_thread_cond_t to
- rb_nativethread_cond_t.
+Fri Oct 30 18:09:51 2015 Koichi Sasada <ko1@atdot.net>
- * thread.c, thread_pthread.c, thread_win32.c, vm_core.h: catch up
- renaming.
+ * gc.c (newobj_slowpath): reduce 1 parameter to use only registers
+ for performance.
-Tue Jul 23 19:44:32 2013 Koichi Sasada <ko1@atdot.net>
+ On my laptop, 'N.times{x = []}' (where N = 29_000_000) is
+ 1.86 sec -> 1.74 sec.
- * thread_native.h: add rb_nativethread_self() which returns
- current running native thread identifier.
+Fri Oct 30 12:53:21 2015 yui-knk <spiketeika@gmail.com>
- * thread_[pthread|win32].c: implement rb_nativethread_self().
+ * test/ruby/test_call.rb: added test for safe navigation operator.
+ [fix GH-1066]
-Tue Jul 23 19:34:11 2013 Koichi Sasada <ko1@atdot.net>
+Fri Oct 30 12:47:34 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * thread_pthread.h, thread_win32.h: rename rb_thread_id_t to
- rb_nativethread_id_t.
+ * ChangeLog: fix wrong commit name.
- * thread_pthread.c, vm_core.h: use rb_nativethread_id_t.
+Fri Oct 30 12:36:16 2015 yui-knk <spiketeika@gmail.com>
-Tue Jul 23 18:56:11 2013 Koichi Sasada <ko1@atdot.net>
+ * vm_method.c: added documentation of protected/private methods.
+ [fix GH-1072]
+ * test/ruby/test_module.rb: added testcase for method_defined?
+ [fix GH-1071]
- * ext/openssl/ossl.c: use system native (system provided)
- thread locking APIs added by last commit.
- This patch fixes [Bug #8386].
- "rb_mutex_*" APIs control only "Ruby" threads.
- Not for native threads.
+Fri Oct 30 12:06:59 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Jul 23 18:44:15 2013 Koichi Sasada <ko1@atdot.net>
+ * variable.c (rb_class_ivar_set): rename as class specific ivar
+ setter, and st_table is no longer involved.
- * thread_native.h: added.
- Move native thread related lines from vm_core.h.
- And declare several functions "rb_nativethread_lock_*",
- manipulate locking.
+Fri Oct 30 11:36:33 2015 Eric Wong <e@80x24.org>
- * common.mk: add thread_native.h.
+ * variable.c (generic_ivar_remove): adjust type, set valp
+ (rb_obj_remove_instance_variable): simplify call
+ * test/ruby/test_object.rb (test_remove_instance_variable):
+ expand for implementation details
- * thread.c: add functions "rb_nativethread_lock_*".
+Fri Oct 30 10:37:56 2015 Eric Wong <e@80x24.org>
- * thread.c, thread_[pthread,win32].[ch]: rename rb_thread_lock_t
- to rb_nativethread_lock_t to make it clear that this lock is for
- native threads, not for ruby threads.
+ * internal.h (rb_st_insert_id_and_value): update prototype
+ * variable.c (rb_st_insert_id_and_value): reduce args
+ (find_class_path): adjust call for less args
+ (rb_ivar_set): ditto
+ (rb_cvar_set): ditto
+ * class.c (rb_singleton_class_attached): ditto
-Tue Jul 23 16:14:57 2013 Koichi Sasada <ko1@atdot.net>
+Fri Oct 30 09:57:22 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * gc.c (gc_before_sweep): fix spacing.
+ * gems/bundled_gems: update latest gems.
+ test-unit-3.1.5 and minitest-5.8.2
-Tue Jul 23 15:57:11 2013 Koichi Sasada <ko1@atdot.net>
+Fri Oct 30 09:54:05 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * gc.c (heap_get_freeobj): clear slot->freelist here.
- This means that this slot doesn't have any free objects.
- And store this slot with objspace->heap.using_slot.
+ * lib/rubygems: Update to RubyGems HEAD(60d7972).
+ this version contains pull requests number of #1343, #1356, #1357, #1363
+ at https://github.com/rubygems/rubygems/pulls
+ * test/rubygems: ditto.
- * gc.c (gc_before_sweep): restore objspace->freelist
- into objspace->heap.using_slot->freelist.
- This means that using_slot has free objects which are
- pointed from objspace->freelist.
+Fri Oct 30 07:38:29 2015 Koichi Sasada <ko1@atdot.net>
- * gc.c (gc_slot_sweep): do not need to clear slot->freelist.
+ * insns.def (getinlinecache/setinlinecache): compare ic->ic_cref and
+ current cref only when cached CREF list includes singleton class.
-Tue Jul 23 09:34:49 2013 Zachary Scott <e@zzak.io>
+ Singleton classes have own namespaces, so that we need to check
+ cref as a key (#10943).
- * sample/drb/README*.rdoc: [DOC] migrate DRb sample READMEs to rdoc
+ However, if current CREF list does not include singleton class,
+ no need to check CREF because it should be same name space.
-Tue Jul 23 09:28:05 2013 Zachary Scott <e@zzak.io>
+ * vm_insnhelper.c (vm_get_const_key_cref): add a function returns
+ CREF only when it includes singleton class.
- * lib/drb/invokemethod.rb: [DOC] nodoc InvokeMethod18Mixin
+ * vm_core.h: constify iseq_inline_cache_entry::ic_cref.
-Tue Jul 23 08:44:37 2013 Eric Hodel <drbrain@segment7.net>
+Fri Oct 30 06:43:50 2015 Koichi Sasada <ko1@atdot.net>
- * ext/openssl/ossl_asn1.c (asn1time_to_time): Implement YYMMDDhhmmZ
- format for ASN.1 UTCTime. [ruby-trunk - Bug #8664]
- * test/openssl/test_asn1.rb: Test for the above.
+ * vm_insnhelper.c (vm_env_cref): make it inline for performance.
-Tue Jul 23 08:11:32 2013 Zachary Scott <e@zzak.io>
+ * vm_insnhelper.c (rb_vm_get_cref): use NULL instead of 0.
- * lib/rexml/streamlistener.rb: [DOC] Fix examples in
- REXML::StreamListener#entitydecl patch by Ippei Obayashi [Bug #8665]
+Fri Oct 30 06:20:40 2015 Koichi Sasada <ko1@atdot.net>
-Tue Jul 23 07:44:59 2013 Eric Hodel <drbrain@segment7.net>
+ * insns.def: nobody set ic->ic_value.value to Qundef.
- * lib/rubygems: Import RubyGems from master as of commit b165260
- * test/rubygems: ditto.
+Fri Oct 30 06:15:50 2015 Koichi Sasada <ko1@atdot.net>
-Tue Jul 23 07:14:31 2013 Tanaka Akira <akr@fsij.org>
+ * vm.c: add ifndef guard for VM_CHECK_MODE.
- * bignum.c (bary_mulsub_1xN): New function.
- (bary_mul_toom3): Use bary_mulsub_1xN.
+Fri Oct 30 06:13:10 2015 Koichi Sasada <ko1@atdot.net>
-Tue Jul 23 03:32:23 2013 Tanaka Akira <akr@fsij.org>
+ * vm_insnhelper.c (vm_check_frame_detail): should require me for
+ VM_FRAME_FLAG_BMETHOD type frame.
- * bignum.c (KARATSUBA_BALANCED): New macro.
- (TOOM3_BALANCED): Ditto.
- (bary_mul_balance_with_mulfunc): Use KARATSUBA_BALANCED and
- TOOM3_BALANCED.
- (rb_big_mul_balance): Relax a condition.
- (rb_big_mul_karatsuba): Use KARATSUBA_BALANCED.
- (rb_big_mul_toom3): Use TOOM3_BALANCED.
- (bary_mul_karatsuba_branch): Use KARATSUBA_BALANCED.
- (bary_mul_toom3_branch): Use TOOM3_BALANCED.
+Thu Oct 29 18:42:30 2015 Koichi Sasada <ko1@atdot.net>
-Tue Jul 23 01:34:45 2013 Tanaka Akira <akr@fsij.org>
+ * gc.c (gc_mark_ptr): specify NOINLINE so that gc_mark() can return
+ immediately when obj is not a markable object.
- * bignum.c (bigdivrem_mulsub): Extracted from bigdivrem1.
- (bigdivrem1): Use bary_add.
+Thu Oct 29 18:05:22 2015 Koichi Sasada <ko1@atdot.net>
-Mon Jul 22 18:39:52 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * encoding.c (rb_enc_check_str): add for performance.
+ This function only accepts T_STRING (and T_REGEXP).
- * string.c (rb_str_enumerate_chars): specify array capa
- with str_strlen().
+ This patch improves performance of a tiny_segmenter benchmark
+ (num=2) 2.54sec -> 2.42sec on my machine.
+ https://github.com/chezou/TinySegmenter.jl/blob/master/benchmark/benchmark.rb
- * string.c (rb_str_enumerate_codepoints): ditto.
+ * encoding.c: add ENC_DEBUG and ENC_ASSERT() macros.
-Mon Jul 22 18:01:33 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * internal.h: add a decl. of rb_enc_check_str().
- * string.c (rb_str_enumerate_chars): specify array capa.
+ * string.c (rb_str_plus): use rb_enc_check_str().
-Mon Jul 22 17:24:14 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * string.c (rb_str_subpat_set): ditto.
- * string.c (rb_str_each_char_size): performance improvement by
- using rb_str_length().
+Thu Oct 29 17:16:40 2015 Koichi Sasada <ko1@atdot.net>
-Mon Jul 22 16:32:48 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * internal.h: export rb_wb_(un)protected_newobj_of()
+ because some extensions include internal.h.
- * vm_eval.c (eval_string_with_cref): check by Check_TypedStruct
- instead of rb_obj_is_kind_of.
+Thu Oct 29 16:42:19 2015 Koichi Sasada <ko1@atdot.net>
-Mon Jul 22 13:19:22 2013 Koichi Sasada <ko1@atdot.net>
+ * gc.c (rb_imemo_new): should not pass FL_WB_PROTECTED flag.
- * array.c (ary_resize_capa): use RARRAY_RAWPTR() because
- this code creates no new references.
+ * gc.c (rb_wb_protected_newobj_of): add more assertions.
-Mon Jul 22 12:58:18 2013 Koichi Sasada <ko1@atdot.net>
+ * gc.c (rb_wb_unprotected_newobj_of): ditto.
- * array.c (ary_memfill): added.
+Thu Oct 29 16:20:26 2015 Koichi Sasada <ko1@atdot.net>
- * array.c (rb_ary_initialize): use ary_memfill().
+ * gc.c: introduce rb_wb_unprotected_newobj_of() and
+ rb_wb_protected_newobj_of(), pass the WB_PROTECTED
+ information explicitly.
- * array.c (rb_ary_fill): ditto.
+ * internal.h: use introduced functions by NEWOBJ_OF().
+ `flag' is immediate value, so that C compilers can
+ solve them at compile time.
- * array.c (rb_ary_slice_bang): use RARRAY_RAWPTR() because
- this code creates no new references.
+ * include/ruby/ruby.h: add a comment about that.
-Mon Jul 22 10:09:46 2013 Koichi Sasada <ko1@atdot.net>
+Thu Oct 29 14:52:03 2015 Koichi Sasada <ko1@atdot.net>
- * gc.c (gc_slot_sweep): need to add empty RVALUE as freeobj.
+ * gc.c: add rb_objspace::flags::has_hook to represent hook availability.
-Mon Jul 22 09:48:31 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * gc.c: add gc_event_hook_available_p(objspace) to check that flag.
- * vm_eval.c (eval_string_with_cref): use the given file name unless
- eval even if scope is given. additional fix for [Bug #8436].
- based on the patch by srawlins at [ruby-core:56099] [Bug #8662].
+ * gc.c (newobj_of): use gc_event_hook_available_p() instead of
+ checking gc_event_hook_needed_p(objspace, RUBY_INTERNAL_EVENT_NEWOBJ).
+ for performance.
-Mon Jul 22 09:24:19 2013 Kouji Takao <kouji@takao7.net>
+ * gc.c (newobj_init): add UNLIKELY() for FL_WB_PROTECTED flag.
- * ext/readline/readline.c (Init_readline): added
- Readline.delete_text. [ruby-dev:45789] [Feature #6626]
- * ext/readline/extconf.rb: check for rl_delete_text() in Readline library.
+ * gc.c (newobj_init): change parameters order (trivial change).
- Thanks, Nobuyoshi Nakada, for the patch.
+Thu Oct 29 14:45:15 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Jul 22 03:15:54 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm_core.h (rb_thread_struct): move forward declarations before
+ used.
- * ext/date/date_parse.c (rfc2822_cb): check if wday is given, since it
- can be omitted.
+Thu Oct 29 14:07:54 2015 Koichi Sasada <ko1@atdot.net>
-Mon Jul 22 00:15:20 2013 Tanaka Akira <akr@fsij.org>
+ * gc.c (gc_mark_ptr): remove debug code for #11244.
- * bignum.c (bary_sq_fast): Refine expressions.
+Thu Oct 29 10:08:33 2015 Eric Wong <e@80x24.org>
-Sun Jul 21 21:08:59 2013 Tanaka Akira <akr@fsij.org>
+ * variable.c (struct autoload_state): usable as wait-queue head
+ (struct autoload_data_i): remove 2 words of overhead
+ (autoload_i_mark): remove marking for thread
+ (autoload_reset): adjust for struct changes
+ (rb_autoload): ditto
+ (rb_autoloading_value): ditto
+ (rb_autoload_load): ditto
+ (const_update): ditto
- * bignum.c (bary_mul): Use simple multiplication if yl is small.
- (rb_cstr_to_inum): Invoke bigsq instead of bigmul0.
- (bigsq): Re-implemented.
- (bigmul0): Invoke bigsq if two arguments are identical.
+Thu Oct 29 08:48:05 2015 Eric Wong <e@80x24.org>
-Sun Jul 21 09:58:19 2013 Tanaka Akira <akr@fsij.org>
+ * variable.c (struct autoload_data_i): add waitq_head
+ (struct autoload_state): new struct
+ (autoload_require): save result in autoload_state for use
+ in autoload_reset
+ (autoload_reset): wake up other waiters with open-coded
+ wait-queues
+ (rb_autoload_load): add ensure autoload_const_set happens
+ atomically w.r.t. autoload-triggered "require"
+ [ruby-core:70075] [ruby-core:71239] [Bug #11384]
- * bignum.c (bary_mul_toom3): New function based on bigmul1_toom3.
- (bary_mul_toom3_branch): Call bary_mul_toom3.
- (rb_big_mul_toom3): Ditto.
- (bigmul1_toom3): Removed.
- (big_real_len): Ditto.
- (big_split): Ditto.
- (big_split3): Ditto.
+Wed Oct 29 00:39:50 2015 Naohisa Goto <ngotogenome@gmail.com>
-Sun Jul 21 08:12:16 2013 Kazuki Tsujimoto <kazuki@callcc.net>
+ * test/rubygems/test_gem_commands_server_command.rb
+ (test_handle_options_port): change port from http to discard.
+ Solaris does not include "http 80/tcp" in its default
+ /etc/inet/services. AFAIK, discard (9/tcp) is older than http
+ and it is expected that all OS can resolve the service name.
+ [Bug #10004] [ruby-core:63518]
- * proc.c (proc_to_s): use PRIsVALUE to preserve the result encoding.
+Wed Oct 28 23:52:48 2015 Naohisa Goto <ngotogenome@gmail.com>
-Sun Jul 21 03:36:18 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * probes_helper.h (RUBY_DTRACE_HOOK): add RB_GC_GUARD, though paranoic.
- * hash.c (rb_hash_flatten): use NUM2INT to raise TypeError on 32bit
- platform. it's introduced by r42039
+Wed Oct 28 15:36:11 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun Jul 21 01:07:45 2013 Benoit Daloze <eregontp@gmail.com>
+ * error.c (rb_name_err_new): store the receiver directly.
- * common.mk (help): Fix environment variable name and argument.
- Actually it can also be a directory or any argument for
- test/unit runner. [Fixes GH-363]
+ * error.c (name_err_receiver): return directly stored receiver.
+ [Feature #10881]
-Sat Jul 20 22:44:50 2013 Zachary Scott <e@zzak.io>
+ * error.c (name_err_mesg_to_str): quote the name if unprintable.
- * common.mk: Document running a single test [Fixes GH-363]
- Patch by Avdi Grimm https://github.com/ruby/ruby/pull/363
+ * object.c (check_setter_id): use rb_check_id to convert names.
-Sat Jul 20 22:39:56 2013 Zachary Scott <e@zzak.io>
+ * variable.c (uninitialized_constant): use NameError::message to
+ keep the receiver of uninitialized constant. [Feature #10881]
- * sample/*: whitespace patch by Sergio Campama [Fixes GH-364]
- https://github.com/ruby/ruby/pull/364
+ * error.c (rb_name_err_new): new function to create NameError
+ exception instance. [Feature #10881]
-Sat Jul 20 22:33:13 2013 Zachary Scott <e@zzak.io>
+Wed Oct 28 13:29:39 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * doc/regexp.rdoc: [DOC] Fix typo in example [Fixes GH-365]
- Patch by Juanito Fatas https://github.com/ruby/ruby/pull/365
+ * parse.y (new_attr_op_assign): fix op_assign type, which is
+ already an ID since r52284. [Feature #11537]
-Sat Jul 20 17:46:03 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Tue Oct 27 23:14:14 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * string.c (rb_str_succ): add missing case NEIGHBOR_WRAPPED.
- r42078 caused buggy behavior like "\xFF".b -> "\x01\xFF".b
+ * defs/id.def: enable anonymous IDs not to expose internal IDs for
+ frozen-string-literal-debug by Marshal.dump.
-Sat Jul 20 15:22:38 2013 Koichi Sasada <ko1@atdot.net>
+Tue Oct 27 17:06:55 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * array.c (rb_ary_resize): use simple memcpy because there are no new
- references.
+ * defs/id.def: move internal IDs for frozen-string-literal-debug.
-Sat Jul 20 15:02:51 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Oct 27 16:41:05 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * safe.c (ruby_safe_level_4_warning): define for old extension
- libraries. [Bug #8652]
+ * error.c (rb_error_frozen_object): use rb_attr_get instead of
+ rb_ivar_get to get rid of warnings for string objects created
+ when frozen-string-literal-debug is disabled.
-Sat Jul 20 14:38:00 2013 Koichi Sasada <ko1@atdot.net>
+Tue Oct 27 16:18:12 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * array.c (ary_make_shared): make shared array shady.
- Making non-shady shared array causes SEGV (see rubyci).
- It seems a bug around shared array.
+ * lib/logger.rb (Logger::Period#previous_period_end): as weekly
+ rotation shifts the log file on Sundays, the end date of the
+ previous period should be Saturdays. fix r45072.
+ [ruby-dev:49314] [Bug #11622]
-Sat Jul 20 12:14:07 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Oct 27 16:12:37 2015 NARUSE, Yui <naruse@ruby-lang.org>
- * string.c (enc_succ_char, enc_pred_char): consider wchar case.
- [ruby-core:56071] [Bug #8653]
+ * vm_dump.c (rb_print_backtrace): our addr2line doesn't work on sparc.
+ http://rubyci.s3.amazonaws.com/unstable11s/ruby-trunk/log/20151027T043311Z.log.html.gz
- * string.c (rb_str_succ): do not replace with invalid char.
+Tue Oct 27 12:00:33 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * encoding.c (rb_enc_code_to_mbclen): add new function which returns
- mbclen from codepoint like as rb_enc_codelen() but 0 for invalid
- char.
+ * lib/logger.rb (Logger::Period#next_rotate_time): get rid of
+ adding to mday not to exceed the days of the month.
+ [ruby-core:71185] [Bug #11620]
- * include/ruby/encoding.h (rb_enc_code_to_mbclen): declaration and
- shortcut macro.
+Mon Oct 26 22:43:03 2015 yui-knk <spiketeika@gmail.com>
-Fri Jul 19 21:59:12 2013 Koichi Sasada <ko1@atdot.net>
+ * test/ruby/test_module.rb (test_method_defined): Add test cases
+ for `public/protected/private _method_defined?`
+ These methods accept string as argument, so add string argument
+ cases. [Fix GH-1067]
- * gc.c: declare type_name() at the beginning of file.
+Mon Oct 26 22:23:30 2015 SimonDKnight <simondknight@hotmail.com>
-Fri Jul 19 21:35:09 2013 Koichi Sasada <ko1@atdot.net>
+ * lib/racc/rdoc/grammar.en.rdoc: Grammatical errors fixed.
+ [Fix GH-1070]
- * array.c: reduce shady operations.
+Mon Oct 26 18:36:43 2015 Shota Fukumori (sora_h) <her@sorah.jp>
- * array.c (rb_ary_modify, ary_make_partial, rb_ary_splice,
- rb_ary_replace, rb_ary_eql, rb_ary_compact_bang):
- use RARRAY_RAWPTR() instead of RARRAY_PTR().
+ * vm_method.c(rb_method_entry_make):
+ [DOC] [ci skip] Remove a needless space from comment
+ [Fixes GH-1069] Patch by @yui-knk
- * array.c (rb_ary_shift): use RARRAY_PTR_USE() without WB because
- there are not new relations.
+Mon Oct 26 17:30:13 2015 Ryan Hosford <tad.hosford@gmail.com>
- * array.c (ary_ensure_room_for_unshift): ditto.
+ * lib/fileutils.rb: rename tailing to trailing.
+ [Misc #11548]
- * array.c (rb_ary_sort_bang): ditto.
+Mon Oct 26 17:11:53 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * array.c (rb_ary_delete_at): ditto.
+ * parse.y (call_op, call_op2): fix values on ripper. [Feature #11537]
- * array.c (rb_ary_reverse_m): use RARRAY_RAWPTR() because
- there are not new relations.
+Mon Oct 26 12:55:06 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Jul 19 20:58:20 2013 Koichi Sasada <ko1@atdot.net>
+ * parse.y (call_op2): separate from call_op and also allow "::",
+ while dot_or_colon should not allow ".?". [Feature #11537]
- * array.c: reduce shade operations.
+Mon Oct 26 01:03:23 2015 Rei Odaira <Rei.Odaira@gmail.com>
- * array.c (rb_ary_modify): use RARRAY_RAWPTR().
+ * thread_pthread.c: fix compile errors when
+ USE_SLEEPY_TIMER_THREAD is disabled.
- * array.c (ary_make_substitution, rb_ary_s_create, ary_make_partial,
- rb_ary_splice, rb_ary_resize, rb_ary_rotate_m, rb_ary_times):
- use ary_memcpy().
+Sun Oct 25 10:12:05 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Jul 19 19:55:28 2013 Koichi Sasada <ko1@atdot.net>
+ * symbol.c (op_tbl): add DOTQ for ripper. [Feature #11537]
- * array.c (ary_mem_clear): added. This operation doesn't need WB
- because this operation creates a reference to Qnil.
+Sat Oct 24 22:51:18 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * array.c (ary_make_shared, rb_ary_store, rb_ary_shift_m,
- rb_ary_splice, rb_ary_resize, rb_ary_fill): use ary_mem_clear()
- instead of rb_mem_clear().
+ * configure.in: fixed build failure of Haiku.
+ [fix GH-984] Patch by @kallisti5
+ * ext/socket/getaddrinfo.c: ditto.
+ * ext/socket/getnameinfo.c: ditto.
+ * ext/socket/rubysocket.h: ditto.
- * array.c (ary_make_shared): use RARRAY_RAWPTR() instead of RARRAY_PTR().
+Sat Oct 24 21:16:53 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Jul 19 19:18:51 2013 Koichi Sasada <ko1@atdot.net>
+ * test/fileutils/test_fileutils.rb (test_uptodate): relax error
+ message format. [Feature #9025], [ruby-core:71178] [Bug #11617]
- * array.c: fix commit miss.
- RGENGC_UNPROTECT_LOGGING should be 0.
+Sat Oct 24 21:06:43 2015 Shota Fukumori (sora_h) <her@sorah.jp>
-Fri Jul 19 19:15:30 2013 Koichi Sasada <ko1@atdot.net>
+ * lib/mkmf.rb: Revert r45640 because it may lead to link
+ with different libruby. [Bug #9760]
- * array.c (rb_ary_resurrect): use RARRAY_RAWPTR() because there is no
- writing.
+Sat Oct 24 15:42:20 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * array.c (rb_ary_new_from_values): use ary_memcpy().
+ * bootstraptest/test_method.rb: relax error message format.
-Fri Jul 19 19:07:31 2013 Koichi Sasada <ko1@atdot.net>
+ * test/ruby/test_arity.rb (err_mess): ditto.
+ [Feature #9025], [ruby-core:71178] [Bug #11617]
- * array.c (ary_memcpy): add a function to copy VALUEs into ary
- with write barrier. If ary is promoted, use write barrier correctly.
+Sat Oct 24 12:47:47 2015 Martin Duerst <duerst@it.aoyama.ac.jp>
- * array.c (rb_ary_cat, rb_ary_unshift_m, rb_ary_dup,
- rb_ary_sort_bang, rb_ary_replace, rb_ary_plus): use ary_memcpy().
+ * vm_insnhelper.c: improved error message for "wrong number
+ of arguments", distinguishing given and expected argument
+ numbers clearly. [Feature #9025]
-Fri Jul 19 15:32:57 2013 Koichi Sasada <ko1@atdot.net>
+Sat Oct 24 11:57:59 2015 Shugo Maeda <shugo@ruby-lang.org>
- * array.c (rb_ary_store): use RARRAY_PTR_USE() instead of RARRAY_PTR().
- Clearing memory space doesn't need WBs.
+ * vm_insnhelper.c: remove the typedef redeclaration of
+ vm_call_handler.
-Fri Jul 19 15:19:37 2013 Koichi Sasada <ko1@atdot.net>
+Sat Oct 24 07:29:12 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * array.c (ary_ensure_room_for_push): use RARRAY_RAWPTR() instead of
- RARRAY_PTR. In this code, there are no "write" operation.
+ * lib/forwardable.rb (def_instance_delegator, def_single_delegator):
+ match backtraces against ::Forwardable in case the target class
+ is a subclass of BasicObject and does not include Kernel.
+ [ruby-core:71176] [Bug #11616]
- * array.c (rb_ary_equal): ditto.
+Sat Oct 24 04:10:13 2015 Koichi Sasada <ko1@atdot.net>
- * array.c (recursive_equal): ditto.
+ * iseq.c (make_compile_option_value): include frozen_string_literal*
+ in a made option value.
-Fri Jul 19 15:09:22 2013 Koichi Sasada <ko1@atdot.net>
+ * vm_opts.h: forgot to add OPT_FROZEN_STRING_LITERAL_DEBUG
+ at last commit.
- * gc.c, internal.h (rb_gc_writebarrier_remember_promoted): add a new
- function to remember an specified object. This api is only
- experimental (strongly depend on WB/rgengc strategy).
+Sat Oct 24 03:58:02 2015 Koichi Sasada <ko1@atdot.net>
-Fri Jul 19 14:56:00 2013 Koichi Sasada <ko1@atdot.net>
+ * ruby.c: introduce --enable-frozen-string-literal-debug option.
+ If this option is enabled, the modify error will be:
+ can't modify frozen String (RuntimeError) =>
+ can't modify frozen String, created at test.rb:3 (RuntimeError)
- * array.c (ary_unprotect_logging): use (void *) for first parameter
- because VALUE is not defined before including ruby/ruby.h.
+ * iseq.h: add compile option frozen_string_literal_debug.
-Fri Jul 19 14:19:48 2013 Kazuki Tsujimoto <kazuki@callcc.net>
+ * compile.c: catch up this fix.
- * ext/pathname/pathname.c (path_inspect): use PRIsVALUE to preserve
- the result encoding.
+ * error.c (rb_error_frozen): ditto.
-Fri Jul 19 12:35:41 2013 Tanaka Akira <akr@fsij.org>
+ * iseq.c (set_compile_option_from_hash): ditto.
- * test/socket/test_tcp.rb (test_initialize_failure): Use EADDRNOTAVAIL
- to test an error message generated by bind() failure.
+ * test/ruby/test_rubyoptions.rb: add a test for this fix.
-Fri Jul 19 11:27:38 2013 Zachary Scott <e@zzak.io>
+Sat Oct 24 02:02:24 2015 Koichi Sasada <ko1@atdot.net>
- * lib/racc/parser.rb: [DOC] Capitalize "Ruby" in documentation
- Patch by Dave Worth https://github.com/ruby/ruby/pull/341
+ * vm_insnhelper.c: introduce new call handler for simple ISeqs.
-Fri Jul 19 11:26:28 2013 Zachary Scott <e@zzak.io>
+ vm_call_iseq_setup_normal_0start() is simple, however it has
+ some loops/conditions depends on ISeq::param.size and
+ ISeq::local_size (in vm_push_frame(), inlined into this function).
- * ext/psych/lib/psych*: [DOC] Capitalize "Ruby" in documentation
- Patch by Dave Worth https://github.com/ruby/ruby/pull/341
+ There are many simple methods which has a few parameters and local
+ variables. So that this patch introduces several special functions
+ generated in vm_call_iseq_optimized.inc by
+ tool/mk_call_iseq_optimized.rb.
-Fri Jul 19 11:25:12 2013 Zachary Scott <e@zzak.io>
+ This script makes
+ vm_call_iseq_setup_normal_0start_Xparams_Ylocals()
+ where X is 0 to 3 and Y is 1 to 6 (as current setting).
+ In this case, X * Y = 24 functions are created.
- * lib/rdoc/*: [DOC] Capitalize "Ruby" in documentation
- Patch by Dave Worth https://github.com/ruby/ruby/pull/341
+ These functions creates fast method dispatch by inlining
+ vm_push_frame() with immediate params/locals sizes.
-Fri Jul 19 11:23:55 2013 Zachary Scott <e@zzak.io>
+ On my laptop, we can have the following results.
- * lib/rubygems*: [DOC] Capitalize "Ruby" in documentation
- Patch by Dave Worth https://github.com/ruby/ruby/pull/341
+ vm2_method* 1.083 (8.3% faster)
+ vm2_poly_method* 0.961 (3.4% slower)
-Fri Jul 19 11:16:54 2013 Akinori MUSHA <knu@iDaemons.org>
+ It shows 8.3% faster for inner loop method dispatch (hit inline
+ cache), but 3.4% slower when inline cache miss because we need
+ to find a suitable call handler.
- * lib/set.rb (Set#to_set): Define Set#to_set so that aSet.to_set
- returns self. [Fixes GH-359]
+ * common.mk: add a rule for vm_call_iseq_optimized.inc.
-Fri Jul 19 11:10:23 2013 Zachary Scott <e@zzak.io>
+ * tool/mk_call_iseq_optimized.rb: added.
- * lib/rake/*: [DOC] Capitalize "Ruby" in documentation
- Patch by Dave Worth https://github.com/ruby/ruby/pull/341
+ * vm.c: include vm_call_iseq_optimized.inc.
-Fri Jul 19 01:04:14 2013 Tanaka Akira <akr@fsij.org>
+Sat Oct 24 01:58:50 2015 Koichi Sasada <ko1@atdot.net>
- * ext/-test-/bignum/intpack.c: Renamed from ext/-test-/bignum/pack.c.
- (Init_intpack): Renamed from Init_pack.
- Reported by Naohisa Goto. [ruby-dev:47526] [Bug #8655]
+ * vm_core.h: define vm_call_handler.
-Fri Jul 19 00:54:27 2013 Benoit Daloze <eregontp@gmail.com>
+Sat Oct 24 01:56:01 2015 Koichi Sasada <ko1@atdot.net>
- * test/ruby/test_array.rb (test_count): add a test case for #count
- with an argument. See Bug #8654.
+ * vm_core.h, vm_insnhelper.h: move definition of VMDEBUG
+ from vm_insnhelper.h to vm_core.h.
-Thu Jul 18 23:45:06 2013 Masaki Matsushita <glass.saga@gmail.com>
+Sat Oct 24 01:51:01 2015 Akinori MUSHA <knu@iDaemons.org>
- * array.c (rb_ary_eql): compare RARRAY_PTR() for performance
- improvement in case of that self and other are shared.
+ * NEWS: [DOC] In the new safe call syntax, arguments are evaluated
+ only if a call is made.
-Thu Jul 18 22:46:42 2013 Zachary Scott <e@zzak.io>
+ * doc/syntax/calling_methods.rdoc: Fix a typo.
- * lib/cgi.rb: [DOC] Capitalize "Ruby" in documentation [Fixes GH-341]
- Patch by Dave Worth https://github.com/ruby/ruby/pull/341
- * lib/webrick.rb: ditto
- * lib/scanf.rb: ditto
- * lib/xmlrpc/config.rb: ditto
- * lib/resolv.rb: ditto
- * lib/e2mmap.rb: ditto
- * lib/fileutils.rb: ditto
- * lib/mkmf.rb: ditto
- * lib/cgi/session.rb: ditto
- * lib/yaml.rb: ditto
- * lib/erb.rb: ditto
- * lib/irb.rb: ditto
- * lib/tracer.rb: ditto
- * lib/net/http.rb: ditto
- * ext/syslog/lib/syslog/logger.rb: ditto
- * sample/pty/expect_sample.rb: ditto
+Sat Oct 24 00:38:34 2015 Shugo Maeda <shugo@ruby-lang.org>
-Thu Jul 18 21:30:50 2013 Tanaka Akira <akr@fsij.org>
+ * lib/forwardable (def_instance_delegator, def_single_delegator):
+ rescue ::Exception instead of Exception in case Exception is
+ defined under the target class.
+ [ruby-core:71175] [Ruby trunk - Bug #11615]
- * bignum.c (bary_sq_fast): Specialize the last iteration of the
- outer loop.
- (bigfixize): A condition simplified.
+Fri Oct 23 21:10:37 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Jul 18 21:15:41 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * error.c (name_err_mesg_to_str): separate class names from the
+ receiver description.
- * array.c (rb_ary_equal): compare RARRAY_PTR() for performance
- improvement in case of that self and other are shared.
+ * vm_eval.c (make_no_method_exception, raise_method_missing): add
+ format specifiers for class names.
-Thu Jul 18 20:44:51 2013 Masaki Matsushita <glass.saga@gmail.com>
+Fri Oct 23 18:10:32 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * array.c (rb_ary_fill): use memfill().
+ * .gitignore: ignored environmental wrapper files.
-Thu Jul 18 20:35:14 2013 Benoit Daloze <eregontp@gmail.com>
+Fri Oct 23 17:55:29 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * array.c (rb_ary_count): check length to avoid SEGV
- while iterating. Remove other pointer loop when arg is given.
+ * lib/irb.rb: Ignored assignment of STDOUT.sync = true
+ when irb.rb loaded. It's affected to IDE such as Jetbrain.
+ [fix GH-864] Patch by @os97673
- * test/ruby/test_array.rb (test_count): add test for bug.
- [ruby-core:56072] [Bug #8654]
+Fri Oct 23 16:35:08 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Thu Jul 18 18:14:36 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * lib/ipaddr.rb, test/test_ipaddr.rb: Reject invalid address contained
+ EOL string. Patch by @kachick [fix GH-942][Bug #11513]
- * array.c (rb_ary_count): iterate items appropriately.
- [Bug #8654]
+Fri Oct 23 16:03:26 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Thu Jul 18 17:35:41 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * file.c: fix indent style. [fix GH-977]
+ * test/ruby/test_string.rb: indent. [fix GH-975]
+ [ci skip] These patches are contributed from @yui-knk
- * hash.c (rb_hash_flatten): performance improvement by not using
- rb_hash_to_a() to avoid array creation with rb_assoc_new().
+Fri Oct 23 15:46:09 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Thu Jul 18 16:16:17 2013 Koichi Sasada <ko1@atdot.net>
+ * string.c: Added method signature to include hash. It's inconsistency
+ with `gsub` method signature.
+ [ci skip][fix GH-1023] Patch by @danielevans
- * array.c: add logging feature for RGenGC's write barrier unprotect
- event.
+Fri Oct 23 15:25:51 2015 Shugo Maeda <shugo@ruby-lang.org>
-Thu Jul 18 15:45:47 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * lib/net/imap.rb: remove an empty comment line and -*-.
- * include/ruby/ruby.h (RUBY_SAFE_LEVEL_CHECK): make only
- rb_set_safe_level(4) an error always but make rb_secure(4) an error
- only in the core. [ruby-dev:47517] [Bug #8652]
+Fri Oct 23 15:20:02 2015 Shugo Maeda <shugo@ruby-lang.org>
-Thu Jul 18 15:42:01 2013 Koichi Sasada <ko1@atdot.net>
+ * lib/net/ftp.rb (gettextfile, getbinaryfile): use the safe
+ navigation operator.
- * include/ruby/ruby.h: fix spell miss.
+Fri Oct 23 13:51:33 2015 yui-knk <spiketeika@gmail.com>
-Thu Jul 18 15:11:11 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test_call.rb (test_safe_call): Add test cases for safe
+ navigation operator assignment. [Fix GH-1064]
+ Validate:
+ * can assign an attribute which is `nil`
+ * can "or assign" an attribute which is `nil`
- * include/ruby/ruby.h (ruby_safe_level_4): get rid of special
- character. [ruby-dev:47512] [misc #8646]
+Fri Oct 23 11:58:21 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Jul 18 14:51:39 2013 Koichi Sasada <ko1@atdot.net>
+ * compile.c (iseq_peephole_optimize): optimize lengthy safe
+ navigation method chain. [Feature #11537]
- * array.c (ary_alloc): slim setup process.
+Fri Oct 23 10:58:41 2015 Shugo Maeda <shugo@ruby-lang.org>
-Thu Jul 18 14:37:57 2013 Koichi Sasada <ko1@atdot.net>
+ * lib/matrix/eigenvalue_decomposition.rb (tridiagonalize): fix
+ indentation to avoid a warning when the command line option -w of
+ ruby is specified.
- * string.c (str_alloc): no need to clear RString (already cleared).
+ * lib/matrix/eigenvalue_decomposition.rb (hessenberg_to_real_schur):
+ change the name of a block parameter to avoid a warning when the
+ command line option -w of ruby is specified.
-Thu Jul 18 12:57:47 2013 Tanaka Akira <akr@fsij.org>
+Fri Oct 23 10:49:36 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * bignum.c (BDIGITS_ZERO): Defined.
- (bary_pack): Use BDIGITS_ZERO.
- (bary_unpack): Ditto.
- (bary_mul_single): Ditto.
- (bary_mul_normal): Ditto.
- (bary_sq_fast): Ditto.
- (bary_mul_balance_with_mulfunc): Ditto.
- (bary_mul_precheck): Ditto.
- (bary_mul_toom3_branch): Ditto.
- (rb_cstr_to_inum): Ditto.
- (big_shift3): Ditto.
- (bigmul1_toom3): Ditto.
- (bary_divmod): Ditto.
+ * compile.c (iseq_compile_each): support safe navigation of simple
+ attribute assignment. [Feature #11537]
-Thu Jul 18 06:30:02 2013 Koichi Sasada <ko1@atdot.net>
+ * parse.y (mlhs_node, lhs, attrset_gen): ditto. keep mid
+ non-attrset as the sign of safe navigation.
- * gc.c: rename gc related functions with prefix "gc_".
- * before_gc_sweep() -> gc_before_sweep().
- * after_gc_sweep() -> gc_after_sweep().
- * lazy_sweep() -> gc_lazy_sweep().
- * rest_sweep() -> gc_rest_sweep().
- * slot_sweep() -> gc_slot_sweep().
+Fri Oct 23 07:17:11 2015 Eric Wong <e@80x24.org>
- * gc.c: rename a heap management function with prefix "heap_".
- * get_freeobj() -> heap_get_freeobj().
+ * test/io/wait/test_io_wait.rb (test_wait_eof): test return value
- * gc.c: rename markable_object_p() to is_markable_object().
+Fri Oct 23 00:32:02 2015 NARUSE, Yui <naruse@ruby-lang.org>
-Wed Jul 17 22:57:40 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * ext/openssl/ossl_ssl.c (ssl_npn_select_cb): explicitly raise error
+ in ext/openssl instead of OpenSSL itself because LibreSSL
+ silently truncate the selected protocol name by casting the length
+ from int to unsigned char. [Bug #11369]
+ Patch by Jeremy Evans <merch-redmine@jeremyevans.net>
- * hash.c (delete_if_i): use ST_DELETE.
+Fri Oct 23 00:49:45 2015 Shugo Maeda <shugo@ruby-lang.org>
-Wed Jul 17 22:34:47 2013 Tanaka Akira <akr@fsij.org>
+ * lib/un.rb (help): change the name of a block parameter to avoid
+ a warning when the command line option -w of ruby is specified.
- * bignum.c: An static assertion for relation of SIZEOF_LONG and
- SIZEOF_BDIGITS is added.
- (bary_mul_precheck): Reduce comparisons.
- (bary_mul): Invoke bary_sq_fast or bary_mul1 if the bignum size is
- small.
- (bigfixize): Resize the argument bignum here.
- (bignorm): Don't call bigtrunc after bigfixize.
+Fri Oct 23 00:22:20 2015 Josef Simanek <josef.simanek@gmail.com>
-Wed Jul 17 22:13:26 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * string.c (rb_str_tr): [DOC] Escape backslash in String#tr
+ documentation. [Fix GH-1063]
- * hash.c (rb_hash_replace): performance improvement by using
- st_copy().
+Fri Oct 23 00:19:04 2015 yui-knk <spiketeika@gmail.com>
-Wed Jul 17 17:19:54 2013 Koichi Sasada <ko1@atdot.net>
+ * array.c (rb_ary_collect): [DOC] Fix space of code example of
+ Array#map. [Fix GH-1062]
- * gc.c: rename heap management functions with prefix "heap_".
- * allocate_sorted_array() -> heap_allocate_sorted_array().
- * slot_add_freeobj() -> heap_slot_add_freeobj().
- * assign_heap_slot() -> heap_assign_slot().
- * add_heap_slots() -> heap_add_slots().
- * init_heap() -> heap_init().
- * set_heap_increment() -> heap_set_increment().
+Thu Oct 22 18:52:53 2015 Akinori MUSHA <knu@iDaemons.org>
- * gc.c (initial_expand_heap): inlined in rb_gc_set_params().
+ * vm_eval.c (rb_f_loop): When a loop is stopped by a StopIteration
+ exception, return what the enumerator has returned instead of
+ nil. [ruby-core:71133] [Feature #11498]
-Wed Jul 17 17:12:23 2013 Matthew M. Boedicker <matthewm@boedicker.org>
+Thu Oct 22 18:25:10 2015 Shugo Maeda <shugo@ruby-lang.org>
- * hash.c (env_fetch): Add key name to message on ENV.fetch KeyError,
- as well as Hash#fetch. [ruby-core:56062] [Feature #8649]
+ * lib/net/imap.rb (idle): add a new argument timeout for keep-alive.
+ [ruby-core:63693] [Bug #10031]
-Wed Jul 17 15:59:33 2013 Koichi Sasada <ko1@atdot.net>
+Thu Oct 22 15:30:08 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c: catch up last changes for debugging/checking mode.
+ * compile.c (iseq_peephole_optimize): peephole optimization for
+ branchnil jumps.
-Wed Jul 17 15:50:10 2013 Koichi Sasada <ko1@atdot.net>
+ * compile.c (iseq_compile_each): generate save navigation operator
+ code.
- * gc.c (rb_objspace_free): free slot itself.
+ * insns.def (branchnil): new opcode to pop the tos and branch if
+ it is nil.
- * gc.c (objspace_each_objects): fix condition.
- Use slot->body instead of slot.
+ * parse.y (NEW_QCALL, call_op, parser_yylex): parse token '.?'.
+ [Feature #11537]
- * gc.c (count_objects): use "slot" variable.
+Thu Oct 22 13:16:19 2015 Guilherme Reis Campos <guilhermekbsa@gmail.com>
-Wed Jul 17 15:21:10 2013 Koichi Sasada <ko1@atdot.net>
+ * dir.c (ruby_brace_expand): glob brace expansion edge case fix.
+ When there are closing braces '}' before a open brace '{' it
+ must be ignored and considered as literal.
+ [ruby-core:71138] [Bug #11609]
- * gc.c (unlink_heap_slot): fix memory leak.
- free slot itself at free_heap_slot().
+Thu Oct 22 13:13:49 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- Reproduce-able code is here:
- N1 = 100_000; N2 = 1_000_000
- N1.times{ary = []; N2.times{ary << ''}}
- Maybe this problem is remaining in Ruby 2.0.0.
+ * io.c (argf_next_argv): check ARGV element type, and try
+ conversion if necessary. [ruby-core:71140] [Bug #11610]
- * gc.c (unlink_heap_slot): remove not working code.
+Thu Oct 22 11:11:16 2015 Shugo Maeda <shugo@ruby-lang.org>
-Wed Jul 17 14:31:13 2013 Koichi Sasada <ko1@atdot.net>
+ * test/net/ftp/test_ftp.rb: add tests for getbinaryfile and
+ gettextfile.
- * gc.c: re-design the heap structure.
+Wed Oct 21 18:34:06 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- (1) The heap is consists of a set of slots.
- (2) Each "slot" has a "slot_body".
- slot::start and slot::limit specify RVALUE beginning address
- and number of RVALUE in a "slot_body".
- (3) "slot_body" contains a pointer to slot (slot_body::header::slot)
- and an array of RVALUE.
- (4) heap::sorted is an array of "slots", sorted by an address of
- slot::body.
+ * parse.y (parser_magic_comment): allow a sole magic comment without
+ indicators, neither other non-space comments. [Feature #8976]
- See https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/GC_design
- for more details (figure).
+Tue Oct 20 12:17:56 2015 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
- * gc.c: Avoid "heaps" terminology. It is ambiguous.
+ * lib/prime.rb: Add basic argument checking to Prime.prime?
+ [Bug #11606]
-Wed Jul 17 13:29:16 2013 Koichi Sasada <ko1@atdot.net>
+Tue Oct 20 12:17:50 2015 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
- * gc.c: fix heaps_header and heaps_slot to reduce memory consumption.
- (1) move heaps_header::start and limit to heaps_slot.
- (2) remove heaps_header::end which can be calculated by start+limit.
+ * lib/prime.rb: Optimize Integer#prime?
+ Patch by Nick Slocum [Bug #10354]
- * gc.c: catch up above change.
+Tue Oct 20 08:12:47 2015 Rei Odaira <Rei.Odaira@gmail.com>
-Wed Jul 17 12:30:05 2013 Tanaka Akira <akr@fsij.org>
+ * configure.in: pthread_getattr_np is broken on AIX.
+ More specifically, the stack address and size returned are
+ not correct.
- * include/ruby/st.h (st_strcasecmp): Macro defined for compatibility.
- (st_strncasecmp): Ditto.
+Tue Oct 20 05:54:46 2015 Eric Wong <e@80x24.org>
-Wed Jul 17 11:57:45 2013 Takeyuki FUJIOKA <xibbar@ruby-lang.org>
+ * ext/fiddle/closure.c (callback): static function
- * lib/cgi/util.rb (CGI::Util#escape, unescape): Avoid use of regexp
- special global variable. [Feature #8648] Thanks to fotos.
+Mon Oct 19 10:33:46 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Jul 17 11:57:10 2013 Takeyuki FUJIOKA <xibbar@ruby-lang.org>
+ * ext/socket/init.c (rsock_raise_socket_error): get rid of a glibc
+ bug. [ruby-core:71100] [Bug #11600]
- * lib/erb.rb (ERB::Util#url_encode): Avoid use of regexp special global
- variable. [Feature #8648] Thanks to fotos.
+Mon Oct 19 01:26:26 2015 NAKAMURA Usaku <usa@ruby-lang.org>
-Wed Jul 17 08:12:41 2013 Tanaka Akira <akr@fsij.org>
+ * file.c (rb_file_identical_p): not necessary to compare the paths after
+ comparing the file indexes on Windows. designate by kosaki.
- * st.c (st_locale_insensitive_strcasecmp): Renamed from st_strcasecmp.
- (st_locale_insensitive_strncasecmp): Renamed from st_strncasecmp.
+Sun Oct 18 21:17:27 2015 Tanaka Akira <akr@fsij.org>
- * include/ruby/st.h: Follow above changes.
+ * lib/open-uri.rb: Specify frozen_string_literal: true.
- * include/ruby/ruby.h: Ditto.
+Sun Oct 18 14:37:56 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Wed Jul 17 00:14:59 2013 Tanaka Akira <akr@fsij.org>
+ * random.c (fill_random_bytes_urandom): add a comment why using
+ O_NONBLOCK and O_NOCTTY.
- * bignum.c (bigmul1_toom3): Use bigdivrem_single instead of bigdivrem.
- (big_three): Removed.
- (Init_Bignum): Don't initialize big_three.
+Sun Oct 18 13:24:17 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Tue Jul 16 21:46:03 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * random.c (fill_random_bytes_syscall): use ATOMIC_SET() for
+ updating try_syscall.
- * configure.in: revert r42008. strcasecmp() uses the current locale.
+Sun Oct 18 13:03:52 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * include/ruby/ruby.h: ditto.
+ * include/ruby/backward/util.h: Good-by Borland-C.
- * st.c (st_strcasecmp): ditto.
+Sun Oct 18 13:03:09 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Tue Jul 16 21:07:04 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * common.mk: add a comment how to use "make test-all"
- * configure.in: check strcasecmp().
+Sun Oct 18 12:59:22 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * include/ruby/ruby.h: use strcasecmp() as st_strcasecmp() if it
- exists.
+ * common.mk: add comments how to use "make benchmark"
- * st.c (st_strcasecmp): define the function only if strcasecmp()
- doesn't exist.
+Sun Oct 18 12:58:15 2015 Tanaka Akira <akr@fsij.org>
-Tue Jul 16 20:21:28 2013 Tanaka Akira <akr@fsij.org>
+ * lib/securerandom.rb: Specify frozen_string_literal: true.
- * bignum.c (bigsq): Renamed from bigsqr.
+Sun Oct 18 11:22:52 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Tue Jul 16 19:42:08 2013 Tanaka Akira <akr@fsij.org>
+ * dln.c: remove defined(__WATCOMC__).
- * bignum.c (USHORT): Unused macro removed.
+Sun Oct 18 11:16:33 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Tue Jul 16 19:18:51 2013 Koichi Sasada <ko1@atdot.net>
+ * lib/mkmf.rb: Good-by Borland-C.
- * gc.c: slim a path of newobj_of().
+Sun Oct 18 11:04:36 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * gc.c (objspace): add a new field objspace::freelist, which contains
- available RVALUEs.
+ * numeric.c: Good-by Borland-C.
+ * include/ruby/backward/rubyio.h: ditto.
+ * include/ruby/backward/st.h: ditto.
+ * include/ruby/backward/util.h: ditto.
+ * include/ruby/backward/rubysig.h: ditto.
+ * include/ruby/backward/classext.h: ditto.
+ * dln.c: ditto.
+ * gc.c: ditto.
+ * win32/resource.rb: ditto.
+ * win32/dir.h: ditto.
+ * ext/tk/tcltklib.c: ditto.
+ * NEWS: announce that Borland-C is no longer supported.
- * gc.c (newobj_of): simply call new function `get_freeobj()'.
- get_freeobj() returns objspace::freelist. If objspace::freelist
- is not available, refill objspace::freelist with a slot pointed by
- objspace::heap::free_slots.
+Sun Oct 18 10:54:52 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * gc.c (before_gc_sweep): clear objspace::freelist.
+ * dln.c: simplify #ifdef. _WIN32 and __CYGWIN__ are exclusive.
+ see include/ruby/defines.h
+ * gc.c: ditto.
+ * ext/sdbm/_sdbm.c: ditto.
- * gc.c (slot_sweep): clear slot::freelist.
+Sun Oct 18 10:42:19 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * gc.c (heaps_prepare_freeslot): renamed to heaps_prepare_freeslot.
+ * ruby.c (open_load_file): add a comment.
- * gc.c (unlink_free_heap_slot): remove unused function.
+Sun Oct 18 10:12:46 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * gc.c (rb_free_const_table): remove unused function.
+ * file.c (rb_file_identical_p): simplify ifdefs
-Tue Jul 16 19:05:12 2013 Tanaka Akira <akr@fsij.org>
+Sun Oct 18 10:01:40 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * bignum.c (big_shift3): Big shift width is not a problem for right
- shift.
+ * ChangeLog: Good-bye OS/2.
+ * common.mk: ditto.
+ * configure.in: ditto.
+ * dln_find.c: ditto.
+ * ext/Setup.emx: ditto.
+ * ext/extmk.rb: ditto.
+ * ext/socket/extconf.rb: ditto.
+ * ext/zlib/extconf.rb: ditto.
+ * file.c: ditto.
+ * include/ruby/defines.h: ditto.
+ * io.c: ditto.
+ * lib/mkmf.rb: ditto.
+ * missing/os2.c: ditto.
+ * process.c: ditto.
+ * ruby.c: ditto.
+ * NEWS: announce OS/2 is no longer supported.
-Tue Jul 16 18:50:08 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sun Oct 18 08:50:15 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * array.c (rb_ary_count): [DOC] fix typo. Array#count uses ==, not
- ===. a question at asakusa.rb ML.
+ * include/ruby/defines.h (DOSISH): add comments.
-Tue Jul 16 18:35:48 2013 Tanaka Akira <akr@fsij.org>
+Sun Oct 18 08:26:51 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * bignum.c (bary_mul_karatsuba): Avoid duplicate calculation when
- squaring.
- (bary_mul_toom3_branch): Ditto.
+ * io.c (fptr_finalize): don't release gvl if fptr is not writable.
+ writable fd may block on close(2) when it's on NFS. But readonly
+ fd doesn't. [Bug #11559]
+ result: make benchmark OPTS="-p bm_require_t -e ruby-trunk -e ruby-2.2.2"
+ build-ruby: 0.171
+ ruby 2.3.0dev(r52151): 0.659
+ ruby 2.2.0p95 (r50295): 0.834
-Tue Jul 16 17:43:22 2013 Koichi Sasada <ko1@atdot.net>
+Sun Oct 18 09:32:58 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * gc.c (link_free_heap_slot): removed.
+ * file.c (ruby_is_fd_loadable): this should be fail if st_mode is
+ not regular file nor FIFO.
- * gc.c (slot_sweep): use `heaps_add_freeslot' instead of
- `link_free_heap_slot'.
+Sun Oct 18 09:20:17 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * gc.c (assign_heap_slot): use local variable `slot' instead of
- `heaps'.
+ * ruby.c (open_load_file): use rb_thread_wait_fd() instead of reopen.
-Tue Jul 16 17:21:39 2013 Koichi Sasada <ko1@atdot.net>
+Sun Oct 18 05:11:22 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * gc.c (assign_heap_slot): refactoring variable names.
+ * 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]
- * gc.c (slot_add_freeobj): added.
+ * ruby.c (loadopen_func): new for the above.
- * gc.c (heaps_add_freeslot): added.
+ * 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()
- * gc.c (finalize_list, rb_gc_force_recycle, slot_sweep): use
- `slot_add_freeobj' instead of modifying linked list directly.
+ * common.mk: now, ruby.o depend on thread.h.
-Tue Jul 16 16:30:58 2013 Koichi Sasada <ko1@atdot.net>
+ * test/ruby/test_require.rb
+ (TestRequire#test_loading_fifo_threading_success): new test.
+ This test successful case that loading from FIFO.
- * gc.c (lazy_sweep): refactoring.
+ * test/ruby/test_require.rb
+ (TestRequire#test_loading_fifo_threading_raise): rename from
+ test_loading_fifo_threading. You shouldn'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.
-Tue Jul 16 13:32:06 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Oct 17 13:55:32 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * encoding.c (enc_set_index): since r41967, old terminator is dealt
- with in str_fill_term(). should not consider it here because this
- function is called before any encoding is set.
+ * file.c (rb_file_expand_path_internal): concatenate converted
+ string to the result instead of making converted string and
+ append it.
-Tue Jul 16 11:12:03 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * string.c (rb_str_cat_conv_enc_opts): from rb_str_conv_enc_opts,
+ separate function to concatenate with transcoding.
- * proc.c (rb_block_arity): raise ArgumentError if no block given.
+Sat Oct 17 13:19:10 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Jul 16 08:15:22 2013 Zachary Scott <e@zzak.io>
+ * 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.
- * ext/bigdecimal/lib/bigdecimal/util.rb: [DOC] document top-level
- classes from BigDecimal utils native extensions
+Sat Oct 17 05:28:32 2015 Rei Odaira <Rei.Odaira@gmail.com>
-Tue Jul 16 03:23:03 2013 Zachary Scott <e@zzak.io>
+ * test/ruby/test_symbol.rb (test_symbol_fstr_leak): add a warm-up
+ code and check RSS to avoid false positive on AIX and false
+ negative on Mac OS X. [Bug #10686]
- * numeric.c: [DOC] improve rdoc formatting for parameters and links
+Fri Oct 16 15:54:37 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Jul 15 14:40:00 2013 Tanaka Akira <akr@fsij.org>
+ * 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]
- * include/ruby/intern.h (rb_big2str0): Deprecated.
+ * ruby.c (load_file_internal): ditto.
- * bignum.c (rb_big2str1): Renamed from rb_big2str0.
- (rb_big2str0): Deprecated wrapper for rb_big2str1.
- (rb_big2str): Invoke rb_big2str1 instead of rb_big2str0.
+Thu Oct 15 23:56:03 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Jul 15 14:13:02 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * proc.c (rb_sym_to_proc): make void env.
- * struct.c (rb_struct_each_pair): use rb_yield_values(2, key, value)
- instead of rb_yield(rb_assoc_new(key, value)) if rb_block_arity()
- is greater than 1.
+Thu Oct 15 13:37:23 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Jul 15 13:46:26 2013 Tanaka Akira <akr@fsij.org>
+ * proc.c (rb_sym_to_proc): move from string.c and create a Proc
+ with no environments. [ruby-core:71088] [Bug #11594]
- * bignum.c: Add static assertions.
+Thu Oct 15 01:57:03 2015 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
-Mon Jul 15 13:36:02 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * test/objspace/test_objspace.rb
+ (test_trace_object_allocations_start_stop_clear): clear object
+ allocation table first to get rid of erroneous detection for obj3.
+ [ruby-dev:49095] [Bug #11271]
- * hash.c (rb_hash_each_pair): performance improvement by using
- rb_block_arity().
+Thu Oct 15 01:53:38 2015 Benoit Daloze <eregontp@gmail.com>
-Mon Jul 15 13:15:37 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * test/ostruct/test_ostruct.rb: Add tests for OpenStruct#respond_to.
+ Patch by @jeremy in [GH-1041]: https://github.com/ruby/ruby/pull/1041
- * proc.c (rb_block_arity): create internal API rb_block_arity().
- it returns arity of given block.
+Thu Oct 15 01:49:25 2015 Benoit Daloze <eregontp@gmail.com>
-Mon Jul 15 13:07:27 2013 Yuki Yugui Sonoda <yugui@yugui.jp>
+ * lib/ostruct.rb: Finish defining OpenStruct attributes lazily.
+ Patch by @sferik in [GH-1037]: https://github.com/ruby/ruby/pull/1037
+ This commit is an addendum to https://github.com/ruby/ruby/pull/1033.
+ It:
+ 1. lazily defines attribute accessors for copied and marshaled objects,
+ 2. returns nil when an attribute reader is not defined, and
+ 3. defines respond_to_missing? to maintain the same respond_to? behavior
- * lib/prime.rb (Prime::EratosthenesGenerator,
- Prime::EratosthenesSieve): New implementation by
- robertjlooby <robertjlooby AT gmail.com>.
+Wed Oct 14 16:56:50 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/test_prime.rb: updated with new method name
+ * configure.in: check for libunwind.h, which is not available in
+ very old OS X SDK. [ruby-core:71080] [Bug #11591]
-Mon Jul 15 11:32:46 2013 Zachary Scott <e@zzak.io>
+Wed Oct 14 14:11:42 2015 Brian Black <bblack@veracode.com>
- * numeric.c (rb_cNumeric): [DOC] Added comment for Numeric to fix doc
+ * iseq.c (rb_insn_operand_intern): change kw in callinfo disasm from the
+ number of keyword arguments to an ordered list of the keywords used.
+ [Feature #11589]
-Mon Jul 15 11:24:48 2013 Tanaka Akira <akr@fsij.org>
+Wed Oct 14 13:58:44 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * bignum.c (maxpow_in_bdigit_dbl): Useless #if removed.
+ * parse.y (parser_nextc): send a warning to ripper, not to STDERR
+ always.
-Mon Jul 15 11:10:46 2013 Zachary Scott <e@zzak.io>
+ * parse.y (rb_warn1, rb_warning1): move argument conversions to
+ callers. PRIsVALUE is not valid in String#%.
- * bignum.c (rb_big_coerce): [DOC] Add docs for Bignum#coerce
- Based on patch by Juanito Fatas [Fixes GH-360]
- https://github.com/ruby/ruby/pull/360
+Wed Oct 14 13:37:23 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Mon Jul 15 10:56:01 2013 Zachary Scott <e@zzak.io>
+ * lib/racc/rdoc/grammar.en.rdoc: fix spell error.
+ [fix GH-1053][ci skip] Patch by @Matrixbirds
- * thread.c (mutex_sleep): [DOC] Awake thread will reacquire lock
- By Tim Abdulla [Fixes GH-342] https://github.com/ruby/ruby/pull/342
+Tue Oct 13 22:06:50 2015 Tanaka Akira <akr@fsij.org>
-Mon Jul 15 10:45:09 2013 Tanaka Akira <akr@fsij.org>
+ * ext/socket/raddrinfo.c (rsock_fd_family): Check sa_len.
- * bignum.c (nlz16): Use __builtin_clz if possible.
- (nlz32): Use __builtin_clz or __builtin_clzl if possible.
- (nlz64): Use __builtin_clzl or __builtin_clzll if possible.
- (nlz128): Use __builtin_clzll if possible.
+Tue Oct 13 12:14:10 2015 Craig Davison <craig65535@gmail.com>
- * configure.in: Check __builtin_clz, __builtin_clzl and
- __builtin_clzll.
+ * ext/socket/rsock_addrinfo (rsock_addrinfo): specify address
+ family. [Fix GH-1052]
-Mon Jul 15 09:39:07 2013 Tanaka Akira <akr@fsij.org>
+ * ext/socket/udpsocket.c (udp_connect, udp_bind, udp_send):
+ address family by the receiver.
- * bignum.c (power_cache_get_power): Use bitsize instead of ceil_log2.
- (ones): Removed.
- (next_pow2): Removed.
- (floor_log2): Removed.
- (ceil_log2): Removed.
+Sun Oct 11 07:09:19 2015 Koichi Sasada <ko1@atdot.net>
- * configure.in (__builtin_popcountl): Don't check.
+ * vm_insnhelper.c (vm_push_frame): initialize other than sp (and ep)
+ first for performance.
-Mon Jul 15 02:47:09 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sun Oct 11 06:21:50 2015 Koichi Sasada <ko1@atdot.net>
- * localeinit.c (rb_locale_charmap, Init_enc_set_filesystem_encoding):
- move from encoding.c.
+ * vm_eval.c, internal.h (rb_yield_1): added for performance which
+ doesn't check Qundef.
- * miniinit.c (rb_locale_charmap, Init_enc_set_filesystem_encoding):
- define miniruby specific functions only.
+ * numeric.c (int_dotimes): use rb_yield_1.
-Mon Jul 15 02:32:58 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sun Oct 11 06:19:49 2015 Koichi Sasada <ko1@atdot.net>
- * encoding.c (rb_enc_init): no longer needs NO_PRESERVED_ENCODING.
+ * vm_insnhelper.c (vm_call_iseq_setup_normal): setup sp first
+ for performance.
- * encoding.c (enc_inspect): defer loading autoloaded encoding.
+Sun Oct 11 05:29:51 2015 Koichi Sasada <ko1@atdot.net>
- * encoding.c (enc_check_encoding): use is_data_encoding() to check
- type consistently.
+ * vm.c (invoke_block_from_c): split this function into several
+ functions.
- * encoding.c (must_encoding): return rb_encoding* instead of encoding
- index.
+ * vm_insnhelper.c (vm_yield_callee_setup_arg): remove this function
+ because it is only delegation function.
- * encoding.c (enc_check_encoding): use is_data_encoding() to check
- type consistently.
+Sun Oct 11 03:48:46 2015 Koichi Sasada <ko1@atdot.net>
- * encoding.c (must_encoding): return rb_encoding* instead of encoding
- index.
+ * gc.c (newobj_of_slowpass): fix typo (pass -> path).
+ Pointed out by Yukihiro Matsumoto <matz@ruby-lang.org>.
-Mon Jul 15 02:21:39 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * gc.c (newobj_of_...): `of' is unnecessary.
- * string.c (str_fill_term): consider old terminator length, and should
- not use rb_enc_ascget since it depends on the current encoding which
- may not be compatible with the new terminator. [Bug #8634]
+Sat Oct 10 19:04:42 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * encoding.c (enc_inspect): use PRIsVALUE to preserve the result
- encoding.
+ * ext/socket/udpsocket.c (udp_connect, udp_bind): get open files
+ inside ensure functions.
-Sun Jul 14 23:21:47 2013 Tanaka Akira <akr@fsij.org>
+Sat Oct 10 18:35:12 2015 Koichi Sasada <ko1@atdot.net>
- * configure.in: Check __builtin_popcountl, __builtin_bswap32 and
- __builtin_bswap64.
+ * vm_insnhelper.c (vm_call_method0): do not propagate enable_fastpath,
+ but pass dummy CC to prevent wrong caching.
- * internal.h (swap32): Use the configure result for the condition to
- use __builtin_bswap32.
- (swap64): Use the configure result for the condition to use
- __builtin_bswap64.
+Sat Oct 10 15:28:45 2015 Koichi Sasada <ko1@atdot.net>
- * bignum.c (ones): Use the configure result for the condition to use
- __builtin_popcountl.
- (bary_unpack_internal): Use appropriate types for swap argument.
+ * import a github pull request
+ https://github.com/ruby/ruby/pull/1050
+ by Kazuho Oku <kazuho@natadeco.co>.
-Sun Jul 14 22:21:11 2013 Tanaka Akira <akr@fsij.org>
+ This pull request has the following commits.
- * bignum.c (bary_subb): Support xn < yn.
- (bigsub_core): Removed.
- (bigsub): Don't compare before subtraction. Just subtract and
- get the two's complement if the subtraction causes a borrow.
+ * gc.c: reduce # of args to 6 (max. of register args on x86-64) so
+ that the `newobj_of_slowpass` can be called via TCO.
-Sun Jul 14 00:36:03 2013 Tanaka Akira <akr@fsij.org>
+ * gc.c (newobj_of), string.c (str_duplicate): for performance,
+ the hot functions must be inlined.
- * bignum.c (DIGSPERLONG): Unused macro removed.
- (DIGSPERLL): Ditto.
+ * gc.c: for performance, preceding arguments of `.*newobj_of.*`
+ must be same, so that the arg registers can be reused in case of
+ TCO.
-Sun Jul 14 00:32:51 2013 Tanaka Akira <akr@fsij.org>
+Sat Oct 10 08:52:21 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * bignum.c (rb_big_aref): Less scan when the number is negative.
+ * ext/socket/udpsocket.c (udp_connect, udp_bind, udp_send): fix
+ memory leaks at closed socket.
-Sun Jul 14 00:17:42 2013 Tanaka Akira <akr@fsij.org>
+Fri Oct 9 17:29:07 2015 Shugo Maeda <shugo@ruby-lang.org>
- * bignum.c (big_shift): Avoid signed integer overflow.
+ * lib/net/ftp.rb (parse257): refactor.
-Sun Jul 14 00:14:15 2013 Tanaka Akira <akr@fsij.org>
+Fri Oct 9 16:42:26 2015 Shugo Maeda <shugo@ruby-lang.org>
- * bignum.c (bary_mul_precheck): Use bary_small_lshift or
- bary_mul_normal if xl is 1.
+ * lib/net/imap.rb: use frozen_string_literal: true.
-Sat Jul 13 22:58:16 2013 Tanaka Akira <akr@fsij.org>
+ * test/net/imap/test_imap.rb: ditto.
- * bignum.c (big_shift3): New function.
- big_lshift and big_rshift are merged.
- (big_shift2): New function.
- (big_lshift): Use big_shift3.
- (big_rshift): Ditto.
- (check_shiftdown): Removed.
- (rb_big_lshift): Use big_shift2 and big_shift3.
- (rb_big_rshift): Ditto.
- (big_lshift): Removed.
- (big_rshift): Ditto.
+ * test/net/imap/test_imap_response_parser.rb: ditto.
-Sat Jul 13 15:51:38 2013 Tanaka Akira <akr@fsij.org>
+Fri Oct 9 15:52:28 2015 Shugo Maeda <shugo@ruby-lang.org>
- * bignum.c (bary_small_lshift): Use size_t instead of long.
- (bary_small_rshift): Ditto.
+ * lib/net/ftp.rb: use frozen_string_literal: true.
-Sat Jul 13 15:33:33 2013 Tanaka Akira <akr@fsij.org>
+ * test/net/ftp/test_buffered_socket.rb: ditto.
- * bignum.c (bary_small_lshift): Functions moved to remove
- declaration.
- (bary_small_rshift): Ditto.
+ * test/net/ftp/test_ftp.rb: ditto.
-Sat Jul 13 12:27:34 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/net/ftp/test_mlsx_entry.rb: ditto.
- * encoding.c (rb_enc_associate_index): fill new terminator length, not
- old one.
+Fri Oct 9 14:12:35 2015 Shota Fukumori (sora_h) <her@sorah.jp>
-Sat Jul 13 12:24:24 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/openssl/lib/openssl/ssl.rb: Revert r52082 because it was
+ dropping TLS v1.1 support too. Supporting only TLS v1.2 is too
+ early, because many popular websites still don't support it.
- * ext/win32: move from ext/dl and ext/fiddle. since ext/extmk.rb
- builds extensions in alphabetical order, compiled?('fiddle') under
- ext/dl makes no sense.
+ For instance, Servers where aws-sdk connects to still don't support
+ TLS v1.2 and it became broken.
-Sat Jul 13 09:26:09 2013 Tanaka Akira <akr@fsij.org>
+ We should consider more carefully about this.
- * bignum.c (biglsh_bang): Removed.
- (bigrsh_bang): Ditto.
- (bigmul1_toom3): Use bary_small_lshift and bary_small_rshift.
+ [Fix GH-873] [Feature #11524]
-Sat Jul 13 01:04:43 2013 Zachary Scott <e@zzak.io>
+Fri Oct 9 12:52:08 2015 Shugo Maeda <shugo@ruby-lang.org>
- * lib/rubygems/psych_additions.rb: Ignore Psych docs here
+ * compile.c (iseq_compile_each): Dynamic string literals (e.g.,
+ "#{x}") should not be frozen because they don't literally
+ represent strings.
+ https://twitter.com/shugomaeda/status/651937650027401216
+ https://twitter.com/yukihiro_matz/status/651942882312482817
+ https://twitter.com/yukihiro_matz/status/651980835181096960
-Fri Jul 12 18:10:46 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+Fri Oct 9 06:52:49 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * ext/fiddle/win32/lib/win32/registry.rb
- (Win32::Registry::API#make_wstr): same as r41922.
+ * benchmark/prepare_require.rb: skip file creation if it already
+ exist. Suggested by ko1.
-Fri Jul 12 16:28:37 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Oct 9 06:18:04 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * benchmark/bm_require.rb: new benchmark for require.
+ * benchmark/bm_require_thread.rb: new benchmark for conflicting
+ require vs thread. like [Bug #11559]
+ * prepare_require.rb: new file for preparing above tests.
+ * prepare_require.rb: ditto.
- * encoding.c (rb_enc_associate_index): refill the terminator if it
- becomes longer than before. [ruby-dev:47500] [Bug #8624]
+Thu Oct 8 14:10:45 2015 Zachary Scott <zzak@ruby-lang.org>
- * string.c (str_null_char, str_fill_term): get rid of out of bound
- access.
+ * ext/openssl/lib/openssl/ssl.rb: Default to TLSv1.2 and drop TLS v1
+ Patch provided by @claudijd [Fixes GH-873] [Feature #11524]:
+ https://github.com/ruby/ruby/pull/873
- * string.c (rb_str_fill_terminator): add a parameter for the length of
- new terminator.
+Wed Oct 7 22:55:02 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Jul 12 11:26:25 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * test/minitest/metametameta.rb (with_output): restore output to
+ fix mixing test result output in worker responses.
- * hash.c (rb_hash_reject_bang): do not call rb_hash_foreach() if RHash
- has ntbl and it is empty.
+Wed Oct 7 21:32:51 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Jul 12 11:17:41 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * string.c (str_duplicate): move from rb_str_resurrect to short
+ circuit initialization.
- * hash.c (recursive_hash): use RHASH_SIZE() to check hash size.
+Wed Oct 7 20:43:14 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Jul 12 00:20:00 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * string.c (rb_str_resurrect): fix resurrection of short enough to
+ be embedded but not embedded string.
- * hash.c (rb_hash_size): use RHASH_SIZE().
+Wed Oct 7 20:17:29 2015 Koichi Sasada <ko1@atdot.net>
-Fri Jul 12 00:08:24 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * gc.c (newobj_of): divide fast path and slow path
+ to avoid register savings for fast path.
- * hash.c (rb_hash_values): set array capa to RHASH_SIZE().
+ This idea is given by Kazuho Oku <kazuho@natadeco.co>.
-Thu Jul 11 23:54:45 2013 Masaki Matsushita <glass.saga@gmail.com>
+Wed Oct 7 17:30:50 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * hash.c (rb_hash_keys): set array capa to RHASH_SIZE().
+ * string.c (rb_str_times): optimize for the argument 0 and 1.
-Thu Jul 11 21:30:17 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Oct 7 01:20:46 2015 Koichi Sasada <ko1@atdot.net>
- * win32/win32.c (rb_w32_pow): undef pow to get rid of infinite
- recursive call. re-fix [Bug #8495]. [ruby-core:55923] [Bug #8621]
+ * gc.h, gc.c: introduce new debug function rb_obj_info_dump(VALUE obj)
+ which prints the result of rb_raw_obj_info(..., obj).
-Thu Jul 11 20:18:13 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Oct 7 01:16:11 2015 Koichi Sasada <ko1@atdot.net>
- * ext/dl/win32/lib/win32/registry.rb (Win32::Registry::API#make_wstr):
- remove workaround to append WCHAR terminator.
+ * vm_args.c: remove an unused field args_info::calling.
- * transcode.c (str_encode_associate): fill terminator after conversion.
+Tue Oct 6 23:43:10 2015 Koichi Sasada <ko1@atdot.net>
- * string.c (rb_enc_str_new, rb_str_set_len, rb_str_resize): fill
- minimum length of the encoding as the terminator.
+ * proc.c (rb_method_entry_min_max_arity): should support
+ OPTIMIZED_METHOD_TYPE_CALL.
- * string.c (str_buf_cat, rb_str_buf_append, rb_str_splice_0): ditto.
+Tue Oct 6 21:29:08 2015 Tanaka Akira <akr@fsij.org>
- * string.c (str_make_independent_expand, rb_str_modify_expand): make
- the capacity enough for multi-byte terminator.
+ * lib/tmpdir.rb (Dir.tmpdir): return duplicated string to be
+ modify safely even when $SAFE > 0.
- * string.c (rb_string_value_cstr): fill minimum length of the encoding
- as the terminator.
+Tue Oct 6 19:24:38 2015 Koichi Sasada <ko1@atdot.net>
- * string.c (rb_string_value_cstr): check null char in char, not in
- byte.
+ * vm_insnhelper.c (vm_call_method0): use switch() for visibilities
+ (for readability).
-Thu Jul 11 14:48:35 2013 Zachary Scott <e@zzak.io>
+Tue Oct 6 19:23:58 2015 Koichi Sasada <ko1@atdot.net>
- * array.c: Replace confusing example for #reverse_each in overview
- Patch by Earl St Sauver [Fixes documenting-ruby/ruby-12]
- https://github.com/documenting-ruby/ruby/pull/12
+ * proc.c (Init_Proc): Proc#call and others should be public.
-Thu Jul 11 14:22:37 2013 Zachary Scott <e@zzak.io>
+Tue Oct 6 18:51:51 2015 Koichi Sasada <ko1@atdot.net>
- * test/drb/ut_eq.rb: Use localhost for drb tests [Bug #7311]
- Patch by Vit Ondruch [ruby-core:49101]
- * test/drb/ut_array.rb: ditto
- * test/drb/ut_array_drbssl.rb: ditto
+ * method.h: IMEMO_FL_USER3 and IMEMO_FL_USER4 is not needed any more.
-Thu Jul 11 13:48:03 2013 Zachary Scott <e@zzak.io>
+Tue Oct 6 18:47:45 2015 Koichi Sasada <ko1@atdot.net>
- * sprintf.c: Fix typo patch by @hynkle [Fixes GH-357]
- https://github.com/ruby/ruby/pull/357
+ * method.h: remove METHOD_ENTRY_SAFE(me) and related code
+ because $SAFE = 3 and 4 is not available.
+ Now, $SAFE is not checked on method dispatch at all.
-Thu Jul 11 13:00:34 2013 Zachary Scott <e@zzak.io>
+ * vm_eval.c, vm_insnhelper.c, vm_method.c: ditto.
- * lib/securerandom.rb: Refactor conditions by Rafal Chmiel
- [Fixes GH-326] https://github.com/ruby/ruby/pull/326
+Tue Oct 6 13:56:14 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Jul 11 12:04:47 2013 Tanaka Akira <akr@fsij.org>
+ * include/ruby/ruby.h: turn function macros into inline functions,
+ for debuggers.
- * bignum.c: Don't use toom3 after once karatsuba is chosen.
- (mulfunc_t): New type.
- (bary_mul_toom3_start): Renamed from bary_mul.
- (bary_mul_karatsuba_start): Renamed from bary_mul.
- (bary_mul_balance_with_mulfunc): Renamed from bary_mul_balance and
- new argument, mulfunc, is added.
- (rb_big_mul_balance): Invoke bary_mul_balance_with_mulfunc with
- bary_mul_toom3_start.
- (bary_mul_karatsuba): Invoke bary_mul_karatsuba_start instead of
- bary_mul.
- (bary_mul_precheck): Extracted from bary_mul.
- (bary_mul_karatsuba_branch): Extracted from bary_mul.
- (bary_mul_karatsuba_start): New function to call bary_mul_precheck
- and bary_mul_karatsuba_branch.
- (bary_mul_toom3_branch): Extracted from bary_mul.
- (bary_mul_toom3_start): New function to call bary_mul_precheck and
- bary_mul_toom3_branch.
- (bary_mul): Just call bary_mul_toom3_start.
- Arguments for work memory are removed.
- (rb_cstr_to_inum): Follow the bary_mul change.
- (bigmul0): Ditto.
+ * include/ruby/ruby.h: turn constant macros into enums, for
+ debuggers.
-Thu Jul 11 10:46:38 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Oct 6 13:48:05 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * tool/probes_to_wiki.rb: fix usage comment. use Enumerable#grep
- which yields each elements to reduce unnecessary array.
+ * method.h: typo fix. Patch by @davydovanton [fix GH-1032][ci skip]
-Thu Jul 11 10:09:18 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Tue Oct 6 06:54:34 2015 Koichi Sasada <ko1@atdot.net>
- * process.c (rb_daemon): daemon(3) is implemented with fork(2).
- Therefore it needs rb_thread_atfork(). (and revert r41903)
+ * iseq.c (rb_iseq_free): free iseq::variable_body to avoid memory
+ leak.
-Thu Jul 11 03:22:10 2013 Aaron Patterson <aaron@tenderlovemaking.com>
+Tue Oct 6 06:32:52 2015 Koichi Sasada <ko1@atdot.net>
- * tool/probes_to_wiki.rb: adding a script to convert probes.d to wiki
- format for easy wiki updates.
+ * proc.c: enable optimization of Proc#call.
+ [Feature #11569]
-Thu Jul 11 00:54:07 2013 Zachary Scott <zachary@zacharyscott.net>
+ * NEWS: write about this optimization and incompatibilities.
- * man/ri.1: Incorrect use of .Dd macro [Bug #8620] by Tristan Hill
+ * test/ruby/test_backtrace.rb: catch up this fix.
-Thu Jul 11 00:48:29 2013 Zachary Scott <zachary@zacharyscott.net>
+Tue Oct 6 04:41:03 2015 Koichi Sasada <ko1@atdot.net>
- * lib/delegate.rb: Add example for __setobj__ and __getobj__
- [Bug #8615] Patch by Caleb Thompson
+ * vm_insnhelper.c: solve goto spaghetti.
-Wed Jul 10 23:29:22 2013 Zachary Scott <zachary@zacharyscott.net>
+ Change all goto statement across blocks to tail call functions.
- * lib/logger.rb: Use :call-seq: for method signature rdoc
+Tue Oct 6 02:29:38 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Jul 10 23:23:18 2013 Zachary Scott <zachary@zacharyscott.net>
+ * string.c (rb_str_resurrect): optimize by short circuit to copy
+ hidden string without checking length, encoding and so on.
- * lib/logger.rb (#add): Remove incorrect rdoc for return value
- [Bug #8567] Reported by Tim Pease.
+Mon Oct 5 23:08:17 2015 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
-Wed Jul 10 23:12:00 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/ruby/test_thread.rb (test_handle_interrupt_blocking): check if
+ exception handling was postponed until sleep.
- * string.c (rb_str_subpos): make public function.
+Mon Oct 5 22:25:49 2015 Tanaka Akira <akr@fsij.org>
-Wed Jul 10 22:44:19 2013 Tanaka Akira <akr@fsij.org>
+ * lib/pp.rb: Use frozen_string_literal: true.
- * bignum.c: Add a static assertion for RBIGNUM_EMBED_LEN_MAX.
+ * lib/prettyprint.rb: Ditto.
-Wed Jul 10 22:31:25 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * lib/resolv.rb: Ditto.
- * string.c (rb_str_index): cache single byte flag and some
- cosmetic changes.
+ * lib/tmpdir.rb: Ditto.
-Wed Jul 10 22:03:27 2013 Tanaka Akira <akr@fsij.org>
+ * test/test_pp.rb: Ditto.
- * bignum.c (bary_2comp): Don't use bary_plus_one.
- (bary_add_one): Replaced by the implementation of bary_plus_one.
+ * test/test_prettyprint.rb: Ditto.
-Wed Jul 10 20:48:22 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * tool/transcode-tblgen.rb: Ditto.
- * bignum.c (sizeof_bdigit_dbl): check sizeof(BDIGIT_DBL).
+Mon Oct 5 20:39:32 2015 Benoit Daloze <eregontp@gmail.com>
- * internal.h (STATIC_ASSERT): move from enum.c.
+ * test/ruby/test_thread.rb: fix potential race condition.
+ The thread could have a "sleep" status because it tries
+ to acquire the mutex, but does not have it yet.
-Wed Jul 10 20:08:21 2013 Tanaka Akira <akr@fsij.org>
+Mon Oct 5 15:39:30 2015 Zachary Scott <zzak@ruby-lang.org>
- * bignum.c (SIZEOF_BDIGIT_DBL): Add a ifdef guard for test.
+ * numeric.c: [DOC] Overview for Numeric class by Joe Corcoran
+ This patch was created at ROSSConf Berlin 2015 [Bug #11555]
-Wed Jul 10 14:18:59 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Oct 5 15:34:56 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * process.c (fork_daemon): kill the other threads all and abandon the
- kept mutexes.
+ * proc.c (proc_new): link ep to calling block.
+ [ruby-core:70980] [Bug #11566]
-Wed Jul 10 11:35:36 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+Mon Oct 5 00:53:51 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/net/http/test_http.rb (TestNetHTTP_v1_2#test_get,
- TestNetHTTP_v1_2_chunked#test_get): shouldn't check
- HttpResponse#decode_content if Zlib is not available.
- ko1 complained via IRC.
+ * dir.c (rb_dir_getwd): make ASCII-8BIT if filesystem encoding is
+ US-ASCII, like as Dir.glob.
-Wed Jul 10 10:20:07 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Sun Oct 4 23:39:09 2015 Tanaka Akira <akr@fsij.org>
- * tool/rbinstall.rb: always require rubygems to stabilize rubygems
- related status like whether Gem::Specification is defined or not.
+ * enum.c (nmin_filter): Fix limit value.
+ patch by Helder Pereira.
+ [Bug #11471] [ruby-core:70477]
- * tool/rbinstall.rb (Gem::Specification.unresolved_deps): define stub.
+Sun Oct 4 15:11:48 2015 NARUSE, Yui <naruse@ruby-lang.org>
-Wed Jul 10 08:21:15 2013 Eric Hodel <drbrain@segment7.net>
+ * enc/euc_jp.c (mbc_case_fold): check given string is valid or not,
+ and if invalid, return 1. [Bug #11486]
- * lib/rubygems: Import RubyGems 2.1
- * test/rubygems: Ditto.
+Sun Oct 4 10:09:57 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Jul 10 07:34:34 2013 Eric Hodel <drbrain@segment7.net>
+ * dir.c (rb_dir_getwd): normalize OS path to UTF-8 on OS X.
- * lib/rubygems/ext/ext_conf_builder.rb: Remove siteconf file after
- building the gem.
- * test/rubygems/test_gem_ext_ext_conf_builder.rb: Test for the above.
+Sun Oct 4 00:09:45 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/rubygems/psych_tree.rb (module Gem): Add backward compatibility
- for r41148
+ * template/ruby-runner.c.in: wrapper to set dynamic loading path
+ environment variable. /bin/sh on Mac OS X 10.11 (El Capitan)
+ clears DYLD_LIBRARY_PATH.
- * test/rubygems/test_gem_package.rb: Add backward compatibility for
- double-slash elimination.
+ it must:
+ - do nothing even if current directory is not present
+ - do not set other environment variables, e.g. PWD, SHLVL, etc
+ - do not open other FDs, e.g. pipes for timer thread
-Wed Jul 10 06:22:27 2013 Tadayoshi Funaba <tadf@dotrb.org>
+Sun Oct 2 10:59:00 2015 schneems <richard.schneeman@gmail.com>
- * ext/date/date_parse.c (date_zone_to_diff): [ruby-core:55831].
+ * ext/pathname/lib/pathname.rb: freeze string literals for
+ reduced object allocation.
+ [Feature #11375] [ruby-core:70043]
-Wed Jul 10 00:41:42 2013 Tanaka Akira <akr@fsij.org>
+Fri Oct 2 09:20:20 2015 Martin Duerst <duerst@it.aoyama.ac.jp>
- * bignum.c (bary_mul): x*1 is x.
+ * common.mk, lib/unicode_normalize/tables.rb: Change Unicode
+ Version for character normalization data from 7.0.0 to
+ 8.0.0.
-Tue Jul 9 22:24:39 2013 Tanaka Akira <akr@fsij.org>
+Fri Oct 2 00:18:39 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * bignum.c (bary_mul1): No need to invoke MEMZERO at last.
- (bary_mul_single): Invoke MEMZERO here.
+ * proc.c (proc_mark): block.ep of Proc from Symbol is now NULL.
+ [ruby-core:70961] [Bug #11560]
-Tue Jul 9 21:40:01 2013 Kouhei Sutou <kou@cozmixng.org>
+Wed Sep 30 15:47:13 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/rexml/test_text.rb: Add missing tests for Text#<<.
- Reported by nagachika. Thanks!!!
+ * vm_args.c (vm_caller_setup_arg_block): bypass Symbol#to_proc
+ call to optimize symbol block passing.
-Tue Jul 9 18:02:38 2013 Akinori MUSHA <knu@iDaemons.org>
+Wed Sep 30 01:34:34 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/fileutils.rb (FileUtils#chown_R): Do not skip traversal even
- if user and group are both nil, to be consistent with #chown and
- other commands.
+ * parse.y (parser_free): fix memory leak at syntax error when
+ warn-indent is enabled.
-Tue Jul 9 17:58:26 2013 Akinori MUSHA <knu@iDaemons.org>
+Tue Sep 29 22:27:50 2015 Benoit Daloze <eregontp@gmail.com>
- * test/fileutils/test_fileutils.rb
- (TestFileUtils#assert_output_lines): New utility assertion
- method for testing verbose output.
+ * parse.y: fix minor typo. [ci skip][fix GH-1038].
+ Patch by @ltratt.
-Tue Jul 9 17:43:57 2013 Koichi Sasada <ko1@atdot.net>
+Tue Sep 29 16:53:53 2015 Martin Duerst <duerst@it.aoyama.ac.jp>
- * test/test_tracer.rb: catch up recent rubygems changes.
+ * tool/unicode_norm_gen.tmpl, lib/unicode_normalize/tables.rb:
+ get rid of many .freeze commands by using frozen_string_literal
+ pragma.
-Tue Jul 9 16:58:30 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+Tue Sep 29 16:37:29 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/{dl,fiddle}/win32/lib/win32/registry.rb: hope that the final
- resolution to fix the failure of test-all. and includes Win64
- support (fixed a potential bug).
+ * compile.c (compile_dstr_fragments): fix performance by omitting
+ the first empty string only for keeping literal encoding if
+ other literals are too. [ruby-core:70930] [Bug #11556]
-Tue Jul 9 15:57:20 2013 Akinori MUSHA <knu@iDaemons.org>
+ * string.c (rb_str_append_literal): append but keep encoding non
+ US-ASCII.
- * object.c: Fix rdoc for Kernel#<=>. [Fixes GH-352]
+Mon Sep 28 17:40:17 2015 Shugo Maeda <shugo@ruby-lang.org>
-Tue Jul 9 15:53:51 2013 Akinori MUSHA <knu@iDaemons.org>
+ * lib/net/ftp.rb (mtime): use usec instead of fractions to parse
+ decimal fractions of a second correctly when the number of digits
+ is not 6.
- * lib/fileutils.rb (FileUtils#mode_to_s): Define mode_to_s() also
- as singleton method, or FileUtils.chmod fails in verbose mode.
+Mon Sep 28 16:07:08 2015 Shugo Maeda <shugo@ruby-lang.org>
-Tue Jul 9 15:16:02 2013 Akinori MUSHA <knu@iDaemons.org>
+ * lib/net/ftp.rb (mtime): parse decimal fractions of a second as
+ specified in RFC 3659.
- * test/fileutils/fileasserts.rb
- (Test::Unit::FileAssertions#assert_not_symlink): Add a missing
- optional argument "message".
+Mon Sep 28 10:31:12 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Tue Jul 9 15:03:24 2013 Akinori MUSHA <knu@iDaemons.org>
+ * test/test_forwardable.rb: Write basic tests for lib/forwardable.
+ [fix GH-1035] Patch by @kachick
- * lib/fileutils.rb (FileUtils#chown, FileUtils#chown_R): If user
- and group are both nil, print ":".
+Sun Sep 27 23:32:46 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Jul 9 12:47:08 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * class.c (rb_define_class, rb_define_class_id_under): refine
+ error messages.
- * io.c (appendline): use READ_CHAR_PENDING_XXX macros and
- RSTRING_END().
+ * class.c (rb_define_module, rb_define_module_id_under): ditto,
+ and make consistent with class.
- * io.c (rb_io_getline_1): rewrite nested if statement into one
- statement.
+Sun Sep 27 18:44:43 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Tue Jul 9 11:04:35 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * ChangeLog: removed duplicated message.
- * ext/{dl,fiddle}/win32/lib/win32/registry.rb (Win32::Registry#check):
- should report the position of the error.
+Sun Sep 27 15:46:58 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/{dl,fiddle}/win32/lib/win32/registry.rb
- (Win32::Registry#QueryValue): workaround for test-all crash.
+ * ruby.c (process_options): add an option to enable/disable
+ frozen-string-literal. [Feature #8976]
-Tue Jul 9 10:27:56 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * compile.c (iseq_compile_each): override compile option by option
+ given by pragma.
- * ext/{dl,fiddle}/win32/lib/win32/registry.rb
- (Win32::Registry.expand_environ): use suitable encoding for the
- string.
+ * iseq.c (rb_iseq_make_compile_option): extract a function to
+ overwrite rb_compile_option_t.
- * ext/{dl,fiddle}/win32/lib/win32/registry.rb (Win32::Registry#read):
- should return REG_SZ, REG_EXPAND_SZ and REG_MULTI_SZ values with
- the expected encoding -- assumed as the same encoding of name.
+ * parse.y (parser_set_compile_option_flag): introduce pragma to
+ override compile options.
-Tue Jul 9 10:02:45 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * parse.y (magic_comments): new pragma "frozen-string-literal".
+ [Feature #8976]
- * ext/{dl,fiddle}/win32/lib/win32/registry.rb
- (Win32::Registry::Error#initialize): use suitable encoding for the
- string.
+Sun Sep 27 08:16:35 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Jul 9 09:46:53 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * lib/ostruct.rb (delete_field): do not raise NameError for
+ existing keys. [Fix GH-1033]
- * ext/dl/win32/lib/win32/registry.rb (Win32::Registry.expand_environ):
- use suitable encoding for the string. fixed a test-all error of
- r41838.
+Sun Sep 27 00:34:31 2015 Zachary Scott <zzak@ruby-lang.org>
- * ext/fiddle/win32/lib/win32/registry.rb: same changes of r41838 and
- this revision of dl's win32/registry.rb.
+ * lib/ostruct.rb: Move method definitions for getter/setter to be lazy
+ Patch by @sferik in [GH-1033]: https://github.com/ruby/ruby/pull/1033
-Tue Jul 9 07:39:45 2013 Eric Hodel <drbrain@segment7.net>
+Fri Sep 25 10:07:25 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * lib/rubygems: Update to RubyGems 2.0.4. See
- https://github.com/rubygems/rubygems/blob/2.0/History.txt for changes
+ * lib/net/http.rb: removed unused variable. It's removed at r13648.
+ [fix GH-1022] Patch by @nkondratyev
-Tue Jul 9 01:47:16 2013 Tanaka Akira <akr@fsij.org>
+Fri Sep 25 09:48:27 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * bignum.c (biglsh_bang): Don't shift a BDIGIT with BITSPERDIG bits.
- (bigrsh_bang): Ditto.
+ * gems/bundled_gems: upgrade to minitest-5.8.1
-Tue Jul 9 01:17:57 2013 Tanaka Akira <akr@fsij.org>
+Fri Sep 25 09:47:12 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * bignum.c (bigrsh_bang): Fix bignum digits overrun.
+ * id_table.c: fix typo. [ci skip][fix GH-1031] Patch @davydovanton
-Tue Jul 9 00:46:22 2013 Tanaka Akira <akr@fsij.org>
+Fri Sep 25 07:54:05 2015 Rei Odaira <Rei.Odaira@gmail.com>
- * bignum.c (biglsh_bang): Fix bignum digits under-run.
+ * test/gdbm/test_gdbm.rb (TestGDBM#test_s_open_lock): skip
+ this test on AIX. The issue is the same as on Solaris.
+ [ruby-dev:47631]
-Mon Jul 8 23:36:45 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Sep 24 17:25:09 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/dl/win32/lib/win32/registry.rb (Error, API): use WCHAR
- interfaces. c.f. [Bug #8508]
+ * parse.y (paren_args): fix separator token at `foo::bar()` in
+ ripper.
-Mon Jul 8 23:13:11 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Sep 24 00:00:17 2015 Rei Odaira <Rei.Odaira@gmail.com>
- * win32/win32.c (rb_w32_pow): move from win32.h and disable strict
- ANSI mode macro to let _controlfp() stuff defined.
- [ruby-core:55312] [Bug #8495]
+ * complex.c: ruby/config.h must be included before math.h
+ because it defines _LARGE_FILES on AIX and _LARGE_FILES
+ must be defined before sys/types.h is included from math.h.
+ [Bug #11483]
- * numeric.c (finite): add declaration for strict ANSI.
- [ruby-core:55312] [Bug #8495]
+Wed Sep 23 22:22:38 2015 Zachary Scott <zzak@ruby-lang.org>
- * thread_win32.c (w32_thread_start_func, thread_start_func_1),
- (timer_thread_func): use __stdcall instead of _stdcall which is
- unavailable in strict ANSI mode. [ruby-core:55312] [Bug #8495]
+ * ext/openssl/ossl_pkcs12*: Remove svn commit id macro
- * win32/win32.c (gettimeofday): use __cdecl instead of _cdecl.
+Wed Sep 23 01:11:28 2015 Zachary Scott <zzak@ruby-lang.org>
-Mon Jul 8 22:41:12 2013 Tanaka Akira <akr@fsij.org>
+ * ext/openssl/*: Remove svn commit id macros to make sync easier
- * bignum.c (bary_mul): Arguments for work memory added.
- (bary_mul_balance): Ditto.
- (bary_mul_karatsuba): Ditto.
+Tue Sep 22 04:20:01 2015 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
-Mon Jul 8 22:03:30 2013 Tanaka Akira <akr@fsij.org>
+ * test/drb/test_drb.rb: Run Rinda/DRb tests on localhost. [Fix GH-1027]
+ patch by voxik.
- * bignum.c (rb_big_sq_fast): New function for testing.
- (rb_big_mul_toom3): Ditto.
+ * test/rinda/test_rinda.rb: ditto
- * internal.h (rb_big_sq_fast): Declared.
- (rb_big_mul_toom3): Ditto.
+Mon Sep 21 20:53:39 2015 tbpgr <tbpgr@tbpgr.jp>
-Mon Jul 8 21:59:34 2013 Tanaka Akira <akr@fsij.org>
+ * test/win32ole/test_win32ole_event.rb: fix typo.
+ swbemsink_avairable? => swbemsink_available? [Fix GH-1025]
- * bignum.c (bary_mul_balance): Initialize a local variable to suppress
- a warning.
+Sun Sep 20 10:07:35 2015 Anton Davydov <antondavydov.o@gmail.com>
-Mon Jul 8 20:55:22 2013 Tanaka Akira <akr@fsij.org>
+ * cont.c (rb_callcc): [DOC] append continuations example accros
+ methods. [Fix GH-1026]
- * bignum.c (bary_mul_balance): Reduce work memory.
+Sun Sep 20 03:20:21 2015 Koichi Sasada <ko1@atdot.net>
-Mon Jul 8 08:26:15 2013 Martin Bosslet <Martin.Bosslet@gmail.com>
+ * iseq.c (rb_iseq_free): free rb_iseq_t::body::cc_entries.
- * test/openssl/test_pkey_ec.rb: Skip tests for "Oakley" curves as
- they are not suitable for ECDSA.
- [ruby-core:54881] [Bug #8384]
+Sun Sep 20 02:46:34 2015 Koichi Sasada <ko1@atdot.net>
-Mon Jul 8 08:03:01 2013 Tanaka Akira <akr@fsij.org>
+ * vm_core.h: split rb_call_info_t into several structs.
+ * rb_call_info (ci) has compiled fixed information.
+ * if ci->flag & VM_CALL_KWARG, then rb_call_info is
+ also rb_call_info_with_kwarg. This technique reduce one word
+ for major rb_call_info data.
+ * rb_calling_info has temporary data (argc, blockptr, recv).
+ for each method dispatch. This data is allocated only on
+ machine stack.
+ * rb_call_cache is for inline method cache.
- * bignum.c (bary_mul): Add a RB_GC_GUARD.
+ Before this patch, only rb_call_info_t data is passed.
+ After this patch, above three structs are passed.
-Sun Jul 7 23:56:32 2013 Tanaka Akira <akr@fsij.org>
+ This patch improves:
+ * data locality (rb_call_info is now read-only data).
+ * reduce memory consumption (rb_call_info_with_kwarg,
+ rb_calling_info).
- * bignum.c (bary_mul_karatsuba): Unreachable code removed. Remove
- several branches.
+ * compile.c: use above data.
-Sun Jul 7 22:59:06 2013 Tanaka Akira <akr@fsij.org>
+ * insns.def: ditto.
- * internal.h (rb_big_mul_normal): Declared.
- (rb_big_mul_balance): Ditto.
- (rb_big_mul_karatsuba): Ditto.
+ * iseq.c: ditto.
- * bignum.c (rb_big_mul_normal): New function for tests.
- (rb_big_mul_balance): Ditto.
- (rb_big_mul_karatsuba): Ditto.
+ * vm_args.c: ditto.
-Sun Jul 7 19:21:30 2013 Tanaka Akira <akr@fsij.org>
+ * vm_eval.c: ditto.
- * bignum.c: Reorder functions to decrease forward reference.
+ * vm_insnhelper.c: ditto.
-Sun Jul 7 14:41:57 2013 Tanaka Akira <akr@fsij.org>
+ * vm_insnhelper.h: ditto.
- * bignum.c: (bigsub_core): Use bary_sub.
- (bary_sub): Returns a borrow flag. Use bary_subb.
- (bary_subb): New function for actually calculating subtraction with
- borrow.
- (bary_sub_one): New function.
- (bigadd_core): Use bary_add.
- (bary_add): Returns a carry flag. Use bary_addc.
- (bary_addc): New function for actually calculating addition with
- carry.
- (bary_add_one): New function.
- (bary_muladd_1xN): Extracted from bary_mul_normal.
- (bigmul1_normal): Removed.
- (bary_mul_karatsuba): New function.
- (bary_mul1): Invoke rb_thread_check_ints after bary_mul_normal.
- (bary_mul): Remove most and least significant zeros before actual
- multiplication. Use bary_sq_fast, bary_mul_balance,
- bary_mul_karatsuba and bigmul1_toom3 as bigmul0.
- (bigmul1_balance): Removed.
- (bigmul1_karatsuba): Removed.
- (bigsqr_fast): Removed.
- (bary_sparse_p): Extracted from big_sparse_p.
- (big_sparse_p): Removed.
- (bigmul0): Use bary_mul.
+ * iseq.h: add iseq_compile_data::ci_index and
+ iseq_compile_data::ci_kw_index.
-Sun Jul 7 11:54:33 2013 Kouhei Sutou <kou@cozmixng.org>
+ * tool/instruction.rb: introduce TS_CALLCACHE operand type.
- * NEWS: Add REXML::Text#<< related updates.
+Sun Sep 20 02:18:10 2015 Tanaka Akira <akr@fsij.org>
-Sun Jul 7 11:49:19 2013 Kouhei Sutou <kou@cozmixng.org>
+ * test/lib/envutil.rb: mkfifo command based File.mkfifo method
+ definition removed.
- * lib/rexml/text.rb (REXML::Text#<<): Support appending in not
- "raw" mode. [Bug #8602] [ruby-dev:47482]
- Reported by Ippei Obayashi. Thanks!!!
+Fri Sep 18 20:11:11 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun Jul 7 11:43:13 2013 Kouhei Sutou <kou@cozmixng.org>
+ * file.c (rb_file_s_mkfifo): implement File.mkfifo.
+ [Feature #11536]
- * lib/rexml/text.rb (REXML::Text#<<): Support method chain use by "<<"
- like other objects.
+Fri Sep 18 16:56:19 2015 Shugo Maeda <shugo@ruby-lang.org>
-Sun Jul 7 11:34:18 2013 Kouhei Sutou <kou@cozmixng.org>
+ * NEWS: add Net::FTP#mlst and Net::FTP#mlsd.
- * lib/rexml/text.rb (REXML::Text#clear_cache): Extract common
- cache clear code.
+Fri Sep 18 07:39:22 2015 Aaron Patterson <tenderlove@ruby-lang.org>
-Sun Jul 7 11:01:03 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/objspace/objspace_dump.c (obj_type): add IMEMO types to the heap
+ dump information.
- * configure.in (RUBY_DTRACE_POSTPROCESS): dtrace version SUN D 1.11
- introduces a check in the dtrace compiler to ensure that probes
- actually exist. If there are no probes, then the -G step will
- fail. As this test is only being used to determine whether -G is
- necessary (for instance, on OSX it is not), adding a real probe to
- the conftest allows it to succeed on newer versions of dtrace.
- Patch by Eric Saxby <sax AT livinginthepast.org> at
- [ruby-core:55826]. [Fixes GH-351], [Bug #8606].
+Thu Sep 17 22:33:07 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Sun Jul 7 10:07:22 2013 Tanaka Akira <akr@fsij.org>
+ * common.mk: fix command error with outside builddir.
- * bignum.c (bary_sq_fast): Extracted from bigsqr_fast and
- ensure not to access zds[2*xn].
- (bigsqr_fast): Allocate the result bignum with 2*xn words.
+Thu Sep 17 17:42:09 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Sat Jul 6 07:37:43 2013 Martin Bosslet <Martin.Bosslet@gmail.com>
+ * common.mk: separated test for test-framework from test-all task.
+ They should be invoke at first before tests of test-all.
- * ext/openssl/ossl_pkey_ec.c: Ensure compatibility to builds of
- OpenSSL with OPENSSL_NO_EC2M defined, but OPENSSL_NO_EC not
- defined.
- * test/openssl/test_pkey_ec.rb: Iterate over built-in curves
- (and assert their non-emptiness!) instead of hard-coding them, as
- this may cause problems with respect to the different availability
- of individual curves in individual OpenSSL builds.
- [ruby-core:54881] [Bug #8384]
+Thu Sep 17 12:05:54 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- Thanks to Vit Ondruch for providing the patch!
+ * test/ruby/test_dir.rb (TestDir#test_fileno): s/?x/"x"/. Don't
+ use tricky code, please.
-Sat Jul 6 07:12:39 2013 Martin Bosslet <Martin.Bosslet@gmail.com>
+Wed Sep 16 20:49:56 2015 Masaki Suketa <masaki.suketa@nifty.ne.jp>
- * test/openssl/test_x509crl.rb: Remove unused variable.
- [ruby-core:53501] [Bug #8114]
+ * encindex.h: fix typo of last #endif comment. [ci skip]
- Thanks, Vipul Amler, for pointing this out!
+Wed Sep 16 20:39:26 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Jul 6 06:37:10 2013 Martin Bosslet <Martin.Bosslet@gmail.com>
+ * variable.c (set_const_visibility): fail if the class/module is
+ frozen. [ruby-core:70828] [Bug #11532]
- * ext/openssl/ossl.c: Provide CRYPTO_set_locking_callback() and
- CRYPTO_set_id_callback() callback functions ossl_thread_id and
- ossl_lock_callback to ensure the OpenSSL extension is usable in
- multi-threaded environments.
- [ruby-core:54900] [Bug #8386]
+Wed Sep 16 17:16:43 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- Thanks, Dirkjan Bussink, for the patch!
+ * vm_core.h (ENABLE_VM_OBJSPACE): enable per-VM object space on
+ Windows by default, as rb_w32_sysinit() no longer depends on
+ ruby_xmalloc.
-Sat Jul 6 06:06:16 2013 Martin Bosslet <Martin.Bosslet@gmail.com>
+Wed Sep 16 15:08:17 2015 Akinori MUSHA <knu@iDaemons.org>
- * lib/openssl/ssl.rb: Fix SSL client connection crash for SAN marked
- critical.
- The patch for CVE-2013-4073 caused SSL crash when a SSL server returns
- the certificate that has critical SAN value. X509 extension could
- include 2 or 3 elements in it:
+ * doc/syntax/literals.rdoc (Strings): [DOC] Revise the character
+ literal part.
- [id, criticality, octet_string] if critical,
- [id, octet_string] if not.
+Wed Sep 16 14:55:33 2015 Akinori MUSHA <knu@iDaemons.org>
- Making sure to pick the last element of X509 extension and use it as
- SAN value.
- [ruby-core:55685] [Bug #8575]
+ * doc/syntax/literals.rdoc (Strings): [DOC] Document the full list
+ of supported escape sequences in string literals.
- Thank you @nahi for providing the patch!
+Wed Sep 16 14:49:58 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Jul 6 04:49:38 2013 Aaron Patterson <aaron@tenderlovemaking.com>
+ * string.c (rb_str_setbyte): keep the code range as possible.
- * ext/psych/lib/psych/visitors/yaml_tree.rb: register time objects so
- they are referenced as ids during output.
- * test/psych/test_date_time.rb: corresponding test.
+Wed Sep 16 13:23:48 2015 NAKAMURA Usaku <usa@ruby-lang.org>
-Fri Jul 5 20:46:39 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * doc/syntax/literals.rdoc (Strings): mention about ?a literal.
- * test/ruby/test_unicode_escape.rb (TestUnicodeEscape#test_basic): this
- assertion doesn't seems to be checking the unicode string on command
- line, but seems to be checking how to treat the unicode string from
- stdin. so, should escape '\' before 'u'. this fixes a test failure
- on Windows.
+Wed Sep 16 12:06:53 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Fri Jul 5 19:05:40 2013 Akinori MUSHA <knu@iDaemons.org>
+ * dir.c (glob_helper): check pathtype once again by lstat(2) if
+ dp->d_type is DT_UNKNOWN. XFS may return DT_UNKNOWN.
- * lib/fileutils.rb (FileUtils#chown, FileUtils#chown_R): Fix the
- wrong output message when user is nil, which should be "chown
- :group file" instead of "chown group file".
+Wed Sep 16 03:49:19 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Fri Jul 5 16:21:56 2013 Akinori MUSHA <knu@iDaemons.org>
+ * test/ruby/test_thread.rb (TestThread#test_mutex_synchronize):
+ insert waste loop for invoking preemptive thread context switch.
+ [Bug #11496]
- * test/ruby/test_regexp.rb
- (TestRegexp#test_options_in_look_behind)
- (TestRegexp#assert_match_at): Add tests for another problem
- fixed in Onigmo 5.13.5. Previously Onigmo did not allow option
- enclosures in look-behind, which makes it impossible to
- interpolate a regexp into another in the middle of a look-behind
- pattern. cf. https://github.com/k-takata/Onigmo/pull/17
+Tue Sep 15 19:38:55 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/ruby/test_regexp.rb
- (TestRegexp#test_options_in_look_behind)
- (TestRegexp#assert_match_at): Parse regexps in run time rather
- than in compile time.
+ * gc.c (rb_objspace_alloc, rb_objspace_free): define always
+ regardless ENABLE_VM_OBJSPACE, and free heap pages.
-Fri Jul 5 12:14:40 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+Tue Sep 15 15:15:41 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/ruby/test_rubyoptions.rb (TestRubyOptions#test_notfound): after
- r41710, the path of command uses backslash as the separator on
- Windows.
+ * win32/win32.c (rb_w32_sysinit, rb_w32_readdir): compare by
+ encoding index to get rid of encoding initialization before VM
+ object space allocation.
-Fri Jul 5 11:29:47 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * dir.c (fundamental_encoding_p, push_glob): compare by encoding
+ index immediately.
- * lib/test/unit/assertions.rb (assert_raise_with_message): move from
- test/fileutils/test_fileutils.rb. this is still experimental and
- the interface may be changed.
+ * enc/{ascii,us_ascii,utf_8}.c: set encoding indexes of
+ fundamental built-in encodings so that usable as well as
+ allocated rb_encoding before rb_enc_init().
-Fri Jul 5 11:08:00 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * encindex.h: separate encoding index constants from internal.h.
- * win32/win32.c (w32_spawn): r41710 made that if the command starts with
- a quote and includes slash, removed the top quote and NOT removed the
- last quote.
- this fixes test failures on test/ruby/test_process.rb and
- test/webrick.
+Tue Sep 15 13:13:13 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Jul 5 09:53:15 2013 NARUSE, Yui <naruse@ruby-lang.org>
- * lib/mkmf.rb (CONFIG['CPPOUTFILE']): fix r41769; CONFIG['CPPOUTFILE']
- may be nil.
+ * array.c (rb_ary_sort_bang, rb_ary_sort): [DOC] correct block
+ return values, which may be a negative or positive integer, not
+ only -1 or +1.
-Fri Jul 5 05:39:53 2013 Tanaka Akira <akr@fsij.org>
+Tue Sep 15 12:49:10 2015 Jason Barnabe <jason.barnabe@gmail.com>
- * bignum.c (BARY_MUL1): Renamed from BARY_MUL.
- (bary_mul1): Renamed from bary_mul.
- (bary_mul): Renamed from bary_mul2.
+ * array.c (rb_ary_sort_bang, rb_ary_sort): [DOC] Correct
+ description of array sort block return values. And also fix up
+ the grammar a bit. [Fix GH-1020]
-Fri Jul 5 04:58:05 2013 Tanaka Akira <akr@fsij.org>
+Tue Sep 15 12:44:32 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * bignum.c (bary_mul_balance): Extracted from bigmul1_balance and
- use bary_mul2 and bary_add to decrease allocations.
+ * util.c (ruby_qsort): use BSD-style qsort_r if available.
-Fri Jul 5 02:14:00 2013 Akinori MUSHA <knu@iDaemons.org>
+Mon Sep 14 19:26:34 2015 Shugo Maeda <shugo@ruby-lang.org>
- * lib/fileutils.rb (FileUtils#symbolic_modes_to_i): Fix the wrong
- character class [+-=], which happened to match all desired
- characters but also match undesired characters.
+ * lib/net/ftp.rb (parse_mlsx_entry): parse pathnames including
+ space correctly.
- * lib/fileutils.rb (FileUtils.chmod{,_R}): Enhance the symbolic
- mode parser to support the permission symbols u/g/o and multiple
- actions as defined in SUS, so that chmod("g=o+w", file) works as
- expected. Invalid symbolic modes are now rejected with
- ArgumentError.
+Mon Sep 14 11:12:10 2015 Anton Davydov <antondavydov.o@gmail.com>
-Fri Jul 5 00:25:39 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * lib/racc/rdoc/grammar.en.rdoc: [DOC] fix typo, "convertion" to
+ "conversion". [Fix GH-1016]
- * lib/mkmf.rb (have_framework): allow header file to check.
- [ruby-core:55745] [Bug #8593]
+Sun Sep 13 11:03:13 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Jul 4 22:31:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ * include/ruby/ruby.h: prefix RUBY or RB to global symbols to get
+ rid of name conflicts with other headers.
- * object.c (rb_obj_equal): Fixed an rb_obj_equal documentation typo
- where "a" was used instead of "obj".
- Fixes GH-349. Patch by @adnandoric
+ * include/ruby/encoding.h, include/ruby/intern.h: ditto.
-Thu Jul 4 20:39:20 2013 Tanaka Akira <akr@fsij.org>
+Sun Sep 13 09:38:51 2015 Shugo Maeda <shugo@ruby-lang.org>
- * tool/make-snapshot: Exit with EXIT_FAILURE when it fails.
+ * lib/net/ftp.rb (size, modify, create, type, unique, perm, lang,
+ media_type, charset): new methods to return standard facts.
-Thu Jul 4 20:20:23 2013 Tanaka Akira <akr@fsij.org>
+Sat Sep 12 19:43:49 2015 Koichi Sasada <ko1@atdot.net>
- * bignum.c (maxpow_in_bdigit_dbl): Use tables if available.
- (maxpow_in_bdigit): Ditto.
- (U16): New macro.
- (U32): Ditto.
- (U64): Ditto.
- (U128): Ditto.
- (maxpow16_exp): New table.
- (maxpow16_num): New table.
- (maxpow32_exp): New table.
- (maxpow32_num): New table.
- (maxpow64_exp): New table.
- (maxpow64_num): New table.
- (maxpow128_exp): New table.
- (maxpow128_num): New table.
+ * vm_insnhelper.c (vm_call_iseq_setup_normal): do not clear local
+ variables here. vm_push_frame() clears.
-Thu Jul 4 18:25:25 2013 Tanaka Akira <akr@fsij.org>
+ * vm_insnhelper.c (vm_call_iseq_setup_tailcall): ditto.
- * bignum.c (rb_cstr_to_inum): Avoid temporary buffer allocation except
- very big base non-power-of-2 numbers.
+ * vm_insnhelper.c (vm_push_frame): move check code to
+ vm_check_frame().
-Thu Jul 4 15:51:56 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ Reorder initialization timing to reuse same values (sp).
- * string.c (rb_str_succ): use ONIGENC_MBCLEN_CHARFOUND_P correctly.
+ * compile.c (rb_iseq_compile_node): use
+ iseq_set_exception_local_table() for ISEQ_TYPE_DEFINED_GUARD.
- * string.c (rb_str_dump): ditto.
+Sat Sep 12 23:06:51 2015 Shugo Maeda <shugo@ruby-lang.org>
-Thu Jul 4 10:04:11 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * lib/net/ftp.rb (file?, directory?, appendable?, creatable?,
+ deletable?, enterable?, renamable?, listable?, directory_makable?,
+ purgeable?, readable?, writable?): new methods.
- * regcomp.c (): Merge Onigmo 5.13.5 23b523076d6f1161.
+Sat Sep 12 21:27:22 2015 Shugo Maeda <shugo@ruby-lang.org>
- * [bug] (thanks Akinori MUSHA and Ippei Obayashi)
- Fix a renumbering bug in condition regexp with a named
- capture. [Bug #8583]
- * [spec] (thanks Akinori MUSHA)
- Allow ENCLOSE_OPTION in look-behind.
+ * lib/net/ftp.rb (FACT_PARSERS): support system dependent facts
+ UNIX.mode, UNIX.owner, UNIX.group, UNIX.ctime, and UNIX.atime.
-Thu Jul 4 00:36:03 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Sep 12 19:08:58 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * internal.h (SIGNED_INTEGER_MAX): suppress warning C4146 on VC6.
- seems a logical ORed expression becomes unsigned.
+ * win32/win32.c (rb_w32_dup2): should return the new fd on
+ success, while msvcrt returns 0 wrongly.
-Thu Jul 4 00:13:01 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Sep 12 18:14:11 2015 Shugo Maeda <shugo@ruby-lang.org>
- * ruby_atomic.h (rb_w32_atomic_cas): call InterlockedCompareExchange
- directly.
+ * lib/net/ftp.rb (parse_mlsx_entry, mlst) raise an FTPProtoError
+ when parsing failed.
- * ruby_atomic.h (ATOMIC_CAS): fix missing function call.
+Sat Sep 12 18:00:35 2015 Shugo Maeda <shugo@ruby-lang.org>
-Wed Jul 3 23:47:35 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * lib/net/ftp.rb (TIME_PARSER): use "Z" instead of "+00:00" to
+ get UTC time. Thanks, Wilson Bilkovich.
- * ruby_atomic.h (ATOMIC_CAS): suppress C4022 and C4047 warnings in
- VC6. only InterlockedCompareExchange is declared using PVOID.
+Sat Sep 12 17:55:24 2015 Shugo Maeda <shugo@ruby-lang.org>
-Wed Jul 3 22:29:20 2013 Tanaka Akira <akr@fsij.org>
+ * lib/net/ftp.rb (mlst, mlsd): support new commands MLST and MLSD
+ specified in RFC 3659.
- * internal.h (ruby_digit36_to_number_table): Declared.
+Sat Sep 12 16:14:31 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * util.c (ruby_digit36_to_number_table): Moved from scan_digits.
+ * file.c: access()/eaccess() wrapping methods check more than just uid.
+ [fix GH-1007][ci skip] Patch by @eam
- * bignum.c (conv_digit): Use ruby_digit36_to_number_table.
+Sat Sep 12 16:07:01 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * pack.c (hex2num): Ditto.
+ * README.md: improve markdown rendering for readability.
+ [fix GH-1015][ci skip] Patch by @Matrixbirds
-Wed Jul 3 18:12:56 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Sep 12 14:30:03 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/mkmf.rb (install_dirs): revert DESTDIR prefix by r39841, since
- it is fixed by r41648. [ruby-core:55760] [Bug #8115]
+ * process.c (save_redirect_fd): make saved FDs close-on-exec not
+ to be inherited.
-Wed Jul 3 14:15:25 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * process.c (run_exec_dup2): restore close-on-exec flags too.
- * dir.c (do_stat): use rb_w32_ustati64() in win32.c to get rid of
- mysterious behavior of FindFirstFile() Windows API which treat "<"
- and ">" like as wildcard characters. [ruby-core:55764] [Bug #8597]
+ * win32/win32.c (fcntl): implement F_GETFD, F_SETFD, and
+ F_DUPFD_CLOEXEC.
-Wed Jul 3 12:06:42 2013 Tanaka Akira <akr@fsij.org>
+Sat Sep 12 05:35:24 2015 Eric Wong <e@80x24.org>
- * bignum.c (maxpow_in_bdigit): Renamed from calc_hbase and return
- maxpow.
+ * rational.c (string_to_r_strict): preserve encoding in exception
-Tue Jul 2 23:47:50 2013 Tanaka Akira <akr@fsij.org>
+Fri Sep 11 20:23:35 2015 Koichi Sasada <ko1@atdot.net>
- * bignum.c (roomof): Cast to long.
- (rb_ull2big): Fix bignew arguments.
+ * vm_core.h: remove rb_call_info_t::aux.opt_pc.
-Tue Jul 2 21:17:37 2013 Tanaka Akira <akr@fsij.org>
+ * vm_insnhelper.c: introduce shortcut functions for opt_pc == 0
+ because opt_pc is always 0 on shortcut function.
- * bignum.c (rb_cstr_to_inum): Merge two temporary buffers.
+Fri Sep 11 17:49:36 2015 Koichi Sasada <ko1@atdot.net>
-Tue Jul 2 20:25:04 2013 Tanaka Akira <akr@fsij.org>
+ * iseq.c: disable ISeq.load. It enabled accidentally at r51794.
- * bignum.c (rb_cstr_to_inum): Use BDIGIT_DBL to collect adjacent digits.
- (BDIGIT_DBL_MAX): New macro.
- (maxpow_in_bdigit_dbl): New function.
+Fri Sep 11 11:15:12 2015 Shugo Maeda <shugo@ruby-lang.org>
-Tue Jul 2 17:23:33 2013 Shugo Maeda <shugo@ruby-lang.org>
+ * lib/net/ftp.rb (size, mdtm, system): parse responses according to
+ RFC 959 and 3659, where reply codes must be followed by SP.
- * doc/syntax/refinements.rdoc: add description of Module#using and
- refinement inheritance by module inclusion.
+ * lib/net/ftp.rb (system): remove LF from the return value.
-Tue Jul 2 17:22:44 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Sep 10 22:48:49 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * internal.h: add EUC-JP and Windows-31J.
+ * parse.y (literal_concat_gen, evstr2dstr_gen): keep literal
+ encoding beginning with an interpolation same as the source file
+ encoding. [ruby-core:70703] [Bug #11519]
- * re.c (rb_char_to_option_kcode): use built-in encoding indexes in
- internal.h.
+Thu Sep 10 22:15:51 2015 Joe Rafaniello <jrafanie@redhat.com>
- * internal.h: add UTF8-MAC.
+ * process.c (rb_f_spawn): Be more specific regarding "other
+ values" by having "non-zero positive integers" Add nil, the
+ default value, as a possible value and what it means.
- * dir.c (rb_utf8mac_encoding): use built-in encoding indexes in
- internal.h.
+ Try to use more consistent language.
+ [Fix GH-1008]
- * internal.h: add UTF-{16,32} dummy encodings.
+Thu Sep 10 15:16:02 2015 Shugo Maeda <shugo@ruby-lang.org>
- * string.c (rb_str_inspect, str_scrub0): use built-in encoding indexes
- in internal.h.
+ * lib/net/ftp.rb (getmultiline): refactor.
- * internal.h: add UTF-{16,32}{BE,LE}.
+Thu Sep 10 12:17:28 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * io.c (io_strip_bom): use built-in encoding indexes in internal.h.
+ * compile.c (iseq_build_from_ary_body): register cdhash to the
+ iseq constant body instead of compile time mark array, not to
+ get GCed. [ruby-core:70708] [Feature #8543]
- * internal.h (rb_{ascii8bit,utf8,usascii}_encindex): use built-in
- encoding indexes for optimization.
+Wed Sep 9 18:16:14 2015 NAKAMURA Usaku <usa@ruby-lang.org>
- * encoding.c (enc_inspect, rb_locale_encindex),
- (enc_set_filesystem_encoding, rb_filesystem_encindex): use built-in
- encoding indexes directly.
+ * lib/rubygems/stub_specification.rb (Gem::StubSpecification#data):
+ should not change the value of $. when `require`ing gems.
+ this fixed test failures introduced by r51813.
- * encoding.c (rb_enc_set_index, rb_enc_associate_index): validate
- argument encoding index.
+Wed Sep 9 16:55:45 2015 NAKAMURA Usaku <usa@ruby-lang.org>
- * include/ruby/encoding.h (ENCODING_SET): use rb_enc_set_index()
- instead of setting inlined bits directly.
+ * ruby.c (usage, enable_option, disable_option, process_options): new
+ option `--disable-did_you_mean`.
- * encoding.c (rb_enc_init): register preserved indexes.
+ * gem_prelude.rb: now requires did_you_mean gem by default if available.
- * internal.h (ruby_preserved_encindex): move from encoding.c.
+Wed Sep 9 13:38:56 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Jul 2 11:14:36 2013 Shota Fukumori <sorah@cookpad.com>
+ * tool/extlibs.rb (do_patch): let "patch" command change the
+ working directory and open the patch file there, instead of
+ spawn options, so that proper error message will be shown by the
+ command not just "chdir" or "open".
- * lib/mkmf.rb (try_config): Fix to not replace $LDFLAGS with $libs
- (1.9.3 behavior) [ruby-core:55752] [Bug #8595]
+Wed Sep 9 11:33:05 2015 NAKAMURA Usaku <usa@ruby-lang.org>
-Tue Jul 2 00:39:59 2013 Tanaka Akira <akr@fsij.org>
+ * common.mk (update-gems): use BASERUBY instead of RUNRUBY.
- * ext/socket/ipsocket.c (init_inetsock_internal): Don't try mismatched
- address family if already failed.
+Wed Sep 9 11:08:59 2015 Zachary Scott <zzak@ruby-lang.org>
-Mon Jul 1 23:07:38 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * lib/delegate.rb: Remove backtrace cleaning for delegated methods
+ This patch was provided by Rafael Franca and greatly improves
+ performance when an exception is raised. [Bug #11461]
- * template/encdb.h.tmpl: define encoding index macros to use the index
- statically from C source.
+Wed Sep 9 10:05:41 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Mon Jul 1 22:57:19 2013 Tanaka Akira <akr@fsij.org>
+ * test/rubygems/test_config.rb: fix broken tests for Windows platform.
- * bignum.c (bary_mul2): New function.
- (rb_cstr_to_inum): Use a better algorithm to compose the result
- if input length is very long.
+Wed Sep 9 07:46:32 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Mon Jul 1 20:22:00 2013 Kenta Murata <mrkn@cookpad.com>
+ * lib/rubygems: Update to RubyGems HEAD(fe61e4c112).
+ this version contains new feature that warn invalid SPDX license
+ identifiers. https://github.com/rubygems/rubygems/pull/1249
+ and #1032, #1023, #1332, #1328, #1306, #1321, #1324
+ * test/rubygems: ditto.
- * ext/bigdecimal/bigdecimal.h (RB_UNUSED_VAR, UNREACHABLE):
- import macros from ruby.h for 1.9.3.
- [Bug #8588] [ruby-core:55730]
+Tue Sep 8 23:17:36 2015 Yuki Nishijima <mail@yukinishijima.net>
- * ext/bigdecimal/bigdecimal.gemspec: Bump version to 1.2.1.
+ * gems/bundled_gems: Upgrade the did_you_mean gem to 1.0.0.beta2.
-Mon Jul 1 20:03:39 2013 Tanaka Akira <akr@fsij.org>
+Tue Sep 8 23:09:28 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/socket/ipsocket.c (init_inetsock_internal): Use an address
- family for local address which is different to the remote
- address if no other choice.
+ * io.c (rb_io_s_popen): do not wait the child process during being
+ killed. [ruby-core:70671] [Bug #11510]
-Mon Jul 1 15:05:00 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Sep 8 22:18:04 2015 NAKAMURA Usaku <usa@ruby-lang.org>
- * lib/csv.rb (CSV#<<): use StringIO#set_encoding instead of creating
- new StringIO instance with String#force_encoding, forcing encoding
- discards the cached coderange bits and can make further operations
- very slow. [ruby-core:55714] [Bug #8585]
+ * gems/bundled_gems: revert because ruby trunk never be able to install
+ the did_you_mean gem. retry after enough test.
- * ext/stringio/stringio.c (strio_write): keep coderange of
- ptr->string.
+Tue Sep 8 21:48:22 2015 Yuki Nishijima <mail@yukinishijima.net>
- * string.c (rb_enc_cr_str_buf_cat, rb_str_append): consider an empty
- string 7bit-clean and should not discard cached coderange of string
- to be appended.
+ * gems/bundled_gems: Automatically install the did_you_mean gem
+ as a bundled gem. [Feature #11252]
-Mon Jul 1 12:56:41 2013 Shugo Maeda <shugo@ruby-lang.org>
+Tue Sep 8 17:17:48 2015 Koichi Sasada <ko1@atdot.net>
- * eval.c (rb_using_module): activate refinements in the ancestors of
- the argument module to support refinement inheritance by
- Module#include. [ruby-core:55671] [Feature #8571]
+ * vm_core.h: remove rb_call_info_t::blockiseq.
- * test/ruby/test_refinement.rb: related test.
+ * insns.def (send, invokesuper): pass blockiseq explicitly.
-Mon Jul 1 12:02:39 2013 Tanaka Akira <akr@fsij.org>
+ * compile.c: catch up this fix.
- * bignum.c (rb_cstr_to_inum): Skip leading zeros.
+ * iseq.c: ditto.
-Mon Jul 1 00:59:23 2013 Tanaka Akira <akr@fsij.org>
+ * vm_args.c: ditto.
- * bignum.c (nlz16): New function.
- (nlz32): Ditto.
- (nlz64): Ditto.
- (nlz128): Ditto.
- (nlz): Redefined using an above function.
- (bitsize): New macro.
- (rb_cstr_to_inum): Use bitsize instead of nlz.
+ * iseq.c (ISEQ_MINOR_VERSION): 2->3 because instruction spec was
+ changed.
-Sun Jun 30 22:40:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+Tue Sep 8 15:01:19 2015 Shugo Maeda <shugo@ruby-lang.org>
- * lib/prime.rb: Corrected a few comments. Patch by @Nullset14.
- Fixes GH-346.
+ * lib/net/ftp.rb (list): fetch all the lines before yielding a block
+ to allow other commands in the block. [Feature #11454]
+ Patched by Srikanth Shreenivas.
-Sun Jun 30 21:53:38 2013 Tanaka Akira <akr@fsij.org>
+Tue Sep 8 12:05:00 2015 NAKAMURA Usaku <usa@ruby-lang.org>
- * bignum.c (rb_cstr_to_inum): Use rb_integer_unpack if base is a power
- of 2.
+ * win32/win32.c (rb_w32_read_reparse_point): return correct required
+ buffer size for IO_REPARSE_TAG_MOUNT_POINT.
-Sun Jun 30 10:59:23 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Sep 8 00:14:43 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * win32/win32.c (join_argv): use backslash instead of slash in program
- path, otherwise cannot invoke "./c\u{1ee7}a.exe" for some reason.
- [ruby-core:24309] [Bug #1771]
+ * process.c (rb_execarg_parent_start1): raise with the target path
+ name when open() failed.
- * io.c (spawnv, spawn): use UTF-8 spawn family. [Bug #1771]
+Mon Sep 7 23:45:28 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * process.c (proc_exec_sh, proc_spawn_cmd, proc_spawn_sh): ditto.
+ * process.c (rb_exec_fail): raise with the target directory name
+ when chdir() failed. pointed out by sorah.
- * win32/win32.c (translate_char, join_argv, has_redirection): make
- codepage aware.
+Mon Sep 7 22:05:28 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * win32/win32.c (rb_w32_udln_find_exe_r, rb_w32_udln_find_file_r):
- codepage independent versions.
+ * win32/win32.c (insert): should use plain strdup() instead of
+ ruby_strdup() at startup time, and plain free()ed in cmdglob().
- * win32/win32.c (w32_spawn): extract codepage aware code from
- rb_w32_spawn().
+Mon Sep 7 16:49:30 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * win32/win32.c (rb_w32_uspawn): add UTF-8 version function.
+ * vm_core.h (rb_vm_struct): define objspace always regardless
+ ENABLE_VM_OBJSPACE.
- * win32/win32.c (w32_aspawn_flags): extract codepage aware code from
- rb_w32_aspawn_flags().
+Mon Sep 7 15:54:58 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * win32/win32.c (rb_w32_uaspawn_flags, rb_w32_uaspawn_flags): add
- UTF-8 version functions.
+ * ruby_atomic.h (ATOMIC_VALUE_CAS): fix typo.
+ TODO: make arguments of all CAS macros consistent.
- * win32/win32.c (w32_getenv): extract codepage aware code from
- rb_w32_ugetenv() and rb_w32_getenv().
+Sun Sep 6 16:07:22 2015 Eric Wong <e@80x24.org>
- * win32/win32.c (w32_stati64): extract codepage aware code from
- rb_w32_ustati64() and rb_w32_stati64().
+ * ccan/list/list.h: suppress unused argument warnings
+ [ccan commit 6aaca17e07588997417a73fac19dcf0ff17ed81b]
- * dln.h (DLN_FIND_EXTRA_ARG, DLN_FIND_EXTRA_ARG_DECL): allow extra
- arguments to dln_find_{exe,file}_r().
+Sat Sep 5 11:39:52 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * dln_find.c (dln_find_exe_r, dln_find_file_r): add extract arguments.
+ * lib/rss/rss.rb (Time#w3cdtf): fix zero-trimmed width of fraction
+ digits. [ruby-core:70667] [Bug #11509]
- * process.c (EXPORT_STR, EXPORT_DUP): convert to default process
- encoding if defined.
+Sat Sep 5 08:28:58 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * process.c (check_exec_env_i): convert environment variables too.
+ * hash.c (rb_hash_equal, rb_hash_eql): [DOC] the orders of each
+ hashes are not compared. [Bug #11508]
- * process.c (rb_exec_fillarg): convert program path and arguments too.
+Fri Sep 4 23:26:22 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun Jun 30 01:57:08 2013 Tanaka Akira <akr@fsij.org>
+ * include/ruby/win32.h: fix macro name for VC runtime version,
+ RT_VER is only in Makefile.
- * bignum.c (big_rshift): Use abs2twocomp and twocomp2abs_bang.
+Fri Sep 4 17:46:17 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Sun Jun 30 00:14:20 2013 Tanaka Akira <akr@fsij.org>
+ * doc/contributing.rdoc: fix configuration option.
+ [ci skip] [fix GH-1009]
- * bignum.c (RBIGNUM_SET_NEGATIVE_SIGN): New macro.
- (RBIGNUM_SET_POSITIVE_SIGN): Ditto.
- (rb_big_neg): Inline get2comp to avoid double negation.
+Fri Sep 4 04:46:54 2015 Koichi Sasada <ko1@atdot.net>
-Sat Jun 29 23:26:41 2013 Tanaka Akira <akr@fsij.org>
+ * iseq.c (iseq_memsize): functions for wrapper object should have
+ iseqw_ prefix.
- * bignum.c (bary_neg): Extracted from bary_2comp.
- (bary_plus_one): Extracted from bary_2comp.
- (bary_2comp): Use bary_neg and bary_plus_one.
- (big_extend_carry): Extracted from get2comp.
- (get2comp): Use big_extend_carry.
- (rb_integer_unpack): Use big_extend_carry.
- (rb_big_neg): Use bary_neg.
+Thu Sep 3 21:12:12 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Jun 29 22:31:59 2013 Tanaka Akira <akr@fsij.org>
+ * lib/cgi/session.rb (create_new_id): use SHA512 instead of MD5.
+ pointed out by SARWAR JAHAN.
- * bignum.c (bary_2comp): Simplified.
+Thu Sep 3 20:29:18 2015 Koichi Sasada <ko1@atdot.net>
-Sat Jun 29 09:33:53 2013 Tanaka Akira <akr@fsij.org>
+ * gc.c (rb_raw_obj_info): iseq->body->location.first_lineno is Fixnum.
- * bignum.c (bigor_int): Return -1 if y == -1.
+Thu Sep 3 17:54:26 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Jun 29 09:07:16 2013 Tanaka Akira <akr@fsij.org>
+ * vm_eval.c (raise_method_missing): "names" should be singular.
+ pointed out by Filip Bartuzi.
- * bignum.c (bigor_int): Use RB_GC_GUARD.
- (bigxor_int): Take xn and hibitsx arguments. Use twocomp2abs_bang.
- (rb_big_xor): Use abs2twocomp and twocomp2abs_bang.
+Thu Sep 3 17:50:09 2015 Koichi Sasada <ko1@atdot.net>
-Sat Jun 29 08:19:58 2013 Tanaka Akira <akr@fsij.org>
+ * gc.c (rb_raw_obj_info): should support IMEMO/iseq.
- * bignum.c (bigand_int): Don't apply bitwise and for BDIGIT and long.
- (bigor_int): Take xn and hibitsx arguments. Use twocomp2abs_bang.
- (rb_big_or): Use abs2twocomp and twocomp2abs_bang.
+Thu Sep 3 10:07:49 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Jun 29 01:08:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ * vm_eval.c (raise_method_missing): refine error messages when a
+ symbol is not given. [Fix GH-1013]
- * numeric.c (fix_mul): remove FIT_SQRT_LONG test as it was causing
- fix_mul to return an incorrect result for -2147483648*-2147483648
- on 64 bit platforms
+Wed Sep 2 18:49:55 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * test/ruby/test_integer_comb.rb (class TestIntegerComb): add test case
+ * ext/psych/*: merge psych master(8737e5b). It contains following fixes.
+ https://github.com/tenderlove/psych/pull/242
+ https://github.com/tenderlove/psych/pull/246 [ruby-list:50219]
+ * test/psych/*: ditto.
-Fri Jun 28 12:26:53 2013 Tanaka Akira <akr@fsij.org>
+Wed Sep 2 18:04:13 2015 Koichi Sasada <ko1@atdot.net>
- * bignum.c (rb_big_and): Allocate new bignum with same size to shorter
- argument if it's high bits are zero.
+ * vm_insnhelper.h (GET_PC_COUNT): remove unused macro.
-Fri Jun 28 12:14:04 2013 Tanaka Akira <akr@fsij.org>
+Wed Sep 2 17:18:37 2015 Chris Schneider <chris@christopher-schneider.com>
- * ext/socket/ipsocket.c (init_inetsock_internal): Don't use local
- addresses which address family is different to remote address.
+ * process.c (proc_detach): [DOC] fix typo "intent" as "intend" in
+ rdoc. [Fix GH-1011]
-Fri Jun 28 08:06:22 2013 Tanaka Akira <akr@fsij.org>
+Wed Sep 2 16:58:21 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * bignum.c (bigand_int): Add arguments, xn and hibitsx.
- Use twocomp2abs_bang.
+ * file.c (rb_realpath_internal): use filesystem encoding if the
+ argument is in ASCII encodings.
-Thu Jun 27 23:58:13 2013 Tanaka Akira <akr@fsij.org>
+ * win32/file.c (rb_readlink): needs the result encoding.
- * bignum.c (abs2twocomp_bang): Removed.
- (abs2twocomp): Take n_ret argument to return actual length.
- (rb_big_and): Follow above change.
+Tue Sep 1 18:37:15 2015 Koichi Sasada <ko1@atdot.net>
-Thu Jun 27 22:52:19 2013 Tanaka Akira <akr@fsij.org>
+ * test/thread/test_queue.rb: catch up last commit.
- * bignum.c (get2comp): Use bary_2comp.
- (abs2twocomp_bang): New function.
- (abs2twocomp): New function.
- (twocomp2abs_bang): New function.
- (rb_big_and): Use abs2twocomp and twocomp2abs_bang.
+Tue Sep 1 18:16:32 2015 Koichi Sasada <ko1@atdot.net>
-Thu Jun 27 20:03:13 2013 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
+ * thread_sync.c (queue_do_close): ignore multiple close to allow
+ multiple producers.
+ https://bugs.ruby-lang.org/issues/10600#note-14
- * ext/openssl/lib/openssl/ssl.rb (verify_certificate_identity): fix
- hostname verification. Patched by nahi.
+Tue Sep 1 18:06:26 2015 Koichi Sasada <ko1@atdot.net>
- * test/openssl/test_ssl.rb (test_verify_certificate_identity): test for
- above.
+ * thread_tools.c: rename thread_tools.c to thread_sync.c.
+Mon Aug 31 17:04:45 2015 Koichi Sasada <ko1@atdot.net>
-Thu Jun 27 00:23:57 2013 Tanaka Akira <akr@fsij.org>
+ * class.c (move_refined_method): should insert a write barrier
+ from an original class to a created (cloned) method entry.
- * bignum.c (rb_big_pow): Retry if y is a Bignum and it is
- representable as a Fixnum.
- Use rb_absint_numwords.
+ * test/ruby/test_refinement.rb: add a test.
-Wed Jun 26 23:53:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+Sun Aug 30 02:42:22 2015 Aaron Patterson <tenderlove@ruby-lang.org>
- * ext/bigdecimal/bigdecimal.c (BigDecimal_save_rounding_mode): fix typo.
- Fixes GH-343. Patch by @jgarber.
+ * ext/openssl/ossl_ssl.c (ossl_ssl_method_tab): Only add SSLv3 support
+ if the SSL library supports it. Thanks Kurt Roeckx <kurt@roeckx.be>
+ [Bug #11376]
-Wed Jun 26 23:22:21 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/openssl/extconf.rb: check for SSLv3 support in the SSL
+ implementation.
- * enumerator.c (rb_enumeratorize_with_size): use strict definition
- rb_enumerator_size_func.
+ * test/openssl/test_ssl.rb (class OpenSSL): Skip tests that need SSLv3
+ if there is no support.
-Wed Jun 26 23:11:14 2013 Kouhei Sutou <kou@cozmixng.org>
+Fri Aug 28 16:05:09 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * gc.c (is_before_sweep): Add a missing space before a parenthesis.
- * gc.c (rb_gc_force_recycle): Add a missing space around a parenthesis.
+ * lib/rdoc/*: Update rdoc master(cfffed5)
+ https://github.com/rdoc/rdoc/pull/337
+ https://github.com/rdoc/rdoc/pull/367
-Wed Jun 26 22:44:00 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Aug 28 10:16:20 2015 Koichi Sasada <ko1@atdot.net>
- * include/ruby/intern.h (rb_enumeratorize_with_size): cast for
- backward compatibility.
+ * vm.c (hook_before_rewind): prevent kicking :return event while
+ finishing vm_exec func because invoke_block_from_c() kick a :return
+ event for bmethods.
+ [Bug #11492]
- * include/ruby/intern.h (rb_enumerator_size_func): define strict
- function declaration for rb_enumeratorize_with_size().
+ * test/ruby/test_settracefunc.rb: add a test.
-Wed Jun 26 21:01:22 2013 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+Thu Aug 27 18:05:42 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * test/ruby/test_io.rb (TestIO#test_write_32bit_boundary): skip if
- writing a file is slow.
- [ruby-core:55541] [Bug #8519]
+ * lib/webrick/server.rb: use IO::NULL instead of '/dev/null'
+ * test/ruby/test_string.rb: ditto.
-Wed Jun 26 16:42:11 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Aug 27 15:24:57 2015 Koichi Sasada <ko1@atdot.net>
- * lib/mkmf.rb: should use expanded values for header directories
- unless extmk. patch by vo.x (Vit Ondruch) at [ruby-core:55653]
- [Bug #8115], rhbz#921650.
+ * compile.c (iseq_set_sequence): rename variable names
+ to make it readable.
-Wed Jun 26 12:48:22 2013 Tanaka Akira <akr@fsij.org>
+Thu Aug 27 07:45:34 2015 Koichi Sasada <ko1@atdot.net>
- * bignum.c (bigxor_int): Fix a buffer over read.
+ * thread_tools.c: add Queue#close(exception=false) and
+ SizedQueue#close(exception=false).
+ [Feature #10600]
-Wed Jun 26 12:13:12 2013 Tanaka Akira <akr@fsij.org>
+ Trying to deq from a closed empty queue return nil
+ if exception parameter equals to false (default).
- * bignum.c (bigand_int): Consider negative values.
- (bigor_int): The allocated bignum should have enough size
- to store long.
- This fixes (bignum fits in a BDIGIT) | (fixnum bigger than BDIGIT)
- on platforms which SIZEOF_BDIGITS < SIZEOF_LONG,
- such as LP64 with 32bit BDIGIT (no int128).
+ If exception parameter is truthy, it raises
+ ClosedQueueError (< StopIteration).
+ ClosedQueueError inherits StopIteration so that you can write:
-Wed Jun 26 12:08:51 2013 Tanaka Akira <akr@fsij.org>
+ loop{ e = q.deq; (using e) }
- * test/socket/test_udp.rb: Close sockets explicitly.
- Don't use fixed port number.
+ Trying to close a closed queue raises ClosedQueueError.
-Wed Jun 26 07:27:17 2013 Tanaka Akira <akr@fsij.org>
+ Blocking threads to wait deq for Queue and SizedQueue will be
+ restarted immediately by returning nil (exception=false) or
+ raising a ClosedQueueError (exception=true).
- * bignum.c (bigand_int): Fix a buffer over read.
+ Blocking threads to wait enq for SizedQueue will be
+ restarted by raising a ClosedQueueError immediately.
-Wed Jun 26 06:48:07 2013 Tanaka Akira <akr@fsij.org>
+ The above specification is not proposed specification, so that
+ we need to continue discussion to conclude specification this
+ method.
- * bignum.c (bigadd_int): Fix a buffer over read.
+ * test/thread/test_queue.rb: add tests originally written by
+ John Anderson and modify detailed behavior.
-Wed Jun 26 01:18:13 2013 Masaya Tarui <tarui@ruby-lang.org>
+Wed Aug 26 10:52:02 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c (is_before_sweep): Add new helper function that check the object
- is before sweep?
- * gc.c (rb_gc_force_recycle): Have to clear mark bit if object's slot
- already ready to minor sweep.
+ * re.c (rb_memsearch_wchar, rb_memsearch_qchar): test matching
+ till the end of string. [ruby-core:70592] [Bug #11488]
-Wed Jun 26 01:17:29 2013 Tanaka Akira <akr@fsij.org>
+ * test/ruby/test_m17n.rb (test_include?, test_index): add tests by
+ Tom Stuart.
- * bignum.c (bigsub_int): Fix a buffer over read.
+Wed Aug 26 09:26:00 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Jun 25 22:45:43 2013 Tanaka Akira <akr@fsij.org>
+ * id_table.c (list_table_extend, hash_table_extend): remove C99
+ features. [ruby-dev:49239] [Bug #11487]
- * bignum.c (rb_absint_singlebit_p): Use POW2_P.
- (bary_pack): Ditto.
- (rb_big2str0): Ditto.
- (POW2_P): Moved to top.
+Tue Aug 25 06:34:43 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Jun 25 22:28:07 2013 Akinori MUSHA <knu@iDaemons.org>
+ * win32/win32.c (w32_symlink): implement symlink().
- * lib/rubygems/ext/builder.rb (Gem::Ext::Builder.make): Pass
- DESTDIR via command line to override what's in MAKEFLAGS. This
- fixes an installation problem under a package building
- environment where DESTDIR is specified in the (parent) command
- line. [Fixes GH-327]
+Mon Aug 24 16:01:19 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Jun 25 21:43:13 2013 Tanaka Akira <akr@fsij.org>
+ * encoding.c (rb_locale_encindex): find encoding index without
+ making a string object every time. [ruby-core:58160] [Bug #9080]
- * bignum.c (big2dbl): Use (BDIGIT)1 instead of 1UL.
- (bary_mul_normal): Remove a useless cast.
+Sat Aug 22 15:43:12 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Jun 25 21:26:00 2013 Kenta Murata <mrkn@mrkn.jp>
+ * vm_eval.c (check_funcall_failed, check_funcall_missing): cache
+ results of respond_to? and respond_to_missing?, and search a
+ public method only for compatibility with rb_respond_to.
- * ext/bigdecimal/bigdecimal.c (BigMath_s_exp): Fix for the cases when
- the argument x is not a BigDecimal.
- This change is based on the patch made by Heesob Park and Garth Snyder.
- [Bug #6862] [ruby-core:47145]
- [Fixes GH-332] https://github.com/ruby/ruby/pull/332
+Sat Aug 22 08:23:32 2015 Koichi Sasada <ko1@atdot.net>
-Tue Jun 25 20:36:31 2013 Tanaka Akira <akr@fsij.org>
+ * ext/thread/thread.c: move definitions of Queue, SizedQueue
+ and ConditionalVariables to thread_tools.c. In other words,
+ such classes are built-in.
+ [Feature #8919]
- * bignum.c (big2ulong): "check" argument removed.
- (rb_big2ulong): Follow above change.
- (rb_big2long): Ditto.
- (rb_big_rshift): Ditto.
- (rb_big_aref): Ditto.
+ At first, I planned to embed only a Queue class.
+ However, rubygems requires 'thread.rb' (rubygems are
+ required at first, when launch MRI without --disable-gems).
+ So most of people require 'thread.rb' as an embedded library.
-Tue Jun 25 20:08:29 2013 Tanaka Akira <akr@fsij.org>
+ Now, ext/thread/thread.c is empty, only for a dummy for
+ compatibility.
- * bignum.c (rb_big2ulong_pack): Use rb_integer_pack.
- (rb_big_aref): Call big2ulong with TRUE for "check" argument.
- It should be non-effective.
+ * thread.c: move a definition of Mutex class to thread_tools.c.
-Tue Jun 25 19:07:33 2013 Tanaka Akira <akr@fsij.org>
+ And define Mutex class under Thread (so now Mutex is Thread::Mutex).
+ Because other thread related classes are also defined under Thread.
+ We remain ::Mutex as Thread::Mutex. Only an inspect result is changed.
- * bignum.c (LSHIFTX): Revert r41611.
- The redundant expression suppresses a warning, C4293, by Visual
- Studio.
- http://ruby-mswin.cloudapp.net/vc10-x64/ruby-trunk/log/20130625T072854Z.log.html.gz#miniruby
+ * common.mk: add dependency from thread.o to thread_tools.c.
-Tue Jun 25 19:03:00 2013 Tanaka Akira <akr@fsij.org>
+Sat Aug 22 05:31:37 2015 Koichi Sasada <ko1@atdot.net>
- * bignum.c (big2ulong): Add a cast.
- (big2ull): Add a specialized code for SIZEOF_LONG_LONG <=
- SIZEOF_BDIGITS.
+ * vm_opts.h, iseq.c, iseq.h: add compile option to force frozen
+ string literals.
+ [Feature #11473]
-Tue Jun 25 12:42:57 2013 Tanaka Akira <akr@fsij.org>
+ This addition is not specification change, but to try frozen
+ string literal world discussed on [Feature #11473].
- * bignum.c (integer_unpack_single_bdigit): Use "1 + ~u" instead of
- "-u" to suppress warning (C4146) by Visual Studio.
- Reported by ko1 via IRC.
+ You can try frozen string literal world using this magical line:
-Tue Jun 25 12:28:57 2013 Tanaka Akira <akr@fsij.org>
+ RubyVM::InstructionSequence.compile_option =
+ {frozen_string_literal: true}
- * bignum.c (big2ulong): Add code specialized for SIZEOF_LONG <=
- SIZEOF_BDIGITS.
- This prevents shift width warning from "num <<= BITSPERDIG".
+ Note that this is a global compilation option, so that you need to
+ compile another script like that:
-Tue Jun 25 12:23:30 2013 Koichi Sasada <ko1@atdot.net>
+ p 'foo'.frozen? #=> false
+ RubyVM::InstructionSequence.compile_option =
+ {frozen_string_literal: true}
+ p 'foo'.frozen? #=> false, because this line is already compiled.
+ p eval("'foo'.frozen?") #=> true
- * gc.c: fix oldgen/remembered_shady counting algorithm.
+ Details:
+ * String literals are deduped by rb_fstring().
+ * Dynamic string literals ("...#{xyz}...") is now only frozen,
+ not deduped. Maybe you have other ideas.
- * gc.c (rgengc_check_shady): increment
- `objspace->rgengc.remembered_shady_object_count' here.
+ Now, please do not use this option on your productions :)
+ Of course, current specification can be changed.
- * gc.c (rgengc_remember): return FALSE if obj is already remembered.
+ * compile.c: ditto.
- * gc.c (rgengc_rememberset_mark): make it void.
+ * test/ruby/test_iseq.rb: add a test.
- * gc.c (gc_mark_children): fix to double counting oldgen_object_count
- at minor GC.
+Sat Aug 22 02:53:12 2015 Aaron Patterson <tenderlove@ruby-lang.org>
-Tue Jun 25 12:07:18 2013 Tanaka Akira <akr@fsij.org>
+ * ext/psych/*: update to Psych 2.0.14
- * bignum.c (MSB): Removed.
- (BDIGIT_MSB): Defined using BIGRAD_HALF.
- (bary_2comp): Apply BIGLO after possible over flow of BDIGIT.
- (get2comp): Ditto.
- (bary_unpack_internal): Use BDIGIT_MSB.
- Apply BIGLO after possible over flow of BDIGIT.
- (rb_integer_unpack): Use BDIGIT_MSB.
- (calc_hbase): Use BDIGMAX.
- (big2dbl): Use BDIGMAX.
- Apply BIGLO after possible over flow of BDIGIT.
- (rb_big_neg): Apply BIGLO after possible over flow of BDIGIT.
- (biglsh_bang): Ditto.
- (bigrsh_bang): Ditto.
- (bary_divmod): Use BDIGIT_MSB.
- (bigdivrem): Ditto.
- (bigxor_int): Apply BIGLO after possible over flow of BDIGIT.
+ * test/psych/*: ditto
- * marshal.c (shortlen): Use SIZEOF_BDIGITS instead of sizeof(BDIGIT).
+Fri Aug 21 19:58:48 2015 Koichi Sasada <ko1@atdot.net>
- * ext/openssl/ossl_bn.c (ossl_bn_initialize): Use SIZEOF_BDIGITS
- instead of sizeof(BDIGIT).
+ * ext/objspace/objspace.c: add a new method ObjectSpace.count_symbols.
+ [Feature #11158]
-Tue Jun 25 11:40:08 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * symbol.c (rb_sym_immortal_count): added to count immortal symbols.
- * bignum.c (big2ulong): suppress shorten-64-to-32 warning. BDIGIT can
- be bigger than long now.
+ * symbol.h: ditto.
- * bignum.c (LSHIFTX): remove redundant never-true expression.
+ * test/objspace/test_objspace.rb: add a test for this method.
-Tue Jun 25 00:55:54 2013 Masaya Tarui <tarui@ruby-lang.org>
+ * NEWS: describe about this method.
- * gc.c (typedef struct rb_objspace): Change members for monitor objects.
- * gc.c (gc_marks_test): Check all WriteBarrier Errors and track them in obj-tree.
- * gc.c (rgengc_check_shady): Ditto.
- * gc.c (gc_marks): Move 2 function calls to gc_marks_test for test initialize.
+Fri Aug 21 19:48:17 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Jun 24 23:30:31 2013 Tanaka Akira <akr@fsij.org>
+ * win32/Makefile.sub ($(LIBRUBY_SO)): needs additional libraries
+ for extension libraries to link statically.
+ [ruby-core:70499] [Feature #9018]
- * bignum.c (integer_unpack_single_bdigit): Refine code to filling
- higher bits and use BIGLO.
+Fri Aug 21 18:49:22 2015 Koichi Sasada <ko1@atdot.net>
-Mon Jun 24 22:26:31 2013 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+ * include/ruby/ruby.h, cont.c, vm_trace.c: add a new event
+ fiber_switch. We need more discussion about this feature
+ so that I don't write it on NEWS.
+ [Feature #11348]
- * test/rinda/test_rinda.rb (RingIPv6#prepare_ipv6):
- ifindex() function may not be implemented on Windows. We use another
- check for the case.
+ * test/ruby/test_settracefunc.rb: add tests.
-Mon Jun 24 22:11:37 2013 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+Fri Aug 21 17:32:42 2015 Koichi Sasada <ko1@atdot.net>
- * test/gdbm/test_gdbm.rb (TestGDBM#test_s_open_nolock):
- skip a failing test on Windows because flock() implementation is
- different from Unix.
+ * vm_insnhelper.c (vm_invoke_block): we should not expect ci->argc is
+ stable after invoking a block. [Bug #11451]
-Mon Jun 24 22:06:14 2013 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+ * test/ruby/test_yield.rb: add a test. This test script is given by
+ Alex Dowad.
- * test/rubygems/test_gem_installer.rb (test_install_extension_flat):
- use ruby in build directory in case ruby is not installed.
- [ruby-core:53265] [Bug #8058]
+Fri Aug 21 06:35:50 2015 Aaron Patterson <tenderlove@ruby-lang.org>
-Mon Jun 24 22:04:02 2013 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+ * test/openssl/test_ssl_session.rb: Fix tests so that they take in to
+ account OpenSSL installations that have SSLv3 disabled by default.
+ Thanks Jeremy Evans <code@jeremyevans.net> for the patches.
+ [Bug #11366] [Bug #11367]
- * ext/dl/cfunc.c (rb_dlcfunc_call): fix conversion from Bignum to
- pointer. sizeof(DLSTACK_TYPE) is larger than sizeof(long) on
- Windows x64 and higher bits over sizeof(long) of DLSTACK_TYPE was
- zero even if a pointer value was over 32 bits which causes SEGV on
- DL::TestCPtr#test_to_ptr_io. Adding a cast solves the bug.
+Thu Aug 20 22:19:17 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Jun 24 22:04:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ * vm_method.c (basic_obj_respond_to): call respond_to_missing?
+ only when redefined. [ruby-core:70460] [Bug #11465]
- * eval_error.c (warn_printf): use rb_vsprintf instead so ruby specific
- extensions like PRIsVALUE can be used in format strings
- * eval_error.c (error_print): use warn_print_str (alias for
- rb_write_error_str) to print a string value instead of using
- RSTRING_PTR and RSTRING_LEN manually
- * eval.c (setup_exception): use PRIsVALUE instead of %s and RSTRING_PTR
+Thu Aug 20 14:13:27 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Jun 24 20:31:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ * vm_eval.c (check_funcall_respond_to): share the behavior with
+ rb_obj_respond_to. [ruby-core:70460] [Bug #11465]
- * 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
+ * vm_method.c (vm_respond_to): extract from rb_obj_respond_to and
+ merge r39881.
-Mon Jun 24 07:57:18 2013 Masaya Tarui <tarui@ruby-lang.org>
+Thu Aug 20 08:53:09 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c (after_gc_sweep): Have to record malloc info before reset.
- * gc.c (gc_prof_timer_start): Pick out part of new record creation as gc_prof_setup_new_record.
- * gc.c (gc_prof_set_malloc_info): Move point of recording allocation size to front of mark.
+ * vm_method.c (rb_obj_respond_to): reuse found method entry
+ instead of searching same entry repeatedly.
-Mon Jun 24 02:53:09 2013 Zachary Scott <zachary@zacharyscott.net>
+Thu Aug 20 08:31:17 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * array.c: Return value in Array overview example found by @PragTob
- [Fixes GH-336] https://github.com/ruby/ruby/pull/336
+ * dir.c (replace_real_basename), win32/win32.c (opendir_internal):
+ check reparse point tags and treat supported tags only as
+ symbolic links. [ruby-core:70454] [Bug #11462]
-Mon Jun 24 02:45:51 2013 Zachary Scott <zachary@zacharyscott.net>
+Wed Aug 19 23:59:28 2015 Aaron Patterson <tenderlove@ruby-lang.org>
- * array.c (rb_ary_zip): typo by @PragTob [Fixes GH-337]
- https://github.com/ruby/ruby/pull/337
+ * ext/openssl/lib/openssl/ssl.rb (module OpenSSL): add OP_ALL to
+ existing options rather than just setting it. Some vendors apply
+ custom patches to their versions of OpenSSL that set default values
+ for options. This commit respects the custom patches they've
+ applied.
-Mon Jun 24 02:42:01 2013 Zachary Scott <zachary@zacharyscott.net>
+ * test/openssl/test_ssl.rb (class OpenSSL): check that OP_ALL has been
+ added to the options.
- * win32/README.win32: grammar typo by @blankenshipz [Fixes GH-334]
- https://github.com/ruby/ruby/pull/334
+Wed Aug 19 23:55:29 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Jun 24 00:59:35 2013 Tanaka Akira <akr@fsij.org>
+ * process.c (rb_f_spawn): [DOC] elaborate environment variable
+ values. [ruby-core:70456] [Bug #11463]
- * bignum.c (BIGUP): Use LSHIFTX and avoid cast to consider the type
- of x is bigger than BDIGIT_DBL.
- (big2ulong): Use unsigned long to store the result.
- (big2ull): Use unsigned LONG_LONG to store the result.
- (bigand_int): Use long for num to avoid data loss.
- (bigor_int): Ditto.
- (bigxor_int): Ditto.
+Wed Aug 19 23:48:06 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun Jun 23 23:05:58 2013 Tanaka Akira <akr@fsij.org>
+ * win32/win32.c (winnt_lstat): check reparse point tags and treat
+ supported tags only as symbolic links.
+ [ruby-core:70454] [Bug #11462]
- * include/ruby/defines.h (BDIGIT): Define it only if it is not defined
- yet. This eases tests and debug.
- (SIZEOF_BDIGITS): Ditto.
- (BDIGIT_DBL): Ditto.
- (BDIGIT_DBL_SIGNED): Ditto.
- (PRI_BDIGIT_PREFIX): Ditto.
- (PRI_BDIGIT_DBL_PREFIX): Ditto.
- (PRIdBDIGIT): Define it only if PRI_BDIGIT_PREFIX is defined.
- (PRIiBDIGIT): Ditto.
- (PRIoBDIGIT): Ditto.
- (PRIuBDIGIT): Ditto.
- (PRIxBDIGIT): Ditto.
- (PRIXBDIGIT): Ditto.
- (PRIdBDIGIT_DBL): Ditto.
- (PRIiBDIGIT_DBL): Ditto.
- (PRIoBDIGIT_DBL): Ditto.
- (PRIuBDIGIT_DBL): Ditto.
- (PRIxBDIGIT_DBL): Ditto.
- (PRIXBDIGIT_DBL): Ditto.
+Tue Aug 18 20:05:49 2015 NARUSE, Yui <naruse@ruby-lang.org>
- * include/ruby/ruby.h (RBIGNUM_EMBED_LEN_MAX): Define it only if it is
- not defined yet.
+ * thread_pthread.c (reserve_stack): ensure the memory is really
+ allocated. [Bug #11457]
-Sun Jun 23 17:29:51 2013 Tanaka Akira <akr@fsij.org>
+Tue Aug 18 17:19:21 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * bignum.c (integer_unpack_single_bdigit): Use a cast.
+ * parse.y (IS_BEG): include labeled argument state, which was
+ EXPR_LABELARG. [ruby-dev:49221] [Bug #11456]
-Sun Jun 23 15:38:07 2013 Koichi Sasada <ko1@atdot.net>
+Tue Aug 18 16:16:21 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * bootstraptest/test_thread.rb: rescue resource limitation errors.
+ * include/ruby/ruby.h (RClass): define only in C, `__attribute__`
+ between `struct` and the name can't compile with g++.
+ [ruby-core:70297] [Bug #11426]
-Sun Jun 23 08:19:27 2013 Tanaka Akira <akr@fsij.org>
+Mon Aug 17 20:56:36 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * bignum.c (integer_unpack_single_bdigit): Extracted from
- bary_unpack_internal.
+ * parse.y: fix syntax error at do-block after a conditional
+ operator. separate label-allowed and after-a-label states from
+ others as bit flags. [ruby-dev:48790] [Bug #10653]
-Sun Jun 23 07:41:52 2013 Tanaka Akira <akr@fsij.org>
+Mon Aug 17 11:57:36 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * bignum.c (bary_unpack_internal): Suppress warnings (C4146) on Visual Studio.
- Reported by ko1 via IRC.
+ * io.c (rb_io_each_codepoint): raise an exception at incomplete
+ character before EOF when conversion takes place. [Bug #11444]
-Sun Jun 23 06:49:28 2013 Koichi Sasada <ko1@atdot.net>
+Sun Aug 16 17:33:45 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * include/ruby/ruby.h, gc.c: rename macros and functions:
- OBJ_WB_GIVEUP() -> OBJ_WB_UNPROTECT(),
- rb_obj_wb_giveup() -> rb_obj_wb_unprotect(),
- rb_gc_giveup_promoted_writebarrier() ->
- rb_gc_writebarrier_unprotect_promoted(),
+ * gems/bundled_gems: update latest version of bundled gems.
+ It includes minitest-5.8.0 and test-unit 3.1.3.
- * class.c, eval.c, hash.c: use OBJ_WB_UNPROTECT().
+Sun Aug 16 17:24:10 2015 Kazuki Tsujimoto <kazuki@callcc.net>
-Sun Jun 23 05:41:32 2013 Koichi Sasada <ko1@atdot.net>
+ * gc.c (gc_mark_children): check if RCLASS_EXT is valid
+ before marking. This fixes the following test failure
+ introduced in r51126:
- * class.c (rb_include_class_new), eval.c (rb_using_refinement):
- make classes/modules (who share method table) shady.
- If module `a' and `b' shares method table m_tbl and new method
- with iseq is added, then write barrier is applied only `a' or `b'.
- To avoid this issue, shade such classes/modules.
+ make test-all TESTOPTS='--gc-stress ruby/test_refinement.rb'
- * vm_method.c (rb_method_entry_make): add write barriers.
+Sat Aug 15 10:51:08 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun Jun 23 01:27:54 2013 Tanaka Akira <akr@fsij.org>
+ * ext/win32/lib/win32/registry.rb (API#SetValue): data size should
+ be in bytes, not in chars. [ruby-core:70365] [Bug #11439]
- * bignum.c (bytes_zero_p): Removed.
- (bary_pack): Don't call bytes_zero_p.
+Sat Aug 15 10:15:20 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun Jun 23 00:51:29 2013 Tanaka Akira <akr@fsij.org>
+ * io.c (rb_io_each_codepoint): read more data when read partially.
+ [ruby-core:70379] [Bug #11444]
- * bignum.c (bytes_zero_p): Extracted from bary_pack.
- (bary_pack): Use bytes_zero_p.
+Sat Aug 15 04:33:39 2015 Eric Wong <e@80x24.org>
-Sun Jun 23 00:16:57 2013 Tanaka Akira <akr@fsij.org>
+ * hash.c (any_hash): skip rb_objid_hash for static syms
+ (rb_num_hash_start): extract from rb_ident_hash
+ (rb_objid_hash): call rb_num_hash_start
+ (rb_ident_hash): ditto
+ [ruby-core:70181] [Feature #11405]
- * bignum.c (MSB): New macro.
- (bary_unpack_internal): Use MSB.
- (bary_divmod): Ditto.
- (bigdivrem): Ditto.
+Sat Aug 15 04:16:13 2015 Eric Wong <e@80x24.org>
-Sat Jun 22 23:45:22 2013 Tanaka Akira <akr@fsij.org>
+ * iseq.c (rb_iseq_mark): reduce NULL checks
- * bignum.c (bary_swap): New function.
- (bary_pack): Use bary_swap.
- (bary_unpack_internal): Ditto.
+Fri Aug 14 18:50:57 2015 Eric Wong <e@80x24.org>
-Sat Jun 22 23:18:39 2013 Tanaka Akira <akr@fsij.org>
+ * method.h (METHOD_ENTRY_VISI_SET): cast visi to int
+ (METHOD_ENTRY_FLAGS_SET): ditto
- * bignum.c (bytes_2comp): Renamed from quad_buf_complement.
- (bary_pack): Use bytes_2comp.
- (rb_quad_pack): Use rb_integer_pack.
- (rb_quad_unpack): Use rb_integer_unpack.
+Fri Aug 14 18:43:11 2015 Eric Wong <e@80x24.org>
-Sat Jun 22 21:46:18 2013 Tanaka Akira <akr@fsij.org>
+ * process.c (close_unless_reserved): add extra check
+ (dup2_with_divert): remove
+ (redirect_dup2): use dup2 without divert
+ (before_exec_non_async_signal_safe): adjust call + comment
+ (rb_f_exec): stop timer thread for all OSes
+ (rb_exec_without_timer_thread): remove
+ * eval.c (ruby_cleanup): adjust call
+ * thread.c (rb_thread_stop_timer_thread): always close pipes
+ * thread_pthread.c (struct timer_thread_pipe): add writing field,
+ mark owner_process volatile for signal handlers
+ (rb_thread_wakeup_timer_thread_fd): check valid FD
+ (rb_thread_wakeup_timer_thread): set writing flag to prevent close
+ (rb_thread_wakeup_timer_thread_low): ditto
+ (CLOSE_INVALIDATE): new macro
+ (close_invalidate): new function
+ (close_communication_pipe): removed
+ (setup_communication_pipe_internal): make errors non-fatal
+ (setup_communication_pipe): ditto
+ (thread_timer): close reading ends inside timer thread
+ (rb_thread_create_timer_thread): make errors non-fatal
+ (native_stop_timer_thread): close write ends only, always,
+ wait for signal handlers to finish
+ (rb_divert_reserved_fd): remove
+ * thread_win32.c (native_stop_timer_thread): adjust (untested)
+ (rb_divert_reserved_fd): remove
+ * vm_core.h: adjust prototype
+ [ruby-core:70386] [Bug #11336]
- * bignum.c (rb_integer_unpack): Don't allocate a Bignum if possible.
+Fri Aug 14 18:40:43 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Jun 22 21:03:58 2013 Tanaka Akira <akr@fsij.org>
+ * ext/win32/lib/win32/registry.rb (API#SetValue): add terminator
+ size, not 1 byte. [ruby-core:70365] [Bug #11439]
- * pack.c (pack_unpack): Remove specialized unpackers for integers.
+Thu Aug 13 22:49:42 2015 Juanito Fatas <katehuang0320@gmail.com>
-Sat Jun 22 20:36:50 2013 Tanaka Akira <akr@fsij.org>
+ * lib/timeout.rb (Timeout#timeout): freeze a string message to
+ reduce string allocations. [Fix GH-996]
- * bignum.c (bary_unpack_internal): Specialized unpacker implemented.
- (bary_unpack): Support INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION.
- (rb_integer_unpack): Support INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION.
+Thu Aug 13 17:42:34 2015 Koichi Sasada <ko1@atdot.net>
-Sat Jun 22 18:53:10 2013 Tanaka Akira <akr@fsij.org>
+ * vm_core.h (rb_call_info_kw_arg_bytes): move the definition
+ to iseq.h because this function is shared with iseq.c and compile.c.
- * bignum.c (bary_pack): Support
- INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION flag.
- Fix byte order and word order handling in code specialized for
- wordsize % SIZEOF_BDIGITS == 0.
+Thu Aug 13 14:36:31 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * internal.h (INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION): Defined.
+ * object.c (rb_num_to_dbl): move from num2dbl_with_to_f in math.c.
-Sat Jun 22 15:41:25 2013 Koichi Sasada <ko1@atdot.net>
+Thu Aug 13 09:01:25 2015 Eric Wong <e@80x24.org>
- * gc.c (rgengc_check_shady): add new WB miss checking
- on RGENGC_CHECK_MODE >= 2.
+ * load.c (features_index_add): avoid repeat calculation
- (1) Save bitmaps before marking
- (2) Run full marking
- (3) On each traceable object,
- (a) object was not oldgen (== newly or shady object) &&
- (b) parent object was oldgen &&
- (c) parent object was not remembered &&
- (d) object was not remembered
- then, it should be WB miss.
+Wed Aug 12 21:57:31 2015 Koichi Sasada <ko1@atdot.net>
- This idea of this checker is by Masaya Tarui <tarui@ruby-lang.org>.
+ * id_table.c: IMPL() macro accept op as _opname instead of opname
+ because jemalloc seems to replace the word `free' to `je_free'.
-Sat Jun 22 15:25:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+Wed Aug 12 21:51:11 2015 Koichi Sasada <ko1@atdot.net>
- * ext/etc/etc.c (setup_passwd): revert r41560, unnecessary
+ * id_table.c (mix_id_table_insert): fix memory leak.
-Sat Jun 22 14:39:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+Wed Aug 12 21:17:38 2015 Eric Wong <e@80x24.org>
- * ext/etc/etc.c (Init_etc): omit 'passwd' from definition of Etc::Passwd
- if HAVE_STRUCT_PASSWD_PW_PASSWD is not defined to prevent mismatch of
- fields and values in setup_passwd
+ * iseq.c (iseq_memsize): reimplement for wrapper
+ (param_keyword_size): extracted from iseq_memsize
+ (iseqw_mark): new mark function
+ (iseqw_data_type): new data type
+ (iseqw_new): wrap as iseqw_data_type
+ (iseqw_check): adjust for wrapper
+ (Init_ISeq): remove iseqw_iseq_key initialization
+ * test/objspace/test_objspace.rb: new test
+ [ruby-core:70344] [Feature #11435]
-Sat Jun 22 14:35:40 2013 Tanaka Akira <akr@fsij.org>
+Wed Aug 12 21:15:27 2015 Eric Wong <e@80x24.org>
- * ext/dl/cfunc.c (rb_dlcfunc_call): Use rb_big_pack instead of
- rb_big2ulong_pack and rb_big2ull.
+ * vm_core.h (rb_call_info_kw_arg_bytes): extract from compile.c
+ * compile.c (iseq_build_callinfo_from_hash): use above function
- * include/ruby/intern.h (rb_big2ulong_pack): Deprecated.
+Wed Aug 12 18:00:17 2015 Koichi Sasada <ko1@atdot.net>
-Sat Jun 22 14:31:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ * class.c (move_refined_method): same as the last commit.
- * ext/etc/etc.c (setup_passwd): pass 0 as VALUE to rb_struct_new to
- prevent segfault if the compiler passes it as a 32 bit integer on
- a 64 bit ruby
+Wed Aug 12 17:57:53 2015 Koichi Sasada <ko1@atdot.net>
-Sat Jun 22 13:47:13 2013 Tanaka Akira <akr@fsij.org>
+ * class.c, gc.c vm.c: use ID_TABLE_* instead of ST_*
+ (such as ST_CONTINUE) for enum rb_id_table_iterator_result.
- * bignum.c (bary_pack): MEMZERO can be used even if nails is not zero.
+Wed Aug 12 17:05:36 2015 Koichi Sasada <ko1@atdot.net>
-Sat Jun 22 13:43:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ * id_table.h: introduce ID key table.
+ [Feature #11420]
- * ext/etc/etc.c (etc_getpwnam): use PRIsVALUE in format string instead
- of %s and RSTRING_PTR
+ This table only manage ID->VALUE table to reduce overhead of st.
- * ext/etc/etc.c (etc_getgrnam): ditto
+ Some functions prefixed rb_id_table_* are provided.
-Sat Jun 22 13:07:15 2013 Tanaka Akira <akr@fsij.org>
+ * id_table.c: implement rb_id_table_*.
- * bignum.c (CLEAR_LOWBITS): Rewritten without RSHIFTX.
- (RSHIFTX): Removed.
+ There are several algorithms to implement it.
-Sat Jun 22 10:38:03 2013 Tanaka Akira <akr@fsij.org>
+ Now, there are roughly 4 types:
- * pack.c (num2i32): Removed.
- (pack_pack): Don't use num2i32.
+ * st
+ * array
+ * hash (implemented by Yura Sokolov)
+ * mix of array and hash
-Sat Jun 22 09:55:13 2013 Tanaka Akira <akr@fsij.org>
+ The macro ID_TABLE_IMPL can choose implementation.
+ You can see detailes about them at the head of id_table.c.
- * bignum.c (LSHIFTX): Defined to suppress a warning.
- (RSHIFTX): Ditto.
- (CLEAR_LOWBITS): Use LSHIFTX and RSHIFTX.
- (FILL_LOWBITS): Use LSHIFTX.
- Reported by ko1 via IRC.
+ At the default, I choose 34 (mix of list and hash).
+ This is not final decision.
+ Please report your suitable parameters or
+ your data structure.
-Sat Jun 22 09:11:33 2013 Ryan Davis <ryand-ruby@zenspider.com>
+ * symbol.c: introduce rb_id_serial_t and rb_id_to_serial()
+ to represent ID by serial number.
- * lib/minitest/*: Imported minitest 4.7.5 (r8724)
- * test/minitest/*: ditto
+ * internal.h: use id_table for method tables.
-Sat Jun 22 07:20:30 2013 Koichi Sasada <ko1@atdot.net>
+ * class.c, gc.c, marshal.c, vm.c, vm_method.c: ditto.
- * gc.c (gc_prof_set_heap_info, after_gc_sweep): call
- gc_prof_set_heap_info() just after sweeping to calculate
- live object number correctly.
- (live object number = total generated number (before marking) -
- total freed number (after sweeping))
+Wed Aug 12 05:19:11 2015 Eric Wong <e@80x24.org>
- * gc.c (gc_marks): record `oldgen_object_count' into current profile`
- record directly.
+ * parse.y (rb_parser_compile_cstr): remove volatile arg
+ (rb_parser_compile_string): ditto
+ (rb_parser_compile_file): ditto
+ (rb_parser_compile_string_path): ditto
+ (rb_parser_compile_file_path): ditto
+ [ruby-core:70323] [Misc #11431]
- * gc.c (rgengc_rememberset_mark): same for remembered_normal_objects
- and remembered_shady_objects.
+Tue Aug 11 22:59:57 2015 Tanaka Akira <akr@fsij.org>
-Sat Jun 22 06:46:04 2013 Koichi Sasada <ko1@atdot.net>
+ * numeric.c (Init_Numeric): Fix document for Float::MIN and
+ Float::EPSILON.
- * gc.c (rb_objspace::profile): rename rb_objspace::profile::record to
- records (because it points a set of records) and add a field
- rb_objspace::profile::current_record to point a current profiling
- record.
+Tue Aug 11 15:22:31 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c: use above fields.
+ * include/ruby/ruby.h (ALLOCV_N): check integer overflow, as well
+ as ruby_xmalloc2. pointed out by Paul <pawlkt AT gmail.com>.
-Sat Jun 22 06:05:36 2013 Koichi Sasada <ko1@atdot.net>
+Tue Aug 11 14:57:09 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c (rb_gc_giveup_promoted_writebarrier): remove `rest_sweep()'
- because all of remembered objects are called for gc_mark_children().
+ * array.c (rb_ary_repeated_permutation): fix buffer size, ALLOCV_N
+ already multiplies element size.
-Sat Jun 22 05:08:03 2013 Koichi Sasada <ko1@atdot.net>
+Tue Aug 11 12:13:20 2015 Jeremy Evans <merch-redmine@jeremyevans.net>
- * gc.c (rgengc_rememberset_mark): call gc_mark_children() for
- remembered objects directly instead of pushing on the mark stack.
+ * test/openssl/test_ssl.rb: Fix LocalJumpErrors being raised
+ in OpenSSL tests. [ruby-core:70020][Bug #11368]
-Sat Jun 22 04:48:53 2013 Koichi Sasada <ko1@atdot.net>
+Tue Aug 11 11:54:13 2015 Alexey Lipnyagov <liptonshmidt@gmail.com>
- * include/ruby/ruby.h (OBJ_WRITE): cast to (VALUE *) for second
- parameter `slot'. You don't need to write a cast (VALUE *) any more.
+ * string.c: Fix documentation for String#slice
+ [ruby-core:70298][Bug #11427]
- * class.c, compile.c, hash.c, iseq.c, proc.c, re.c, variable.c,
- vm.c, vm_method.c: remove cast expressions for OBJ_WRITE().
+Tue Aug 11 11:53:28 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Jun 22 04:37:08 2013 Koichi Sasada <ko1@atdot.net>
+ * parse.y (superclass): make superclass rule optional and allow
+ any contents without a terminator. [EXPERIMENTAL]
- * gc.c (slot_sweep_body): rename to slot_sweep().
- No need to separate major/minor GC.
+Tue Aug 11 10:58:42 2015 Juanito Fatas <juanitofatas@gmail.com>
- * gc.c (gc_setup_mark_bits): remove gc_clear_mark_bits() and unify to
- this function.
+ * string.c: [DOC] Make #end_with? example doc symmetry
+ with #start_with? [fix GH-992][ci skip]
-Sat Jun 22 04:20:21 2013 Koichi Sasada <ko1@atdot.net>
+Tue Aug 11 10:51:19 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * gc.c (check_bitmap_consistency): add to check flag and bitmap consistency.
- Use this function in several places.
+ * test/ruby/test_array.rb: Add test for `Array#flatten` with level 1
+ [fix GH-986] Patch @yui-knk
-Sat Jun 22 02:18:07 2013 Tanaka Akira <akr@fsij.org>
+Tue Aug 11 10:48:16 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * bignum.c (bary_pack): Specialized packers implemented.
- (HOST_BIGENDIAN_P): New macro.
- (ALIGNOF): New macro.
- (CLEAR_LOWBITS): New macro.
- (FILL_LOWBITS): New macro.
- (swap_bdigit): New macro.
- (bary_2comp): Returns an int.
+ * enum.c: added doc for Enumerable#zip
+ [fix GH-985] Patch by @yui-knk
+ * test/ruby/test_enum.rb: added tests for Enumerable#zip
+ [fix GH-985] Patch @yui-knk
- * internal.h (swap16): Moved from pack.c
- (swap32): Ditto.
- (swap64): Ditto.
+Tue Aug 11 10:33:26 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Fri Jun 21 21:29:49 2013 Masaya Tarui <tarui@ruby-lang.org>
+ * vm_method.c: typo fix [fix GH-993][ci skip] Patch by @0x0dea
+ * test/ruby/test_refinement.rb: ditto.
- * gc.c (typedef enum): Introduce flags of major gc reason.
- * gc.c (garbage_collect_body): Ditto.
- * gc.c (gc_profile_flags): Ditto.
- * gc.c (gc_profile_dump_on): Ditto.
+Sun Aug 9 14:15:54 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Jun 21 21:11:53 2013 Koichi Sasada <ko1@atdot.net>
+ * vm.c (Init_vm_objects, rb_vm_fstring_table): use frozen_strings
+ table in rb_vm_t. [ruby-core:70274] [Bug #11423]
- * gc.c (allocate_sorted_heaps): remove unused variable `add'.
+Sat Aug 8 03:59:51 2015 Zachary Scott <zzak@ruby-lang.org>
-Fri Jun 21 20:50:32 2013 Koichi Sasada <ko1@atdot.net>
+ * object.c: [DOC] Improve grammar for Module#===
+ Patch by @SkyBirdSoar in documenting-ruby/ruby#52:
+ https://github.com/documenting-ruby/ruby/pull/52
- * include/ruby/ruby.h: constify RArray::as::ary and RArray::heap::ptr.
- Use RARRAY_ASET() or RARRAY_PTR_USE() to modify Array objects.
+Sat Aug 8 03:39:33 2015 Zachary Scott <zzak@ruby-lang.org>
- * array.c, gc.c: catch up above changes.
+ * hash.c: [DOC] Improve description of symbol key syntax
+ Patch by Raphael Das Gupta in documenting-ruby/ruby#51:
+ https://github.com/documenting-ruby/ruby/pull/51
-Fri Jun 21 20:32:13 2013 Koichi Sasada <ko1@atdot.net>
+Fri Aug 7 21:04:19 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * vm_eval.c (eval_string_with_cref): fix WB miss.
+ * parse.y (parser_params): turn in_def and in_single into bit
+ flags and reduce the size by 2-words.
-Fri Jun 21 20:15:49 2013 Koichi Sasada <ko1@atdot.net>
+ * parse.y (parser_params): remove redundant prefixes.
- * include/ruby/ruby.h: support write barrier protection for T_STRUCT.
- Introduce the following C APIs:
- * RSTRUCT_RAWPTR(st) returns pointer (do WB on your risk).
- The type of returned pointer is (const VALUE *).
- * RSTRUCT_GET(st, idx) returns idx-th value of struct.
- * RSTRUCT_SET(st, idx, v) set idx-th value by v with WB.
- And
- * RSTRUCT_PTR(st) returns pointer with shady operation.
- The type of returned pointer is (VALUE *).
+ * parse.y (yylex): non-pure parser has not been supported since
+ merger of ripper. change argument types from void pointers.
- * struct.c, re.c, gc.c, marshal.c: rewrite with above APIs.
+Fri Aug 7 17:07:56 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Jun 21 19:38:37 2013 Tanaka Akira <akr@fsij.org>
+ * proc.c (method_super_method): uncallable method entry does not
+ have the defined class, use the owner instead.
+ [ruby-core:70254] [Bug #11419]
- * bignum.c (BDIGMAX): Use BIGRAD.
- (BIGLO): Use BDIGMAX.
- (bigdivrem1): Ditto.
- (bigor_int): Ditto.
- (rb_big_or): Ditto.
+ * test/ruby/test_method.rb (test_super_method_unbound): add test
+ by Akira Matsuda.
-Fri Jun 21 19:18:48 2013 Tanaka Akira <akr@fsij.org>
+Thu Aug 6 10:49:57 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * pack.c (pack_pack): Move the implementation for 'c' directive after
- pack_integer label.
+ * node.c (rb_alloc_tmp_buffer): round up the size and check the
+ range.
-Fri Jun 21 19:11:56 2013 Koichi Sasada <ko1@atdot.net>
+ * ruby_atomic.h (ATOMIC_VALUE_EXCHANGE, ATOMIC_VALUE_CAS): add
+ atomic operations for VALUE.
- * include/ruby/ruby.h, re.c: support write barrier for T_REGEXP.
+Thu Aug 6 08:15:49 2015 Aaron Patterson <tenderlove@ruby-lang.org>
- Note: T_MATCH object is also easy to support write barriers.
- However, most of T_MATCH objects are short-lived objects.
- So I skipped to support non-shady T_MATCH.
+ * ext/openssl/lib/openssl/ssl.rb (module OpenSSL): move
+ SSLSocket#sysclose to Ruby.
-Fri Jun 21 18:56:58 2013 Tanaka Akira <akr@fsij.org>
+ * ext/openssl/ossl_ssl.c (ossl_ssl_close): ditto
- * bignum.c (bigsub_int): Use bdigit_roomof.
- (bigadd_int): Ditto.
- (bigand_int): Ditto.
- (bigor_int): Ditto.
- (bigxor_int): Ditto.
+Thu Aug 6 07:57:21 2015 Aaron Patterson <tenderlove@ruby-lang.org>
-Fri Jun 21 17:56:25 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/openssl/lib/openssl/ssl.rb (module OpenSSL): move nonblock
+ enable to SSLSocket#initialize and remove Nonblock module.
- * benchmark/gc/gcbench.rb: fix summary of benchmark result notation.
+Thu Aug 6 07:53:47 2015 Aaron Patterson <tenderlove@ruby-lang.org>
-Fri Jun 21 16:38:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ * ext/openssl/lib/openssl/ssl.rb (module OpenSSL): move
+ OpenSSL::SSL::SSLSocket#initialize to Ruby.
- * ext/openssl/ossl_x509attr.c: change OSSL_X509ATTR_IS_SINGLE and
- OSSL_X509ATTR_SET_SINGLE macros to use ->value.set rather than
- ->set to fix compile failure
+ * ext/openssl/ossl_ssl.c: ditto
-Fri Jun 21 15:26:45 2013 Koichi Sasada <ko1@atdot.net>
+Thu Aug 6 02:25:31 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c (gc_sweep): profile sweep time correctly when LAZY_SWEEP is
- disabled.
+ * node.c (rb_alloc_tmp_buffer): use NODE_ALLOCA to mark locations
+ like as builtin alloca. [ruby-core:70251] [Bug #11418]
- * gc.c (gc_marks_test): store oldgen count and shady count
- before test marking and restore them after marking.
+Wed Aug 5 14:37:55 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Jun 21 15:07:42 2013 Koichi Sasada <ko1@atdot.net>
+ * transcode.c (rb_econv_open0): rb_econv_t::source_encoding_name
+ and rb_econv_t::destination_encoding_name should refer static
+ strings always or NULL. [ruby-core:70247] [Bug #11416]
- * gc.c: enable lazy sweep (commit miss).
+Tue Aug 4 16:53:43 2015 Aaron Patterson <tenderlove@ruby-lang.org>
-Fri Jun 21 14:31:29 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/openssl/lib/openssl/ssl.rb (module OpenSSL): extract callback
+ lookup to private Ruby methods. This means we can keep the default
+ DH callback logic hidden from consumers. Also, since the SSLSocket
+ always has a context, we can remove conditionals about that
+ instance.
- * hash.c (ruby_setenv): refine error message so include the variable
- name.
+ * ext/openssl/ossl_ssl.c: move callback lookup methods to private Ruby
+ methods.
-Fri Jun 21 14:15:08 2013 Koichi Sasada <ko1@atdot.net>
+Tue Aug 4 16:40:26 2015 Koichi Sasada <ko1@atdot.net>
- * gc.c: fix to use total_allocated_object_num and heaps_used
- at the GC time for profiler.
+ * test/ruby/test_module.rb: should not expect a method table ordering.
+ [Feature #11414]
-Fri Jun 21 12:35:35 2013 Koichi Sasada <ko1@atdot.net>
+Tue Aug 04 15:30:04 2015 Koichi Sasada <ko1@atdot.net>
- * gc.c: RGENGC_CHECK_MODE should be 0.
+ * proc.c (rb_block_clear_env_self): clear by Qfalse instead of Qnil.
+ [Bug #11409]
-Fri Jun 21 11:18:25 2013 Koichi Sasada <ko1@atdot.net>
+ * test/ruby/test_eval.rb: add tests for this issue,
+ written by @0x0dea.
+ https://github.com/ruby/ruby/pull/988
- * gc.c (gc_marks_body): fix to get `th' in this function.
+Tue Aug 4 12:12:14 2015 Eric Wong <e@80x24.org>
-Fri Jun 21 10:21:44 2013 Koichi Sasada <ko1@atdot.net>
+ * variable.c: wrap long lines
- * gc.c (heaps_header/heaps_slot): embed bitmaps into heaps_slot.
- no need to maintain allocation/free bitmaps.
+Tue Aug 4 09:32:30 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Fri Jun 21 09:22:16 2013 Koichi Sasada <ko1@atdot.net>
+ * proc.c: Removing duplicate doc [fix GH-987][ci skip]
+ Patch by @ronakjangir47
- * gc.c (slot_sweep_body): add counters at a time.
+Tue Aug 4 09:21:58 2015 Richard Schneeman <richard.schneeman+foo@gmail.com>
- * gc.c (gc_profile_dump_on): fix line break position.
+ * doc/contributing.rdoc: fixed wrong instructions with OS X
+ [fix GH-989][ci skip] Patch by @schneems
-Fri Jun 21 08:14:00 2013 Masaya Tarui <tarui@ruby-lang.org>
+Mon Aug 3 10:08:33 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c: refactoring bitmaps. introduce bits_t type and some Consts.
+ * re.c (rb_memsearch): should match only char boundaries in wide
+ character encodings. [ruby-core:70220] [Bug #11413]
-Fri Jun 21 08:04:32 2013 Koichi Sasada <ko1@atdot.net>
+Sun Aug 2 07:01:17 2015 Eric Wong <e@80x24.org>
- * gc.c: fix to support USE_RGENGC == 0 (disable RGenGC).
- If USE_RGENGC==0, it caused compilation error.
+ * ext/openssl/lib/openssl/buffering.rb (gets):
+ avoid comparing fixnum with nil
+ * test/openssl/test_pair.rb: test gets with limit when EOF is hit
+ Thanks to Bar Hofesh <bar.hofesh@safe-t.com> for the bug report
+ and testing.
+ [ruby-core:70149] [Bug #11400]
-Fri Jun 21 08:08:11 2013 Masaya Tarui <tarui@ruby-lang.org>
+Sat Aug 1 17:13:15 2015 Kazuki Tsujimoto <kazuki@callcc.net>
- * gc.c (lazy_sweep): Use is_lazy_sweeping()
- * gc.c (rest_sweep): Ditto.
- * gc.c (gc_prepare_free_objects): Ditto.
+ * lib/net/http/response.rb (Net::HTTPResponse::Inflater#finish):
+ fix a bug that empty gzipped response body causes Zlib::BufError.
+ [ruby-core:68846] [Bug #11058]
-Fri Jun 21 07:34:47 2013 Koichi Sasada <ko1@atdot.net>
+ * test/net/http/test_httpresponse.rb: tests for the above.
- * gc.c (gc_profile_record::oldgen_objects): added.
+Sat Aug 1 17:05:18 2015 Kazuki Tsujimoto <kazuki@callcc.net>
- * gc.c (gc_profile_dump_on): print the following information:
- * Living object counts
- * Free object counts
- If RGENGC_PROFILE > 0 then
- * Oldgen object counts
- * Remembered normal object counts
- * Remembered shady object counts
+ * lib/net/http/response.rb (Net::HTTPResponse#inflater):
+ fix TypeError. An exception object might be nil.
+ [ruby-core:68846] [Bug #11058]
-Fri Jun 21 06:43:59 2013 Tanaka Akira <akr@fsij.org>
+Sat Aug 1 09:09:46 2015 Aaron Patterson <tenderlove@ruby-lang.org>
- * bignum.c (rb_ull2big): Refactored.
- (rb_uint2big): Useless code removed.
+ * ext/openssl/ossl_ssl.c (ossl_sslctx_setup): Implement
+ SSLContext#options and options= using SSL_CTX_set_options and
+ SSL_CTX_get_options. This reduces the number of ivars we need and
+ simplifies `ossl_sslctx_setup`.
-Fri Jun 21 05:37:39 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/openssl/lib/openssl/ssl.rb (module OpenSSL): Default `options`
+ to SSL_OP_ALL
- * gc.c (gc_prof_sweep_timer_stop): accumulate sweep time only when
- record->gc_time > 0.
+Sat Aug 1 06:54:36 2015 Aaron Patterson <tenderlove@ruby-lang.org>
-Fri Jun 21 00:37:31 2013 Tanaka Akira <akr@fsij.org>
+ * ext/openssl/ossl_ssl.c (Init_ossl_ssl): OpenSSL declares these
+ constants as longs, so we should follow that and use LONG2NUM.
+ http://git.io/vOqxD
- * ext/bigdecimal: Workaround fix for bigdecimal test failures caused
- by [ruby-dev:47413] [Feature #8509]
+Sat Aug 1 04:06:29 2015 Aaron Patterson <tenderlove@ruby-lang.org>
- * ext/bigdecimal/bigdecimal.h (BDIGIT): Make it independent from the
- definition for bignum.c.
- (SIZEOF_BDIGITS): Ditto.
- (BDIGIT_DBL): Ditto.
- (BDIGIT_DBL_SIGNED): Ditto.
- (PRI_BDIGIT_PREFIX): Undefine the definition.
- (PRI_BDIGIT_DBL_PREFIX): Ditto.
+ * ext/openssl/ossl_ssl.c (ossl_call_tmp_dh_callback): change callback
+ to return the Ruby dh (or ecdh) object that the caller cares about
+ instead of doing rb_iv_get / set to communicate. This means we can
+ remove an rb_iv_get call, and only use the set calls for their
+ intended purpose (to prevent the object from being GC'd).
- * ext/bigdecimal/bigdecimal.c (RBIGNUM_ZERO_P): Use rb_bigzero_p.
- (bigzero_p): Removed.
- (is_even): Use rb_big_pack.
+ * ext/openssl/ossl_ssl.c (ossl_tmp_dh_callback): ditto
+ * ext/openssl/ossl_ssl.c (ossl_call_tmp_ecdh_callback): ditto
+ * ext/openssl/ossl_ssl.c (ossl_tmp_ecdh_callback): ditto
-Thu Jun 20 22:52:42 2013 Tanaka Akira <akr@fsij.org>
+Sat Aug 1 03:49:31 2015 Aaron Patterson <tenderlove@ruby-lang.org>
- * bignum.c (bigmul1_toom3): Don't call bignorm twice.
+ * ext/openssl/ossl_ssl.c (ossl_call_tmp_dh_callback): Similarly to the
+ tmp_ecdh_callback, the SSLSocket instance always holds a reference
+ to the SSLContext object (it's always set in `initialize`). The
+ SSLContext holds a reference to the tmp_dh_callback. Ask the
+ context for the callback instead of storing the callback in two
+ places.
-Thu Jun 20 22:49:27 2013 Tanaka Akira <akr@fsij.org>
+Sat Aug 1 03:43:10 2015 Aaron Patterson <tenderlove@ruby-lang.org>
- * bignum.c (bignorm): Don't call bigtrunc if the result is a fixnum.
+ * ext/openssl/ossl_ssl.c (ossl_call_tmp_dh_callback): create an array
+ and use `rb_apply` to clean up calls to `rb_protect`.
-Thu Jun 20 22:29:42 2013 Tanaka Akira <akr@fsij.org>
+ * ext/openssl/ossl_ssl.c (ossl_tmp_dh_callback): ditto
- * bignum.c (rb_uint2big): Refactored.
+Sat Aug 1 03:27:12 2015 Aaron Patterson <tenderlove@ruby-lang.org>
-Thu Jun 20 22:24:41 2013 Tanaka Akira <akr@fsij.org>
+ * ext/openssl/ossl_ssl.c (ossl_call_tmp_ecdh_callback): The SSL socket
+ always holds a reference to the SSLContext object, which will have
+ the callback object. Ask the context for the callback instead of
+ storing the callback in two places.
- * bignum.c (dump_bignum): Use SIZEOF_BDIGITS.
+Sat Aug 1 03:14:07 2015 Aaron Patterson <tenderlove@ruby-lang.org>
-Thu Jun 20 22:22:46 2013 Tanaka Akira <akr@fsij.org>
+ * ext/openssl/lib/openssl/ssl.rb (module OpenSSL): convert
+ `tmp_dh_callback` to Ruby, and call it when setting up an SSL
+ connection. This allows us to move the "default" behavior to the
+ reader method.
- * bignum.c (big2ulong): Change the return type to unsigned long.
- (rb_big2ulong_pack): Follow the above change.
- (rb_big2long): Ditto.
- (rb_big_lshift): Ditto.
- (rb_big_rshift): Ditto.
- (rb_big_aref): Ditto.
+ * ext/openssl/ossl_ssl.c: call the tmp_dh_callback instead of
+ accessing the SSLContext's internals.
-Thu Jun 20 22:02:46 2013 Tanaka Akira <akr@fsij.org>
+Fri Jul 31 23:34:27 2015 Aaron Patterson <tenderlove@ruby-lang.org>
- * bignum.c (bary_unpack_internal): Return -2 when negative overflow.
- (bary_unpack): Set the overflowed bit if an extra BDIGIT exists.
- (rb_integer_unpack): Set the overflowed bit.
+ * .travis.yml: update libssl before running tests.
+ Thanks to Chris Sinjakli <chris@sinjakli.co.uk> for figuring out the
+ travis settings!
-Thu Jun 20 21:17:19 2013 Koichi Sasada <ko1@atdot.net>
+Fri Jul 31 21:34:49 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c (rgengc_rememberset_mark): record
- (1) normal objects count in remember set
- (2) shady objects count in remember set
- each GC timing.
+ * load.c (rb_require_internal): use rb_load_internal0 not to raise
+ a exception to be caught.
- * gc.c (gc_profile_record_get): enable to access above information
- and REMOVING_OBJECTS, EMPTY_OBJECTS.
+Thu Jul 30 13:19:54 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Jun 20 18:29:26 2013 Koichi Sasada <ko1@atdot.net>
+ * variable.c (rb_const_get_0): warn deprecated constant reference.
- * benchmark/gc/gcbench.rb: Do not use GC::Profiler::disable because
- GC::Profiler::disable prohibit to access profiling data. It should
- be spec bug.
+ * variable.c (rb_mod_deprecate_constant): mark constants to be
+ warned as deprecated. [Feature #11398]
- Skip GC::Profiler::report if RUBY_VERSION < '2.0.0'
+Thu Jul 30 11:53:54 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Jun 20 17:59:08 2013 Koichi Sasada <ko1@atdot.net>
+ * thread.c (rb_thread_s_handle_interrupt): make identity hash, to
+ compare masking classes just by their IDs.
- * benchmark/gc/gcbench.rb: stop GC::Profiler before output results.
- Generating GC::Profiler result under profiling causes infinite loop.
+Thu Jul 30 11:52:55 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Jun 20 17:24:24 2013 Koichi Sasada <ko1@atdot.net>
+ * load.c (rb_load_internal0): stop separating exits at loading
+ from exits from execution. TAG_FATAL is the only case that
+ `errinfo` is a Fixnum, and should continue to exit by JUMP_TAG
+ but not raising as an ordinary exception.
+ [ruby-core:70169] [Bug #11404]
- * benchmark/gc/gcbench.rb: don't use __dir__ to make compatible
- with ruby 1.9.3.
+Thu Jul 30 10:42:27 2015 Alex Dowad <alexinbeijing@gmail.com>
-Thu Jun 20 16:57:19 2013 Koichi Sasada <ko1@atdot.net>
+ * load.c (rb_load_internal0): extra check before returning
+ TAG_RAISE when a non-local transfer of control happens while
+ loading and parsing a Ruby source file.
+ [ruby-core:70169] [Bug #11404]
- * benchmark/bm_app_aobench.rb: use attr_accessor/reader instead of
- defining methods.
+Thu Jul 30 08:48:42 2015 Eric Wong <e@80x24.org>
-Thu Jun 20 16:46:46 2013 Koichi Sasada <ko1@atdot.net>
+ * st.c (find_entry): constify st_table*
+ (find_packed_index_from): ditto
+ (find_packed_index): ditto
+ (get_keys): ditto
+ (get_values): ditto
- * benchmark/bm_app_aobench.rb: added.
+Thu Jul 30 04:29:25 2015 Eric Wong <e@80x24.org>
- * benchmark/gc/aobench.rb: added.
+ * benchmark/bm_hash_aref_dsym.rb: new benchmark
+ * benchmark/bm_hash_aref_dsym_long.rb: ditto
+ * benchmark/bm_hash_aref_fix.rb: ditto
-Thu Jun 20 16:28:33 2013 Koichi Sasada <ko1@atdot.net>
+Wed Jul 29 21:38:41 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * benchmark/bm_so_binary_trees.rb: disable `puts' method
- and change iteration parameter to increase execution time.
+ * hash.c (any_hash), symbol.c (dsymbol_alloc): fix dynamic symbol
+ hash value by restricting in Fixnum range, that is `long`.
- * benchmark/gc/binarytree.rb: added.
+Wed Jul 29 17:25:46 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Jun 20 16:06:37 2013 Koichi Sasada <ko1@atdot.net>
+ * hash.c (rb_obj_hash): move in order to share with rb_any_hash.
- * benchmark/gc/pentomino.rb: added.
- Simply load pentomino puzzle in the benchmark/ directory.
+Wed Jul 29 16:00:22 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Jun 20 15:32:56 2013 Koichi Sasada <ko1@atdot.net>
+ * string.c (str_buf_cat): consider empty non-embed string case,
+ not to loop infinitely. [ruby-core:70074] [Bug #11383]
- * benchmark/gc/redblack.rb: import red black tree benchmark from
- https://github.com/jruby/rubybench/blob/master/time/bench_red_black.rb
+Wed Jul 29 15:25:19 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * benchmark/gc/ring.rb: add a benchmark. This benchmark create many
- old objects.
+ * vm_eval.c (send_internal): set method_missing_reason before
+ invoking overriding method_missing method so that the default
+ method_missing can achieve it properly.
+ [ruby-core:68515] [Bug #10969]
-Thu Jun 20 15:14:00 2013 Koichi Sasada <ko1@atdot.net>
+Wed Jul 29 14:54:16 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * benchmark/gc: create a directory to store GC related benchmark.
+ * hash.c (rb_sym_hash): return same value as rb_any_hash() of
+ Symbol. [Bug #9381]
- * benchmark/gc/gcbench.rb: moved from tool/gcbench.rb.
+ * hash.c (rb_any_hash): fix Float hash. rb_dbl_hash() returns a
+ Fixnum, but not a long. [Bug #9381]
- * benchmark/gc/hash(1|2).rb: ditto.
+Wed Jul 29 11:07:10 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * benchmark/gc/rdoc.rb: ditto.
+ * internal.h (LIKELY, UNLIKELY): make a boolean to enforce 1 or 0.
- * benchmark/gc/null.rb: added.
+Wed Jul 29 10:44:43 2015 Alex Dowad <alexinbeijing@gmail.com>
- * common.mk: fix rule.
+ * gc.c: document argument passed to finalizer proc.
+ [fix GH-976][ci skip] Patch by @alexdowad
-Thu Jun 20 14:09:54 2013 Koichi Sasada <ko1@atdot.net>
+Wed Jul 29 10:36:58 2015 NARUSE, Yui <naruse@ruby-lang.org>
- * tool/hashbench1.rb: fix parameter too. Increase temporary objects.
+ * io.c (rb_io_extract_modeenc): add option parameter `flags'
+ to append extra oflags to normal mode.
+ [Feature #11253] [ruby-core:69539]
-Thu Jun 20 14:01:35 2013 Koichi Sasada <ko1@atdot.net>
+Wed Jul 29 04:54:47 2015 Eric Wong <e@80x24.org>
- * tool/hashbench1.rb: fix parameters.
+ * test/rubygems/test_gem_remote_fetcher.rb: pre-generate test key
+ [ruby-core:70151] [Bug #11397]
-Thu Jun 20 14:00:34 2013 Koichi Sasada <ko1@atdot.net>
+Tue Jul 28 10:32:09 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * common.mk: remove dependency from ruby.
+ * internal.h (struct RClass): moved from ruby/ruby.h to hide the
+ internals.
-Thu Jun 20 13:14:06 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Jul 28 08:48:29 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * error.c (rb_check_backtrace): evaluate RARRAY_AREF only once.
- the first argument of RB_TYPE_P is expanded twice for non-immediate
+ * configure.in (RUBY_TYPE_ATTRIBUTE): attribute declaration for
types.
-Thu Jun 20 08:09:29 2013 Koichi Sasada <ko1@atdot.net>
-
- * tool/gcbench.rb: Summary in one line.
-
- * common.mk: separate gcbench-hash to gcbench-hash1 and gcbench-hash2.
-
-Thu Jun 20 08:07:23 2013 Tanaka Akira <akr@fsij.org>
-
- * bignum.c (BIGSIZE): New macro.
- (bigfixize): Use BIGSIZE.
- (big2ulong): Ditto.
- (check_shiftdown): Ditto.
- (rb_big_aref): Ditto.
-
-Thu Jun 20 07:46:48 2013 Masaya Tarui <tarui@ruby-lang.org>
-
- * gc.c (rb_gc_writebarrier): give up rescan A and register B directly
- if A has huge number of children.
-
-Thu Jun 20 07:30:35 2013 Koichi Sasada <ko1@atdot.net>
-
- * common.mk: add new rules `gcbench-rdoc', `gcbench-hash'.
-
- * tool/gcbench.rb: separate GC bench framework and process.
-
- * tool/hashbench1.rb, tool/hashbench2.rb: add two types GC bench.
- hashbench1: many temporal objects (GC by newobj)
- hashbench2: hash size becomes bigger and bigger (GC by malloc)
- Two benches are executed by `gcbench-hash' rule.
-
- * tool/rdocbench.rb: separated.
-
-Thu Jun 20 06:25:39 2013 Koichi Sasada <ko1@atdot.net>
-
- * tool/rdocbench.rb: add summary.
-
-Thu Jun 20 06:18:01 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c (gc_profile_total_time): check objspace->profile.next_index > 0.
-
-Thu Jun 20 05:47:41 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c (gc_prof_sweep_timer_start): fix merge miss.
-
- * gc.c (GC_PROFILE_MORE_DETAIL): set it 0.
-
-Thu Jun 20 05:38:56 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c: Accumulate sweep time to GC time.
- Now [GC time] is [mark time] + [sweep time] + [misc].
- ([GC time] >= [mark time] + [sweep time])
-
- * gc.c (gc_prof_sweep_slot_timer_start/stop): rename to
- gc_prof_sweep_timer_start/stop and locate at lazy_sweep().
-
- * gc.c (elapsed_time_from): add a utility function.
-
-Thu Jun 20 05:08:53 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c (gc_marks): fix wrong option. FALSE means major/full GC.
- It should be TRUE (minor marking).
-
-Thu Jun 20 02:44:45 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * win32/win32.c (waitpid): should not return 0 but wait until exit
- unless WNOHANG is given. waiting huge process may return while
- active, for some reason.
-
-Thu Jun 20 01:34:15 2013 Tanaka Akira <akr@fsij.org>
-
- * bignum.c (bdigit_roomof): Use SIZEOF_BDIGITS.
- (bigfixize): Refine an ifdef condition.
- (rb_absint_size): Use bdigit_roomof.
- (rb_absint_singlebit_p): Ditto.
- (rb_integer_pack): Ditto.
- (integer_pack_fill_dd): Use BITSPERDIG.
- (integer_unpack_push_bits): Use BITSPERDIG, BIGLO and BIGDN.
-
-Thu Jun 20 01:07:39 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * gc.c (MARKED_IN_BITMAP, FL_TEST2): return boolean value since always
- used as boolean value.
-
- * gc.c (MARK_IN_BITMAP, CLEAR_IN_BITMAP): evaluate bits once.
-
-Thu Jun 20 00:05:07 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c (RVALUE_PROMOTED): fix type.
-
-Wed Jun 19 23:39:01 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c (gc_marks_test): rewrite checking code.
- When RGENGC_CHECK_MODE >= 2, all minor marking, run normal minor
- marking *and* major/full marking. After that, compare the results
- and shows BUG if a object living with major/full marking but dead
- with minor marking.
- After detecting bugs, print references information.
- (RGENGC_CHECK_MODE == 2, show references to dead object)
- (RGENGC_CHECK_MODE == 3, show all references)
-
-Wed Jun 19 23:51:48 2013 Tanaka Akira <akr@fsij.org>
-
- * bignum.c (bigfixize): Use rb_absint_size.
- (check_shiftdown): Ditto.
- (big2ulong): Use bdigit_roomof.
-
-Wed Jun 19 23:32:23 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c (RVALUE_PROMOTED): check consistency between oldgen flag and
- oldgen bitmap if RGENGC_CHECK_MODE > 0.
-
-Wed Jun 19 23:29:29 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c (rb_gc_force_recycle): clear oldgen bitmap, too.
-
-Wed Jun 19 21:02:13 2013 Tanaka Akira <akr@fsij.org>
-
- * bignum.c (rb_uint2big): Consider environments BDIGIT is bigger than
- long.
- (big2ulong): Ditto.
- (rb_big_aref): Ditto.
- (rb_big_pack): Just call rb_integer_pack.
- (rb_big_unpack): Just call rb_integer_unpack.
-
-Wed Jun 19 20:51:21 2013 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-
- * gc.c (gc_stress_get): GC.stress can be Fixnum.
-
-Wed Jun 19 19:31:30 2013 Tanaka Akira <akr@fsij.org>
-
- * bignum.c (DIGSPERLONG): Don't define if BDIGIT is bigger than long.
- (DIGSPERLL): Don't define if BDIGIT is bigger than LONG_LONG
- (rb_absint_size): Consider environments BDIGIT is bigger than long.
- Use BIGLO and BIGDN.
- (rb_absint_singlebit_p): Ditto.
- (rb_integer_pack): Ditto.
- (bigsub_int): Consider environments BDIGIT is bigger than long.
- Use SIZEOF_BDIGITS instead of sizeof(BDIGIT).
- (bigadd_int): Ditto.
- (bigand_int): Ditto.
- (bigor_int): Ditto.
- (bigxor_int): Ditto.
-
-Wed Jun 19 15:14:30 2013 Koichi Sasada <ko1@atdot.net>
-
- * include/ruby/ruby.h (struct rb_data_type_struct), gc.c: add
- rb_data_type_struct::flags. Now, this flags is passed
- at T_DATA object creation. You can specify FL_WB_PROTECTED
- on this flag.
-
- * iseq.c: making non-shady iseq objects.
-
- * class.c, compile.c, proc.c, vm.c: add WB for iseq objects.
-
- * vm_core.h, iseq.h: constify fields to detect WB insertion.
-
-Wed Jun 19 15:11:13 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * gc.c (gc_mark_children): show more info for broken object.
-
-Wed Jun 19 14:04:41 2013 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-
- * test/ruby/envutil.rb (EnvUtil#rubybin): remove unnecessary
- unless expression.
-
-Wed Jun 19 07:47:48 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c (garbage_collect_body): use FIX2INT for ruby_gc_stress.
-
-Wed Jun 19 07:44:31 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c (rb_objspace::gc_stress): int -> VALUE to store Fixnum object.
-
-Wed Jun 19 07:25:35 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c (make_deferred): clear flags to T_ZOMBIE.
-
- * gc.c (slot_sweep_body): fix indent.
-
-Wed Jun 19 07:18:47 2013 Tanaka Akira <akr@fsij.org>
-
- * bignum.c (rb_big_aref): Apply BIGLO to ~xds[i] for environment which
- BDIGIT is 16bit.
-
-Wed Jun 19 07:09:26 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c (rgengc_remember): fix output level.
-
- * gc.c (rgengc_rememberset_mark): fix to output clear count.
- (shady_object_count + clear_count = count of remembered objects)
-
-Wed Jun 19 07:06:21 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c (rgengc_remember): check T_NONE and T_ZOMBIE
- if RGENGC_CHECK_MODE > 0.
-
-Wed Jun 19 07:02:19 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c (RGENGC_CHECK_MODE): add new check mode `3'.
- In this mode, show all references if there is
- a miss-corrected object.
-
-Wed Jun 19 06:31:08 2013 Koichi Sasada <ko1@atdot.net>
-
- * gc.c (gc_stress_set): add special option of GC.stress.
- `GC.stress=(flag)' accepts integer to control behavior of GC.
- See code for details. Of course, this feature is only for MRI.
-
- You can debug RGenGC (WB) using `GC.stress = 1'.
- Using this option, do minor marking at all possible places.
-
- GC::STRESS_MINOR_MARK = 1 and GC::STRESS_LAZY_SWEEP = 2
- seem good to add.
-
-Wed Jun 19 06:29:31 2013 Koichi Sasada <ko1@atdot.net>
-
- * vm.c (kwmerge_i): add WB.
-
-Wed Jun 19 06:26:49 2013 Koichi Sasada <ko1@atdot.net>
-
- * hash.c: `st_update()' also has same issue of last fix.
- write barriers at callback function are too early.
- All write barriers are executed after `st_update()'
-
-Wed Jun 19 04:33:22 2013 Koichi Sasada <ko1@atdot.net>
-
- * variable.c (rb_const_set): fix WB miss.
-
- WBs had located before creating reference between a klass
- and constant value. It causes GC bug.
-
- # pseudo code:
- WB(klass, value); # WB and remember klass
- st_insert(klass->const_table, const_id, value);
-
- `st_insert()' can cause GC before inserting `value' and
- forget `klass' from the remember set. After that, relationship
- between `klass' and `value' are created with constant table.
- Now, `value' can be young (shady) object and `klass' can be old
- object, without remembering `klass' object.
- At the next GC, old `klass' object will be skipped and
- young (shady) `value' will be miss-collected. -> GC bug
-
- Lesson: The place of a WB is important.
-
-Tue Jun 18 22:01:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
-
- * vm_insnhelper.c (vm_call_method): ensure methods of type
- VM_METHOD_TYPE_ATTR_SET are called with 1 argument
-
- * test/ruby/test_module.rb
- (TestModule#test_attr_writer_with_no_arguments): add test
- [ruby-core:55543] [Bug #8540]
-
-Tue Jun 18 22:36:23 2013 Masaya Tarui <tarui@ruby-lang.org>
-
- * gc.c (gc_profile_record_flag): fix typo.
-
-Tue Jun 18 22:08:53 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * ext/objspace/object_tracing.c: Return for ::allocation_generation
-
-Tue Jun 18 22:04:35 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * ext/objspace/object_tracing.c: Document object_tracing methods.
-
-Tue Jun 18 21:58:17 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * gc.c: Rename rb_mObSpace -> rb_mObjSpace
-
-Tue Jun 18 20:55:05 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * ext/objspace/objspace.c: Document ObjectSpace::InternalObjectWrapper.
-
-Tue Jun 18 20:39:04 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * ext/objspace/object_tracing.c: Teach rdoc object_tracing.c [Bug #8537]
-
-Tue Jun 18 20:29:47 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * ext/.document: add object_tracing.c to document file
+Tue Jul 28 07:23:03 2015 Eric Wong <e@80x24.org>
-Tue Jun 18 20:20:27 2013 Zachary Scott <zachary@zacharyscott.net>
+ * symbol.h (struct RSymbol): add hashval field
+ * symbol.c (dsymbol_alloc): setup hashval field once
+ * hash.c (rb_any_hash): return RSymbol->hashval directly
+ * common.mk: hash.o depends on symbol.h
+ Thanks to Bruno Escherl <bruno@escherl.net> for the bug report
+ [ruby-core:70129] [Bug #11396]
- * ext/objspace/objspace.c: rdoc on require to overview from r41355
+Tue Jul 28 03:26:15 2015 Aaron Patterson <tenderlove@ruby-lang.org>
-Tue Jun 18 18:39:58 2013 Tanaka Akira <akr@fsij.org>
+ * ext/openssl/lib/openssl/ssl.rb (module OpenSSL): raise a more
+ helpful exception when verifying the peer connection and an
+ anonymous cipher has been selected. [ruby-core:68330] [Bug #10910]
+ Thanks to Chris Sinjakli <chris@sinjakli.co.uk> for the patch.
- * configure.in: Check __int128.
+ * test/openssl/test_ssl.rb (class OpenSSL): test for change
- * include/ruby/defines.h (BDIGIT_DBL): Use uint128_t if it is available.
- (BDIGIT): Use uint64_t if uint128_t is available.
- (SIZEOF_BDIGITS): Defined for above case.
- (BDIGIT_DBL_SIGNED): Ditto.
- (PRI_BDIGIT_PREFIX): Ditto.
+Mon Jul 27 13:24:11 2015 Koichi Sasada <ko1@atdot.net>
- * include/ruby/ruby.h (PRI_64_PREFIX): Defined.
+ * template/id.h.tmpl (ID2ATTRSET): remove an unused macro.
- * bignum.c (rb_big_pow): Don't use BITSPERDIG for the condition which
- rb_big_pow returns Float or Bignum.
+Mon Jul 27 12:21:15 2015 NAKAMURA Usaku <usa@ruby-lang.org>
- [ruby-dev:47413] [Feature #8509]
+ * test/openssl/test_ssl.rb: run tests on non-Unix platforms.
-Tue Jun 18 16:43:44 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sun Jul 26 19:21:31 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * parse.y (parser_heredoc_restore): clear lex_strterm always to get
- rid of marking recycled node. this bug is revealed by r41372 with
- GC.stress=true.
+ * ext/openssl/ossl_ssl.c (ossl_ssl_alpn_protocol): fix condition
+ to compile, needs ALPN to be available. [Feature #9390]
-Tue Jun 18 12:53:25 2013 Tanaka Akira <akr@fsij.org>
+Sun Jul 26 11:29:01 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * bignum.c (nlz): Cast the result explicitly.
- (big2dbl): Don't assign BDIGIT values to int variable.
+ * signal.c (default_handler, Init_signal): discard SIGSYS, ENOSYS
+ should raise a SystemCallError always instead.
-Tue Jun 18 12:25:16 2013 Tanaka Akira <akr@fsij.org>
+Sun Jul 26 10:26:35 2015 Aaron Patterson <tenderlove@ruby-lang.org>
- * bignum.c (rb_big_xor): Non-effective code removed.
+ * ext/openssl/ossl_ssl.c (ossl_call_servername_cb): set the ssl context
+ object returned by the servername callback on to the socket as an
+ instance variable. If the callback allocated a new context object
+ and didn't keep a reference to it, it could be GC'd out from under
+ the socket object.
-Tue Jun 18 11:26:05 2013 Koichi Sasada <ko1@atdot.net>
+ * test/openssl/test_ssl.rb (class OpenSSL): test for change.
- * gc.c (gc_stat): add `generated_normal_object_count_types' for
- RGENGC_PROFILE >= 2.
+Sun Jul 26 10:07:26 2015 Aaron Patterson <tenderlove@ruby-lang.org>
-Tue Jun 18 11:02:18 2013 Koichi Sasada <ko1@atdot.net>
+ * test/openssl/test_ssl.rb (class OpenSSL): add test coverage around
+ OpenSSL::SSL::SSLContext#servername_cb
- * gc.c (gc_mark_maybe): check to skip T_NONE.
+Sun Jul 26 09:10:32 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * gc.c (markable_object_p): do not need to check (flags == 0) here.
+ * gems/bundled_gems: update latest version of bundled power_assert.
-Tue Jun 18 10:17:37 2013 Koichi Sasada <ko1@atdot.net>
+Sun Jul 26 08:49:28 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * variable.c (rb_autoload): fix WB miss.
+ * test/rubygems/test_gem_remote_fetcher.rb: backport rubygems upstream
+ change for OpenSSL key length. see detail to
+ https://github.com/rubygems/rubygems/pull/1290
-Tue Jun 18 04:20:18 2013 Koichi Sasada <ko1@atdot.net>
+Sun Jul 26 08:33:03 2015 Aaron Patterson <tenderlove@ruby-lang.org>
- * gc.c (gc_mark_children): don't need to care about T_ZOMBIE here.
+ * ext/openssl/lib/openssl/pkey.rb: implement DEFAULT_512 and
+ DEFAULT_1024 constants in Ruby.
-Mon Jun 17 22:16:02 2013 Kazuki Tsujimoto <kazuki@callcc.net>
+ * ext/openssl/lib/openssl/ssl.rb (module OpenSSL): Ask PKey for the
+ default DH callback since it already must check whether openssl has
+ been compiled with DH support.
- * test/ruby/test_proc.rb (TestProc#test_block_given_method_to_proc):
- run test for r41359.
+ * ext/openssl/ossl_pkey_dh.c (OSSL_PKEY_BN): Remove C definitions of
+ DEFAULT_512 and DEFAULT_1024
-Mon Jun 17 21:42:18 2013 Kazuki Tsujimoto <kazuki@callcc.net>
+ * ext/openssl/ossl_pkey_dh.c (Init_ossl_dh): ditto
- * include/ruby/ruby.h, vm_eval.c (rb_funcall_with_block):
- new function to invoke a method with a block passed
- as an argument.
+ * test/openssl/test_pkey_dh.rb (class OpenSSL): add test to ensure the
+ Ruby definitions are the same as the C definitions were.
- * string.c (sym_call): use the above function to avoid
- a block sharing. [ruby-dev:47438] [Bug #8531]
+Sun Jul 26 08:14:59 2015 Aaron Patterson <tenderlove@ruby-lang.org>
- * vm_insnhelper.c (vm_yield_with_cfunc): don't set block
- in the frame.
+ * ext/openssl/lib/openssl/ssl.rb (module OpenSSL): support
+ specifically setting the tmp_dh_callback to nil.
- * test/ruby/test_symbol.rb (TestSymbol#test_block_given_to_proc):
- run related tests.
+ * ext/openssl/ossl_ssl.c (Init_ossl_ssl): ditto
-Mon Jun 17 21:33:27 2013 Kazuki Tsujimoto <kazuki@callcc.net>
+ * test/openssl/test_pair.rb (module OpenSSL): add a test
- * include/ruby/intern.h, proc.c (rb_method_call_with_block):
- new function to invoke a Method object with a block passed
- as an argument.
+Sun Jul 26 07:47:14 2015 Aaron Patterson <tenderlove@ruby-lang.org>
- * proc.c (bmcall): use the above function to avoid a block sharing.
- [ruby-core:54626] [Bug #8341]
+ * ext/openssl/lib/openssl/ssl.rb (module OpenSSL): move the default
+ tmp_dh_callback Ruby code and set it as a default in `initialize`.
- * test/ruby/test_proc.rb (TestProc#test_block_persist_between_calls):
- run related tests.
+ * ext/openssl/ossl_pkey_dh.c (static unsigned char DEFAULT_DH_512_GEN):
+ move this constant to Ruby.
-Mon Jun 17 20:53:21 2013 Tanaka Akira <akr@fsij.org>
+ * ext/openssl/ossl_pkey_dh.c (static unsigned char DEFAULT_DH_1024_GEN):
+ ditto
- * loadpath.c (RUBY_REVISION): Defined to suppress revision.h
- inclusion actually. r41352 removes the dependency.
+ * ext/openssl/ossl_pkey_dh.c (Init_ossl_dh): ditto
-Mon Jun 17 18:15:57 2013 Benoit Daloze <eregontp@gmail.com>
+ * ext/openssl/ossl_ssl.c (ossl_tmp_dh_callback): ditto
- * ext/objspace/objspace.c: let rdoc know about objspace methods.
- Specify 'objspace' should be required. See #8537.
+ * ext/openssl/ossl_ssl.c (ossl_sslctx_setup): tmp_dh_callback should
+ always be set, so we can remove this conditional
-Mon Jun 17 17:44:31 2013 Benoit Daloze <eregontp@gmail.com>
+Sun Jul 26 06:22:24 2015 Aaron Patterson <tenderlove@ruby-lang.org>
- * gc.c (ObjectSpace): is a module not a class.
+ * test/openssl/test_pair.rb: add a test ensuring that the default DH
+ callback is used when no DH callback is specified.
- * ext/objspace/objspace.c: try to include overview in rdoc,
- see #8537.
+Sun Jul 26 04:08:27 2015 Aaron Patterson <tenderlove@ruby-lang.org>
-Mon Jun 17 17:38:24 2013 Benoit Daloze <eregontp@gmail.com>
+ * ext/openssl/lib/openssl/ssl.rb (module OpenSSL): add missing
+ instance variables to squash warnings with alpn.
- * gc.c: fix example of ObjectSpace.define_finalizer in overview
+Sun Jul 26 03:42:19 2015 Aaron Patterson <tenderlove@ruby-lang.org>
-Mon Jun 17 16:59:53 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/openssl/lib/openssl/ssl.rb (module OpenSSL): move
+ OpenSSL::SSL::SSLContext#initialize implementation to pure Ruby.
- * ext/tk/tkutil/tkutil.c: use rb_sprintf(), rb_id2str(), and
- rb_intern_str() instead of rb_intern() and RSTRING_PTR() with
- RB_GC_GUARD(), to prevent temporary objects from GC.
- [ruby-core:39000] [Bug #5199]
+ * ext/openssl/ossl_ssl.c (ossl_sslctx_initialize): ditto
-Mon Jun 17 14:27:54 2013 Zachary Scott <zachary@zacharyscott.net>
+ * ext/openssl/ossl_ssl.c (Init_ossl_ssl): ditto
- * vm_backtrace.c: Update rdoc for Backtrace#label with @_ko1
+Sat Jul 25 21:03:45 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Jun 17 13:04:01 2013 Akinori MUSHA <knu@iDaemons.org>
+ * random.c (fill_random_bytes_syscall): get rid of blocking when
+ no entropy is available. based on the patch by mame in
+ [ruby-core:70114]. [Bug #11395]
- * tool/ifchange (until): Fix the condition, although harmless in
- this case.
+Sat Jul 25 11:05:31 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Jun 17 11:50:29 2013 Koichi Sasada <ko1@atdot.net>
+ * string.c (str_replace_shared_without_enc): fill the terminator
+ of embedded strings in wide char encodings.
- * gc.c (gc_mark_maybe): added. check `is_pointer_to_heap()' and
- type is not T_ZOMBIE.
+Sat Jul 25 06:38:36 2015 Koichi Sasada <ko1@atdot.net>
- * gc.c: use `gc_mark_maybe()'. T_ZOMBIE objects should not be pushed
- to the mark stack.
+ * vm_core.h: size should be unsigned.
+ * rb_call_info_t::index
+ * rb_iseq_constant_body::stack_max
+ * rb_iseq_constant_body::local_size
+ * rb_iseq_constant_body::param::size
+ * rb_iseq_constant_body::local_table_size
+ * rb_iseq_constant_body::is_size
+ * rb_iseq_constant_body::callinfo_size
-Mon Jun 17 07:56:24 2013 Tanaka Akira <akr@fsij.org>
+ * iseq.h: same for iseq_catch_table::size.
- * bignum.c (bary_small_lshift): Renamed from bdigs_small_lshift.
- (bary_small_rshift): Renamed from bdigs_small_rshift.
+ * compile.c: catch up these fix.
-Mon Jun 17 07:38:48 2013 Tanaka Akira <akr@fsij.org>
-
- * bignum.c (absint_numwords_bytes): Removed.
- (rb_absint_numwords): Don't call absint_numwords_bytes.
-
-Sun Jun 16 23:14:58 2013 Tanaka Akira <akr@fsij.org>
-
- * bignum.c (BARY_ADD): New macro.
- (BARY_SUB): Ditto.
- (BARY_MUL): Ditto.
- (BARY_DIVMOD): Ditto.
- (BARY_ZERO_P): Ditto.
- (absint_numwords_generic): Use these macros.
-
-Sun Jun 16 21:41:39 2013 Tanaka Akira <akr@fsij.org>
-
- * bignum.c (bary_2comp): Extracted from get2comp.
- (integer_unpack_num_bdigits): Extracted from
- rb_integer_unpack_internal.
- (bary_unpack_internal): Renamed from bary_unpack and support
- INTEGER_PACK_2COMP.
- (bary_unpack): New function to validate arguments and invoke
- bary_unpack_internal.
- (rb_integer_unpack_internal): Removed.
- (rb_integer_unpack): Invoke bary_unpack_internal.
- (rb_integer_unpack_2comp): Removed.
-
- * internal.h (rb_integer_unpack_2comp): Removed.
-
- * pack.c: Follow the above change.
-
-Sun Jun 16 18:41:42 2013 Tanaka Akira <akr@fsij.org>
-
- * internal.h (INTEGER_PACK_2COMP): Defined.
- (rb_integer_pack_2comp): Removed.
-
- * bignum.c (bary_pack): Support INTEGER_PACK_2COMP.
- (rb_integer_pack): Invoke bary_pack directly.
- (rb_integer_pack_2comp): Removed.
- (rb_integer_pack_internal): Ditto.
- (absint_numwords_generic): Follow the above change.
-
- * pack.c (pack_pack): Ditto.
-
- * sprintf.c (rb_str_format): Ditto.
-
-Sun Jun 16 17:48:14 2013 Tanaka Akira <akr@fsij.org>
-
- * bignum.c (absint_numwords_generic): rb_funcall invocations removed.
-
-Sun Jun 16 16:04:38 2013 NARUSE, Yui <naruse@ruby-lang.org>
-
- * tool/config_files.rb: use URI.read to allow it runs with Ruby 1.8.5.
-
-Sun Jun 16 14:32:25 2013 Tanaka Akira <akr@fsij.org>
-
- * bignum.c (bary_pack) Extracted from rb_integer_pack_internal.
- (absint_numwords_generic): Use bary_pack.
-
-Sun Jun 16 11:01:57 2013 Kouhei Sutou <kou@cozmixng.org>
-
- * NEWS (XMLRPC::Client#http): Add.
- [ruby-core:55197] [Feature #8461]
-
-Sun Jun 16 10:38:45 2013 Tanaka Akira <akr@fsij.org>
+ * iseq.c: ditto.
- * bignum.c (bary_add): New function.
- (bary_zero_p): Extracted from bigzero_p.
- (absint_numwords_generic): Use bary_zero_p and bary_add.
- (bary_mul): Fix an argument for bary_mul_single.
- (bary_divmod): Use size_t for arguments.
+ * proc.c: ditto.
-Sun Jun 16 08:55:22 2013 Tanaka Akira <akr@fsij.org>
+ * vm.c: ditto.
- * bignum.c (bigdivrem): Use a BDIGIT variable to store the return
- value of bigdivrem_single.
+ * vm_args.c: ditto.
-Sun Jun 16 08:43:59 2013 Tanaka Akira <akr@fsij.org>
+ * vm_eval.c: ditto.
- * bignum.c (bary_divmod): New function.
- (absint_numwords_generic): Use bary_divmod.
- (bigdivrem_num_extra_words): Extracted from bigdivrem.
- (bigdivrem_single): Ditto.
- (bigdivrem_normal): Ditto.
- (BIGDIVREM_EXTRA_WORDS): Defined.
+ * vm_insnhelper.c: ditto.
-Sun Jun 16 05:51:51 2013 Masaya Tarui <tarui@ruby-lang.org>
+Sat Jul 25 06:00:09 2015 Koichi Sasada <ko1@atdot.net>
- * gc.c: Fixup around GC by MALLOC.
- Add allocate size to malloc_increase before GC
- for updating limit in after_gc_sweep.
- Reset malloc_increase into garbage_collect()
- for preventing GC again soon.
+ * vm_core.h: constify rb_iseq_constant_body::line_info_table.
-Sun Jun 16 05:15:36 2013 Masaya Tarui <tarui@ruby-lang.org>
+ * iseq.c: catch up this fix.
- * gc.c: Add some columns to more detail profile.
- new columns: Allocated size, Prepare Time, Removing Objects, Empty Objects
+Sat Jul 25 05:56:43 2015 Koichi Sasada <ko1@atdot.net>
-Sun Jun 16 02:04:40 2013 Masaya Tarui <tarui@ruby-lang.org>
+ * vm_core.h: constify rb_iseq_constant_body::param::opt_table and
+ rb_iseq_constant_body::param::keyword.
- * gc.c (gc_prof_timer_stop): Merge function codes of GC_PROFILE_MORE_DETAIL and !GC_PROFILE_MORE_DETAIL.
- * gc.c (gc_prof_mark_timer_start): Ditto.
- * gc.c (gc_prof_mark_timer_stop): Ditto.
- * gc.c (gc_prof_sweep_slot_timer_start): Ditto.
- * gc.c (gc_prof_sweep_slot_timer_stop): Ditto.
- * gc.c (gc_prof_set_malloc_info): Ditto.
- * gc.c (gc_prof_set_heap_info): Ditto.
+ * compile.c: catch up this fix.
-Sat Jun 15 23:50:24 2013 Tanaka Akira <akr@fsij.org>
+Sat Jul 25 04:47:01 2015 Koichi Sasada <ko1@atdot.net>
- * bignum.c (bary_sub): New function.
- (absint_numwords_generic): Use bary_sub.
- (bigsub_core): Skip unnecessary copy.
+ * vm_core.h: constify rb_iseq_constant_body::catch_table.
-Sat Jun 15 22:05:30 2013 Tanaka Akira <akr@fsij.org>
+ * compile.c (iseq_set_exception_table): catch up this fix.
- * bignum.c (bary_mul): New function.
- (absint_numwords_generic): Use bary_mul.
- (bary_mul_single): Extracted from bigmul1_single.
- (bary_mul_normal): Extracted from bigmul1_normal.
+ * iseq.c: ditto.
-Sat Jun 15 20:13:46 2013 Tanaka Akira <akr@fsij.org>
+ * vm.c (vm_exec): ditto.
- * bignum.c (bary_unpack): Extracted from rb_integer_unpack_internal.
- (absint_numwords_generic): Use bary_unpack.
- (roomof): Defined.
- (bdigit_roomof): Defined.
- (BARY_ARGS): Defined.
- (bary_unpack): Declared.
+Fri Jul 24 21:29:54 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Jun 15 19:35:04 2013 Tanaka Akira <akr@fsij.org>
+ * st.c (EQUAL, st_delete_safe): fix arguments order to compare
+ function, searching key is the first and stored key is the
+ second always.
- * bignum.c (absint_numwords_bytes): Make it static.
- (absint_numwords_small): Ditto.
- (absint_numwords_generic): Ditto.
+Fri Jul 24 21:27:29 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Jun 15 17:14:32 2013 Tanaka Akira <akr@fsij.org>
+ * string.c (fstr_update_callback): fstring must not be a shared
+ string, or the content without RSTRING_FSTR may be freed.
+ [ruby-dev:49188] [Bug #11386]
- * bignum.c (bigmul1_normal): Shrink the result Bignum length.
+Fri Jul 24 20:09:43 2015 Naohisa Goto <ngotogenome@gmail.com>
-Sat Jun 15 10:19:42 2013 Zachary Scott <zachary@zacharyscott.net>
+ * test/rinda/test_rinda.rb (RingIPv6#prepare_ipv6): prevent to use
+ IPv6 loopback interface for
+ Rinda::TestRingFinger#test_make_socket_ipv6_multicast and
+ Rinda::TestRingFinger#test_make_socket_ipv6_multicast_hops.
+ The tests are skipped if there are no IPv6 devices other than the
+ loopback device. [Bug #11394] [ruby-dev:49199]
- * ext/bigdecimal/bigdecimal.c: Update overview formatting of headers
+ * test/rinda/test_rinda.rb (test_make_socket_ipv6_multicast): ditto
+ for Rinda::TestRingServer#test_make_socket_ipv6_multicast.
-Sat Jun 15 10:19:06 2013 Zachary Scott <zachary@zacharyscott.net>
+ * test/rinda/test_rinda.rb (test_ring_server_ipv6_multicast): ditto
+ for Rinda::TestRingServer#test_ring_server_ipv6_multicast.
- * ext/bigdecimal/bigdecimal.gemspec: Update authors
+Fri Jul 24 16:35:55 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Jun 15 10:02:26 2013 Tanaka Akira <akr@fsij.org>
+ * string.c (fstr_update_callback): pool bare strings only.
- * bignum.c (bdigs_small_rshift): Extracted from big_rshift.
- (bigdivrem): Use bdigs_small_rshift.
+ * string.c (rb_fstring): return the original string with sharing a
+ fstring if it has extra attributes, not the fstring itself.
+ [ruby-dev:49188] [Bug #11386]
-Sat Jun 15 08:37:28 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Jul 24 16:35:34 2015 yui-knk <spiketeika@gmail.com>
- * vm_eval.c (eval_string_with_cref): propagate absolute path from the
- binding if it is given explicitly. patch by Gat (Dawid Janczak) at
- [ruby-core:55123]. [Bug #8436]
+ * file.c (rb_file_s_extname): [DOC] add an example.
-Sat Jun 15 02:40:18 2013 Tanaka Akira <akr@fsij.org>
+ * test/ruby/test_path.rb (test_extname): add tests. [Fix GH-978]
+ * path starts with dot ('.a.rb')
+ * path includes dir name ('a/b/d/test.rb')
+ * path includes dir name and dir name starts with dot
+ ('.a/b/d/test.rb')
- * bignum.c (bdigs_small_lshift): Extracted from big_lshift.
- (bigdivrem): Use bdigs_small_lshift.
+Thu Jul 23 18:50:43 2015 Koichi Sasada <ko1@atdot.net>
-Fri Jun 14 20:47:41 2013 Tanaka Akira <akr@fsij.org>
+ * vm_core.h: constify rb_iseq_constant_body::local_table and
+ rb_iseq_param_keyword::table and
+ rb_iseq_param_keyword::default_values.
- * bignum.c (bigdivrem): Reduce number of digits before bignew() for div.
+ * compile.c: catch up this fix.
-Fri Jun 14 20:12:37 2013 Tanaka Akira <akr@fsij.org>
+ * iseq.c: ditto.
- * bignum.c (bigdivrem): Use bignew when ny == 1.
+Thu Jul 23 17:30:43 2015 Koichi Sasada <ko1@atdot.net>
-Fri Jun 14 18:52:51 2013 Koichi Sasada <ko1@atdot.net>
+ * vm_core.h: constify rb_iseq_constant_body::iseq_encoded and
+ rb_control_frame_t::pc.
- * compile.c (rb_iseq_compile_node): fix location of a `trace'
- instruction (b_return event).
- [ruby-core:55305] [ruby-trunk - Bug #8489]
- (need a backport to 2.0.0?)
+ * compile.c (rb_iseq_translate_threaded_code): catch up this fix.
- * test/ruby/test_settracefunc.rb: add a test.
+ * iseq.c: ditto.
-Fri Jun 14 18:18:07 2013 Koichi Sasada <ko1@atdot.net>
+ * vm_exec.c (vm_exec_core): ditto.
- * class.c, include/ruby/ruby.h: add write barriers for T_CLASS,
- T_MODULE, T_ICLASS.
+Thu Jul 23 10:25:46 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * constant.h: constify rb_const_entry_t::value and file to detect
- assignment.
+ * include/ruby/ruby.h: add raw FL macros, which assume always the
+ argument object is not a special constant.
- * variable.c, internal.h (rb_st_insert_id_and_value, rb_st_copy):
- added. update table with write barrier.
+ * internal.h (STR_EMBED_P, STR_SHARED_P): valid only for T_STRING.
- * method.h: constify some variables to detect assignment.
+ * string.c: deal with taint flags directly across String instances.
- * object.c (init_copy): add WBs.
+Thu Jul 23 09:05:28 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * variable.c: ditto.
+ * parse.y (lambda_body): pop cmdarg stack for lookahead
+ token. [ruby-core:70067] [Bug #11380]
- * vm_method.c (rb_add_method): ditto.
+Thu Jul 23 04:03:03 2015 Aaron Patterson <tenderlove@ruby-lang.org>
-Fri Jun 14 14:33:47 2013 Shugo Maeda <shugo@ruby-lang.org>
+ * ext/openssl/ossl_ssl.c: fix tests by not setting the instance
+ variable on the frozen ssl instance.
- * NEWS: add a note for Module#using.
+Thu Jul 23 03:32:26 2015 Aaron Patterson <tenderlove@ruby-lang.org>
-Fri Jun 14 13:40:27 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/openssl/ossl_ssl.c: add ECDH callback support. [Feature #11356]
- * .travis.yml (before_script): update config files.
+ * test/openssl/test_pair.rb: test for ECDH callback support
- * common.mk ($(srcdir)/tool/config.{guess,sub}): use get-config_files.
+Thu Jul 23 03:29:49 2015 Aaron Patterson <tenderlove@ruby-lang.org>
- * tool/config_files.rb: split get-config_files.
+ * ext/openssl/ossl_ssl.c: add ALPN support. [Feature #9390]
- * common.mk (update-config_files): rule to download config files.
+ * ext/openssl/extconf.rb: detect ALPN support in OpenSSL
- * tool/config.guess, tool/config.sub: remove and download from the
- upstream.
+ * test/openssl/test_ssl.rb: test for ALPN
- * tool/config_files.rb: download config files from GNU.
+Wed Jul 22 23:44:17 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Jun 14 12:21:20 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * string.c (rb_str_reverse): reversed string is not a substring,
+ and should not set coderange of the original string.
+ [ruby-dev:49189] [Bug #11387]
- * include/ruby/ruby.h (RUBY_SAFE_LEVEL_CHECK): suppress warnings
- "left-hand operand of comma expression has no effect", on gcc 4.4.
+Wed Jul 22 20:17:51 2015 Koichi Sasada <ko1@atdot.net>
-Fri Jun 14 09:48:48 2013 Shugo Maeda <shugo@ruby-lang.org>
+ * vm_core.h: modify layout of rb_iseq_constant_body.
- * NEWS: add notes for $SAFE.
+ Move frequent accessing fields to upper part.
- * doc/security.rdoc: remove the description of $SAFE=4.
+Wed Jul 22 19:57:47 2015 Koichi Sasada <ko1@atdot.net>
-Fri Jun 14 00:14:29 2013 Tanaka Akira <akr@fsij.org>
+ * vm_core.h: remove unused declaration of
+ iseq_compile_data_ensure_node_stack.
- * bignum.c (bigdivrem): Zero test condition simplified.
+Wed Jul 22 19:52:45 2015 Koichi Sasada <ko1@atdot.net>
-Thu Jun 13 23:43:11 2013 Zachary Scott <zachary@zacharyscott.net>
+ * vm_core.h: separate rb_iseq_body into rb_iseq_constant_body and
+ rb_iseq_variable_body (rb_iseq_t::variable_body).
- * ext/bigdecimal/*: improve documentation, nodoc samples with @mrkn
+ rb_iseq_variable_body can be modified after compilation.
-Thu Jun 13 23:02:14 2013 Kouhei Sutou <kou@cozmixng.org>
+ * compile.c: use rb_iseq_t::variable_body.
- * lib/xmlrpc/client.rb (XMLRPC::Client#http): Add reader for raw
- Net::HTTP. [ruby-core:55197] [Feature #8461]
- Reported by Herwin Weststrate. Thanks!!!
+ * iseq.c: ditto.
-Thu Jun 13 22:44:52 2013 Kouhei Sutou <kou@cozmixng.org>
+ * thread.c: ditto.
- * lib/xmlrpc/client.rb (XMLRPC::Client#parse_set_cookies): Support
- multiple names in a response. [ruby-core:41711] [Bug #5774]
- Reported by Roman Riha. Thanks!!!
- * test/xmlrpc/test_client.rb (XMLRPC::ClientTest#test_cookie_override):
- Add a test of the above case.
+Wed Jul 22 17:50:35 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Thu Jun 13 22:35:50 2013 Kouhei Sutou <kou@cozmixng.org>
+ * lib/matrix/eigenvalue_decomposition.rb: refine code style.
+ [fix GH-959][ci skip] Patch by @bogdanvlviv
- * lib/xmlrpc/client.rb (XMLRPC::Client#parse_set_cookies): Use
- guard style.
+Wed Jul 22 15:48:47 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Thu Jun 13 22:12:32 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/ruby/test_range.rb: Add test case for Range#end with
+ exclude_end true case. [fix GH-968] Patch by @yui-knk
- * lib/fileutils.rb (FileUtils#rmdir): fix traversal loop, not trying
- remove same directory only.
+Wed Jul 22 09:45:31 2015 Maksim Sitnikov <sitnikovme@undev.ru>
-Thu Jun 13 21:30:14 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * numeric.c (num_coerce): [DOC] fix doc for Numeric#coerce,
+ missing '+'. [Fix GH-974]
- * configure.in (opt-dir), tool/ifchange: get rid of "alternate value"
- expansion for legacy sh. [ruby-dev:47420] [Bug #8524]
+Wed Jul 22 07:24:18 2015 Koichi Sasada <ko1@atdot.net>
-Thu Jun 13 21:24:09 2013 Tanaka Akira <akr@fsij.org>
+ * make rb_iseq_t T_IMEMO object (type is imemo_iseq).
- * bignum.c (bigdivrem): Refactored to use ALLOCV_N for temporary
- buffers.
+ 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.
-Thu Jun 13 18:54:11 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ 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.
- * bignum.c (integer_unpack_num_bdigits_generic): reorder terms (but not
- changed the intention of the expression) because VC++ reports a
- warning for it. reported by ko1 via IRC.
+ This patch is big, but most of difference is replacement of
+ iseq->xxx to iseq->body->xxx.
-Thu Jun 13 18:53:14 2013 Tanaka Akira <akr@fsij.org>
+ (previous) rb_iseq_t::compile_data is also located to
+ rb_iseq_t::compile_data.
+ It was moved from rb_iseq_body::compile_data.
- * test/ruby/test_thread.rb (test_thread_local_security): Don't create
- an unused thread.
+ Now rb_iseq_t has empty two pointers.
+ I will split rb_iseq_body data into static data and dynamic data.
-Thu Jun 13 18:34:20 2013 Tanaka Akira <akr@fsij.org>
+ * compile.c: rename some functions/macros.
+ Now, we don't need to separate iseq and iseqval (only VALUE).
- * bignum.c (bigdivrem): Use nlz.
+ * eval.c (ruby_exec_internal): `n' is rb_iseq_t (T_IMEMO/iseq).
-Thu Jun 13 14:51:06 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/objspace/objspace.c (count_imemo_objects): count T_IMEMO/iseq.
- * include/ruby/ruby.h (RUBY_SAFE_LEVEL_CHECK): check constant safe
- level at compile time.
+ * gc.c: check T_IMEMO/iseq.
-Thu Jun 13 14:39:08 2013 Shugo Maeda <shugo@ruby-lang.org>
+ * internal.h: add imemo_type::imemo_iseq.
- * test/-ext-/test_printf.rb, test/rss/test_parser.rb,
- test/ruby/test_array.rb, test/ruby/test_hash.rb,
- test/ruby/test_m17n.rb, test/ruby/test_marshal.rb,
- test/ruby/test_object.rb, test/ruby/test_string.rb: don't use
- untrusted?, untrust, and trust to avoid warnings in case $VERBOSE is
- true.
+ * iseq.c: define RubyVM::InstructionSequence as T_OBJECT.
+ Methods are implemented by functions named iseqw_....
-Thu Jun 13 10:47:16 2013 Shugo Maeda <shugo@ruby-lang.org>
+ * load.c (rb_load_internal0): rb_iseq_new_top() returns
+ rb_iseq_t (T_IMEMO/iesq).
- * bootstraptest/test_autoload.rb, bootstraptest/test_method.rb:
- remove tests for $SAFE=4.
+ * method.h (rb_add_method_iseq): accept rb_iseq_t (T_IMEMO/iseq).
- * lib/pp.rb: use taint instead of untrust to avoid warnings when
- $VERBOSE is set to true.
+ * vm_core.h (GetISeqPtr): removed because it is not T_DATA now.
-Thu Jun 13 06:12:18 2013 Tanaka Akira <akr@fsij.org>
+ * vm_core.h (struct rb_iseq_body): remove padding for
+ [Bug #10037][ruby-core:63721].
- * bignum.c (integer_unpack_num_bdigits_small): Fix a compile error on
- clang -Werror,-Wshorten-64-to-32
- Reported by Eric Hodel. [ruby-core:55467] [Bug #8522]
+Wed Jul 22 07:15:33 2015 Koichi Sasada <ko1@atdot.net>
-Thu Jun 13 05:32:13 2013 Eric Hodel <drbrain@segment7.net>
+ * ext/objspace/objspace.c (total_i): no need to skip singleton classes.
- * ext/socket/extconf.rb: Enable RFC 3542 IPV6 socket options for OS X
- 10.7+. [ruby-trunk - Bug #8517]
+Wed Jul 22 06:37:54 2015 Koichi Sasada <ko1@atdot.net>
-Thu Jun 13 00:17:18 2013 Tanaka Akira <akr@fsij.org>
+ * vm_core.h: constify rb_call_info_t::kw_arg,
+ rb_control_frame_t::iseq and rb_control_frame_t::block_iseq.
- * bignum.c (rb_integer_unpack_2comp): New function.
- (rb_integer_unpack_internal): Extracted from rb_integer_unpack and
- nlp_bits_ret argument added.
- (integer_unpack_num_bdigits_small): nlp_bits_ret argument added to
- return number of leading padding bits.
- (integer_unpack_num_bdigits_generic): Ditto.
+ * iseq.c (iseq_free): catch up this fix.
- * internal.h (rb_integer_unpack_2comp): Declared.
+ * vm.c: ditto.
- * pack.c (pack_unpack): Use rb_integer_unpack_2comp and
- rb_integer_unpack.
+ * vm_dump.c: ditto.
-Wed Jun 12 23:27:03 2013 Shugo Maeda <shugo@ruby-lang.org>
+Wed Jul 22 06:25:45 2015 Koichi Sasada <ko1@atdot.net>
- * eval.c (mod_using): new method Module#using, which activates
- refinements of the specified module only in the current class or
- module definition. [ruby-core:55273] [Feature #8481]
+ * vm_core.h: constify rb_call_info_t::blockiseq and rb_block_t::iseq.
- * test/ruby/test_refinement.rb: related test.
+ * vm.c, vm_insnhelper.c: catch up this fix.
-Wed Jun 12 22:58:48 2013 Shugo Maeda <shugo@ruby-lang.org>
+ * iseq.c (iseq_data_to_ary): constify the first iseq parameter.
- * safe.c (rb_set_safe_level, safe_setter): raise an ArgumentError
- when $SAFE is set to 4. $SAFE=4 is now obsolete.
- [ruby-core:55222] [Feature #8468]
+ * vm_insnhelper.c (vm_make_proc_with_iseq): ditto.
- * object.c (rb_obj_untrusted, rb_obj_untrust, rb_obj_trust):
- Kernel#untrusted?, untrust, and trust are now deprecated.
- Their behavior is same as tainted?, taint, and untaint,
- respectively.
+Wed Jul 22 06:17:35 2015 Koichi Sasada <ko1@atdot.net>
- * include/ruby/ruby.h (OBJ_UNTRUSTED, OBJ_UNTRUST): OBJ_UNTRUSTED()
- and OBJ_UNTRUST() are aliases of OBJ_TAINTED() and OBJ_TAINT(),
- respectively.
+ * method.h: constify rb_method_iseq_t::iseqptr.
- * array.c, class.c, debug.c, dir.c, encoding.c, error.c, eval.c,
- ext/curses/curses.c, ext/dbm/dbm.c, ext/dl/cfunc.c,
- ext/dl/cptr.c, ext/dl/dl.c, ext/etc/etc.c, ext/fiddle/fiddle.c,
- ext/fiddle/pointer.c, ext/gdbm/gdbm.c, ext/readline/readline.c,
- ext/sdbm/init.c, ext/socket/ancdata.c, ext/socket/basicsocket.c,
- ext/socket/socket.c, ext/socket/udpsocket.c,
- ext/stringio/stringio.c, ext/syslog/syslog.c, ext/tk/tcltklib.c,
- ext/win32ole/win32ole.c, file.c, gc.c, hash.c, io.c, iseq.c,
- load.c, marshal.c, object.c, proc.c, process.c, random.c, re.c,
- safe.c, string.c, thread.c, transcode.c, variable.c,
- vm_insnhelper.c, vm_method.c, vm_trace.c: remove code for
- $SAFE=4.
+ * proc.c (rb_method_entry_min_max_arity): catch up this fix.
- * test/dl/test_dl2.rb, test/erb/test_erb.rb,
- test/readline/test_readline.rb,
- test/readline/test_readline_history.rb, test/ruby/test_alias.rb,
- test/ruby/test_array.rb, test/ruby/test_dir.rb,
- test/ruby/test_encoding.rb, test/ruby/test_env.rb,
- test/ruby/test_eval.rb, test/ruby/test_exception.rb,
- test/ruby/test_file_exhaustive.rb, test/ruby/test_hash.rb,
- test/ruby/test_io.rb, test/ruby/test_method.rb,
- test/ruby/test_module.rb, test/ruby/test_object.rb,
- test/ruby/test_pack.rb, test/ruby/test_rand.rb,
- test/ruby/test_regexp.rb, test/ruby/test_settracefunc.rb,
- test/ruby/test_struct.rb, test/ruby/test_thread.rb,
- test/ruby/test_time.rb: remove tests for $SAFE=4.
+ * vm_insnhelper.c (def_iseq_ptr): constify.
-Wed Jun 12 22:18:23 2013 Tanaka Akira <akr@fsij.org>
+Wed Jul 22 03:37:39 2015 Koichi Sasada <ko1@atdot.net>
- * bignum.c (integer_unpack_num_bdigits_generic): Rewritten without
- rb_funcall.
- (integer_unpack_num_bdigits_bytes): Removed.
- (rb_integer_unpack): integer_unpack_num_bdigits_bytes invocation
- removed.
+ * gc.c (internal_object_p): Now a singleton classes appear by
+ ObjectSpace.each_object. [Bug #11360]
-Wed Jun 12 20:18:03 2013 Kouhei Sutou <kou@cozmixng.org>
+ * test/ruby/test_objectspace.rb: add a test about it.
- * lib/xmlrpc/client.rb (XMLRPC::Client#parse_set_cookies): Extract.
+Tue Jul 21 21:21:33 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Jun 12 18:19:41 2013 Tanaka Akira <akr@fsij.org>
+ * thread.c (do_select): replace switch and goto with a loop to
+ suppress maybe-uninitialized warnings by gcc6.
- * bignum.c (validate_integer_pack_format): supported_flags argument
- added and validate given flags.
- (rb_integer_pack_internal): Specify supported_flags.
- (rb_integer_unpack): Ditto.
+ * thread.c (set_unblock_function, rb_wait_for_single_fd): ditto.
-Wed Jun 12 16:41:38 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Jul 21 20:32:33 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * array.c (rb_ary_sort_bang): remove duplicated assertions.
- ARY_HEAP_PTR() implies ary not to be embedded. [ruby-dev:47419]
- [Bug #8518]
+ * test/ruby/test_range.rb: Add test for Range#hash
+ [fix GH-969] Patch by @yui-knk
-Wed Jun 12 12:44:45 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Jul 21 19:43:20 2015 Koichi Sasada <ko1@atdot.net>
- * io.c (io_getc): fix 7bit coderange condition, check if ascii read
- data instead of read length. [ruby-core:55444] [Bug #8516]
+ * compile.c: constify the first parameter (iseq).
+ * iseq_add_mark_object()
+ * iseq_add_mark_object_compile_time()
-Wed Jun 12 12:35:13 2013 Tanaka Akira <akr@fsij.org>
+ * iseq.c, iseq.h (rb_iseq_add_mark_object): ditto.
- * pack.c (pack_pack): Use rb_integer_pack_2comp.
+Tue Jul 21 16:18:48 2015 Eric Wong <e@80x24.org>
-Wed Jun 12 12:07:04 2013 Tanaka Akira <akr@fsij.org>
+ * test/socket/test_nonblock.rb: increase buffer sizes
+ to OpenBSD limits. Thanks to Jeremy Evans <code@jeremyevans.net>
+ [ruby-core:70058]
- * sprintf.c (rb_str_format): Fix a dynamic format string.
+Tue Jul 21 16:08:53 2015 Eric Wong <e@80x24.org>
-Wed Jun 12 12:04:09 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * load.c (ruby_dln_librefs): make static
- * array.c (rb_ary_uniq_bang): must not be modified once frozen even in
- a callback method.
+Tue Jul 21 13:36:54 2015 yuuji.yaginuma <yuuji.yaginuma@gmail.com>
-Wed Jun 12 12:03:43 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * lib/optparse.rb (complete): [DOC] fix typo. [Fix GH-973]
- * array.c (rb_ary_sort_bang): must not be modified once frozen even in
- a callback method.
+Tue Jul 21 05:20:21 2015 Eric Wong <e@80x24.org>
-Wed Jun 12 12:00:15 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * io.c (nogvl_wait_for_single_fd): new function for Linux
+ (maygvl_copy_stream_wait_read): Linux-specific version
+ (nogvl_copy_stream_wait_write): use nogvl_wait_for_single_fd
+ [ruby-core:70051] [Feature #11377]
- * array.c (FL_SET_EMBED): shared object is frozen even when get
- unshared.
+Mon Jul 20 15:04:30 2015 Eric Wong <e@80x24.org>
- * array.c (rb_ary_modify): ARY_SET_CAPA needs unshared array.
+ * parse.y (parser_initialize): avoid redundant zero-ing
-Wed Jun 12 07:32:01 2013 Tanaka Akira <akr@fsij.org>
+Mon Jul 20 12:12:05 2015 Eric Wong <e@80x24.org>
- * random.c (rand_int): Use rb_big_uminus.
+ * parse.y (struct parser_params): pack: 88 => 256 bytes on 64-bit
+ [ruby-core:70034] [Feature #11371]
-Wed Jun 12 07:12:54 2013 Eric Hodel <drbrain@segment7.net>
+Sun Jul 19 14:29:18 2015 windwiny <windwiny.ubt@gmail.com>
- * struct.c: Improve documentation: replace "instance variable" with
- "member", recommend the use of a block to customize structs, note
- that member accessors are created, general cleanup.
+ * ext/pty/pty.c: [DOC] fix example typo, an old name at move from
+ PTY.open. [Fix GH-972]
-Wed Jun 12 06:35:01 2013 Tanaka Akira <akr@fsij.org>
+Sat Jul 18 21:29:19 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * internal.h (INTEGER_PACK_NEGATIVE): Defined.
- (rb_integer_unpack): sign argument removed.
+ * thread.c (vm_check_ints_blocking): gather common statements at
+ the end, and prefer LIKELY for Visual C optimization.
- * bignum.c (rb_integer_unpack): sign argument removed.
- Non-negative integers generated by default.
- INTEGER_PACK_NEGATIVE flag is used to generate non-positive integers.
+Sat Jul 18 20:44:56 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * pack.c (pack_unpack): Follow the above change.
+ * load.c (rb_load_internal0): do not raise any exceptions but
+ return the result tag state.
- * random.c (int_pair_to_real_inclusive): Ditto.
- (make_seed_value): Ditto.
- (mt_state): Ditto.
- (limited_big_rand): Ditto.
+ * load.c (rb_load_protect): reduce nested EXEC_TAGs.
- * marshal.c (r_object0): Ditto.
+Sat Jul 18 19:52:17 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Jun 12 00:07:46 2013 Kouhei Sutou <kou@cozmixng.org>
+ * gc.c (run_finalizer): set and restore safe level here to reduce
+ nested EXEC_TAGs.
- * test/xmlrpc/test_client.rb (XMLRPC::ClientTest#test_cookie_simple):
- Add a test for the extracted method.
+Sat Jul 18 18:45:22 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Jun 11 23:56:24 2013 Kouhei Sutou <kou@cozmixng.org>
+ * eval.c (ruby_cleanup): error_handle() returns exit status to the
+ system, not internal error state, do not convert the exit status
+ again.
- * test/xmlrpc/test_client.rb (XMLRPC::ClientTest::Fake::HTTP#started):
- Add a missing empty line.
+Sat Jul 18 10:29:03 2015 Eric Wong <e@80x24.org>
-Tue Jun 11 23:37:19 2013 Tanaka Akira <akr@fsij.org>
+ * test/ruby/test_process.rb: test thread+sigs work after failed exec
- * bignum.c (validate_integer_pack_format): Don't require a word order
- flag if numwords is 1 or less.
- (absint_numwords_generic): Don't specify a word order for
- rb_integer_pack.
+Sat Jul 18 07:20:18 2015 Jeremy Evans <code@jeremyevans.net>
- * hash.c (rb_hash): Ditto.
+ * test/socket/test_nonblock: use smaller buffer for sendmsg
+ [ruby-core:70016] [Bug #11364]
- * time.c (v2w_bignum): Ditto.
+Sat Jul 18 07:04:24 2015 Eric Wong <e@80x24.org>
-Tue Jun 11 23:01:57 2013 Tanaka Akira <akr@fsij.org>
+ * signal.c (trap_handler): cleanup to use RSTRING_GETMEM + memcmp
- * bignum.c (validate_integer_pack_format): Refine error messages.
+Sat Jul 18 02:53:06 2015 Eric Wong <e@80x24.org>
-Tue Jun 11 22:25:04 2013 Tanaka Akira <akr@fsij.org>
+ * io.c (argf_read_nonblock): support `exception: false'
+ (io_nonblock_eof): new function
+ (io_read_nonblock): use io_nonblock_eof
+ (argf_getpartial): accept kwargs hash for `exception: false'
+ * test/ruby/test_argf.rb (test_read_nonblock): new test
+ * NEWS: add item for ARGF.read_nonblock
+ [ruby-core:70000] [Feature #11358]
- * bignum.c (validate_integer_pack_format): numwords argument added.
- Move a varidation from rb_integer_pack_internal and rb_integer_unpack.
- (rb_integer_pack_internal): Follow above change.
- (rb_integer_unpack): Ditto.
+Fri Jul 17 23:51:31 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Jun 11 20:52:43 2013 Tanaka Akira <akr@fsij.org>
+ * vm_eval.c (rb_eval_cmd): $SAFE=4 has been deprecated.
- * bignum.c (rb_integer_pack_internal): Renamed from rb_integer_pack
- and overflow_2comp argument added.
- (rb_integer_pack): Just call rb_integer_pack_internal.
- (rb_integer_pack_2comp): New function.
+Fri Jul 17 22:18:09 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * internal.h (rb_integer_pack_2comp): Declared.
+ * compile.c (iseq_compile_each): use enum ruby_tag_type names.
- * sprintf.c (rb_str_format): Use rb_integer_pack and
- rb_integer_pack_2comp to format binary/octal/hexadecimal integers.
- (ruby_digitmap): Declared.
- (remove_sign_bits): Removed.
- (BITSPERDIG): Ditto.
- (EXTENDSIGN): Ditto.
+ * vm_core.h (ruby_tag_type): move from eval_intern.h for compiling
+ break/next/redo/return.
-Tue Jun 11 16:15:03 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Jul 17 15:39:19 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * array.c (ary_shrink_capa): shrink the capacity so it fits just with
- the length.
+ * include/ruby/encoding.h (ENC_CODERANGE_CLEAN_P): predicate that
+ tells if the coderange is clean, that is 7bit or valid, and no
+ needs to scrub.
- * array.c (ary_make_shared): release never used elements from frozen
- array to be shared. [ruby-dev:47416] [Bug #8510]
+ * re.c (rb_reg_expr_str): use ENC_CODERANGE_CLEAN_P.
-Tue Jun 11 12:49:01 2013 Zachary Scott <zachary@zacharyscott.net>
+ * string.c (enc_strlen, rb_enc_cr_str_buf_cat, rb_str_scrub):
+ ditto.
- * doc/re.rdoc: Rename to doc/regexp.rdoc
- * re.c: Update rdoc include for rename of file
+ * string.c (rb_str_enumerate_chars): ditto, and suppress a warning
+ by gcc6.
-Tue Jun 11 07:13:13 2013 Masaya Tarui <tarui@ruby-lang.org>
+Fri Jul 17 15:36:52 2015 yui-knk <spiketeika@gmail.com>
- * eval_error.c (error_print): keep that errat is non-shady object.
- and guard errat from GC.
+ * test/ruby/test_range.rb (test_first_last): Add test for
+ `Range.new`. [Fix GH-971]
-Tue Jun 11 05:04:25 2013 Benoit Daloze <eregontp@gmail.com>
+Fri Jul 17 15:36:40 2015 yui-knk <spiketeika@gmail.com>
- * ext/racc/cparse/cparse.c: use rb_ary_entry() and
- rb_ary_subseq() instead of RARRAY_PTR.
- Based on a patch by Dirkjan Bussink. See Bug #8399.
+ * test/ruby/test_range.rb (test_first_last): Add assertions to
+ test of `Range#last` with exclude_end true case. [Fix GH-970]
-Mon Jun 10 23:51:51 2013 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+Fri Jul 17 09:59:14 2015 Eric Wong <e@80x24.org>
- * array.c (rb_ary_new_from_values): fix a typo. pointed out by
- nagachika.
- http://d.hatena.ne.jp/nagachika/20130610/ruby_trunk_changes_41199_41220
+ * thread.c (rb_thread_alone): simplify
-Mon Jun 10 21:51:03 2013 Kouhei Sutou <kou@cozmixng.org>
+Fri Jul 17 09:58:32 2015 Eric Wong <e@80x24.org>
- * ext/socket/raddrinfo.c (nogvl_getaddrinfo): Fix indent.
+ * lib/rinda/tuplespace.rb: remove enumerator require
+ * test/pathname/test_pathname.rb: ditto
-Mon Jun 10 21:49:43 2013 Kouhei Sutou <kou@cozmixng.org>
+Fri Jul 17 05:33:58 2015 Eric Wong <e@80x24.org>
- * ext/socket/raddrinfo.c (nogvl_getaddrinfo): Add missing return
- value assignment.
+ * iseq.c (rb_iseq_compile_with_option): reuse result of previous
+ GET_THREAD() call
+ * thread.c (thread_create_core): ditto
+ (rb_mutex_trylock): ditto
+ (rb_mutex_lock): ditto
+ * process.c (rb_waitpid): avoid multiple eval from RUBY_VM_CHECK_INTS
+ * thread.c (rb_thread_check_ints): ditto
-Mon Jun 10 20:58:11 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Thu Jul 16 19:12:30 2015 Eric Wong <e@80x24.org>
- * ext/socket/raddrinfo.c (nogvl_getaddrinfo): work around for Ubuntu
- 13.04's getaddrinfo issue with mdns4. [ruby-list:49420]
+ * thread.c (mutex_alloc): remove needless volatile
-Mon Jun 10 19:34:39 2013 Tanaka Akira <akr@fsij.org>
+Thu Jul 16 22:05:29 2015 Koichi Sasada <ko1@atdot.net>
- * bignum.c (rb_integer_pack): Returns sign instead of words.
- (absint_numwords_generic): Follow the above change.
- (big2str_base_powerof2): Follow the above change.
+ * vm_core.h: constify rb_iseq_t::parent_iseq.
- * internal.h: Ditto.
+ rb_iseq_t::local_iseq is not constant data because
+ local_iseq::flip_cnt can be modified (commented).
- * hash.c (rb_hash): Ditto.
+ * compile.c: catch up this fix.
- * pack.c (pack_pack): Ditto.
+ * iseq.c: ditto.
- * random.c (int_pair_to_real_inclusive): Ditto.
- (rand_init): Ditto.
- (random_load): Ditto.
- (limited_big_rand): Ditto.
+ * vm_insnhelper.c: ditto.
- * time.c (v2w_bignum): Ditto.
+Thu Jul 16 21:47:47 2015 Naohisa Goto <ngotogenome@gmail.com>
-Mon Jun 10 17:20:01 2013 Koichi Sasada <ko1@atdot.net>
+ * process.c (redirect_dup2): when the new FD of dup2() conflicts
+ with one of the timer thread FDs, the internal FD is diverted.
+ [Bug #11336] [ruby-core:69886] [Bug #11350] [ruby-core:69961]
- * gc.c (rgengc_remember): permit promoted object.
- (rb_gc_writebarrier -> remember)
+ * process.c (dup2_with_divert): new function for the above purpose.
-Mon Jun 10 17:14:01 2013 Koichi Sasada <ko1@atdot.net>
+ * thread_pthread.c (rb_divert_reserved_fd): new function for
+ diverting reserved FD. If the given FD is the same as one of the
+ reserved FDs, the reserved FD number is internally changed.
+ It returns -1 when error. Otherwise, returns 0. It also returns
+ 0 if there is no need to change reserved FD number.
- * gc.c (RVALUE_PROMOTE): fix parameter name (`x' to `obj')
- and make it inline function (like RVALUE_PROMOTE).
+ * thread_win32.c (rb_divert_reserved_fd): always returns 0 because
+ of no reserved FDs.
-Mon Jun 10 16:22:50 2013 Koichi Sasada <ko1@atdot.net>
+ * internal.h (rb_divert_reserved_fd): prototype declaration.
+ It is Ruby internal use only.
- * array.c (rb_ary_new_from_values): add assertion
- (ary should be young object).
+Thu Jul 16 21:47:46 2015 Koichi Sasada <ko1@atdot.net>
-Mon Jun 10 16:05:59 2013 Koichi Sasada <ko1@atdot.net>
+ * iseq.c (rb_iseq_disasm): rename rb_iseq_t *iseqdat to iseq
+ and VALUE *iseq to code.
- * gc.c (wmap_mark): check allocation of `w->obj2wmap'.
- (no-allocation `w->obj2wmap' will be NULL pointer reference)
+ * iseq.c (rb_iseq_disasm_insn): ditto.
-Mon Jun 10 15:36:00 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Jul 16 14:34:24 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval_error.c (error_print): use checking functions instead of
- catching exceptions.
+ * vm.c (REWIND_CFP): keep the arguments region inside the valid
+ value stack. [ruby-core:69969] [Bug #11352]
- * eval_error.c (error_print): restore errinfo for the case new
- exception raised while printing the message. [ruby-core:55365]
- [Bug #8501]
+Thu Jul 16 11:38:21 2015 Eric Wong <e@80x24.org>
- * eval_error.c (error_print): reduce calling setjmp.
+ * process.c (close_unless_reserved): declare type of `fd' arg
-Mon Jun 10 12:10:06 2013 Tanaka Akira <akr@fsij.org>
+Thu Jul 16 08:47:29 2015 Eric Wong <e@80x24.org>
- * bignum.c (integer_unpack_num_bdigits_small: Extracted from
- rb_integer_unpack.
- (integer_unpack_num_bdigits_generic): Ditto.
- (integer_unpack_num_bdigits_bytes): New function.
- (rb_integer_unpack): Use above functions.
- Return a Bignum for INTEGER_PACK_FORCE_BIGNUM even when the result
- is zero.
+ * load.c (rb_construct_expanded_load_path): fstring expanded path
+ (get_loaded_features_index): fstring feature path
+ (rb_provide_feature): ditto
+ [ruby-core:69871] [Feature #11331]
-Mon Jun 10 05:38:23 2013 Tanaka Akira <akr@fsij.org>
+Thu Jul 16 02:56:14 2015 Eric Wong <e@80x24.org>
- * bignum.c (absint_numwords_small): New function.
- (absint_numwords_generic): Use absint_numwords_small if possible.
+ * thread.c (thread_initialize): avoid RSTRING_PTR and NUMT2INT
-Mon Jun 10 01:07:57 2013 Tanaka Akira <akr@fsij.org>
+Thu Jul 16 01:00:46 2015 Naohisa Goto <ngotogenome@gmail.com>
- * bignum.c (absint_numwords_bytes): New function.
- (absint_numwords_generic): Extracted from rb_absint_numwords.
- (rb_absint_numwords): Use absint_numwords_bytes if possible.
+ * test/ruby/test_process.rb (test_exec_close_reserved_fd): test for
+ [Bug #11353]
-Sun Jun 9 21:33:15 2013 Tanaka Akira <akr@fsij.org>
+Thu Jul 16 00:35:42 2015 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
- * bignum.c (rb_absint_numwords): Return (size_t)-1 when overflow.
- Refine variable names.
- (rb_absint_size): Refine variable names.
+ * .gitignore: ignore version.i.
- * internal.h (rb_absint_size): Refine an argument name.
- (rb_absint_numwords): Ditto.
+Wed Jul 15 23:40:32 2015 Naohisa Goto <ngotogenome@gmail.com>
-Sun Jun 9 16:51:41 2013 Tanaka Akira <akr@fsij.org>
+ * test/ruby/test_process.rb (test_deadlock_by_signal_at_forking):
+ use RUBY (= EnvUtil.rubybin)
- * bignum.c (rb_absint_numwords): Renamed from rb_absint_size_in_word.
+Wed Jul 15 23:01:22 2015 Naohisa Goto <ngotogenome@gmail.com>
- * internal.h (rb_absint_numwords): Follow the above change.
+ * process.c (redirect_close, parent_redirect_close): should not close
+ reserved FD. It should be closed in the exec system call due to the
+ O_CLOEXEC or FD_CLOEXEC flag. [Bug #11353] [ruby-core:69977]
- * pack.c (pack_pack): Ditto.
+ * process.c (close_unless_reserved): new function to close FD unless
+ it is reserved for internal communication.
- * random.c (rand_init): Ditto.
- (limited_big_rand): Ditto.
+ * thread_pthread.c (rb_reserved_fd_p): should check owner_process pid
+ to avoid false positive in forked child process.
-Sun Jun 9 14:41:05 2013 Tanaka Akira <akr@fsij.org>
+Wed Jul 15 18:31:18 2015 Eric Wong <e@80x24.org>
- * bignum.c (rb_integer_pack): numwords_allocated argument removed.
+ * proc.c (proc_mark): remove redundant check
+ * vm.c (env_mark): ditto
- * internal.h (rb_integer_pack): Follow the above change.
+Wed Jul 15 17:27:40 2015 Eric Wong <e@80x24.org>
- * hash.c (rb_hash): Ditto.
+ * iseq.c (iseq_mark): remove check for data pointer
+ * proc.c (binding_mark): ditto
+ * vm.c (rb_thread_mark): ditto
+ * vm_trace.c (tp_mark): ditto
- * time.c (v2w_bignum): Ditto.
+Wed Jul 15 16:55:04 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * pack.c (pack_pack): Ditto.
+ * encoding.c (enc_autoload): drop dummy encoding flag from
+ the loaded encoding index. this flag is used only in this
+ source.
- * random.c (int_pair_to_real_inclusive): Ditto.
- (rand_init): Ditto.
- (random_load): Ditto.
- (limited_big_rand): Ditto.
+Wed Jul 15 14:39:29 2015 Koichi Sasada <ko1@atdot.net>
-Sun Jun 9 09:34:44 2013 Tanaka Akira <akr@fsij.org>
+ * vm.c (vm_make_env_each): add comments about env layout.
+ Do not use `i' to specify `new_ep'.
- * bignum.c (big2str_base_powerof2): New function.
- (rb_big2str0): Use big2str_base_powerof2 if base is 2, 4, 8, 16 or 32.
+ * vm.c (rb_proc_create, rb_vm_make_proc_lambda): envval is not used.
-Sun Jun 9 00:59:04 2013 Tanaka Akira <akr@fsij.org>
+Wed Jul 15 08:59:19 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * hash.c (rb_hash): Use rb_integer_pack to obtain least significant
- long integer.
+ * gc.h (RUBY_MARK_UNLESS_NULL): evaluate the argument only once
+ to get rid of inadvertent side effects.
-Sat Jun 8 23:56:00 2013 Tanaka Akira <akr@fsij.org>
+Wed Jul 15 02:53:11 2015 Koichi Sasada <ko1@atdot.net>
- * numeric.c (rb_num_to_uint): Use rb_absint_size instead of
- RBIGNUM_LEN.
+ * vm_core.h, vm.c: remove rb_proc_t::envval because we can know it via
+ rb_proc_t::block::ep.
-Sat Jun 8 22:53:45 2013 Tanaka Akira <akr@fsij.org>
+ rb_vm_proc_envval(const rb_proc_t *proc) returns an Env object which
+ the Proc object use.
- * marshal.c (r_object0): Use rb_integer_unpack.
+ * proc.c: catch up this fix.
-Sat Jun 8 22:18:57 2013 Tanaka Akira <akr@fsij.org>
+ * vm_dump.c (rb_vmdebug_proc_dump_raw): ditto.
- * time.c (v2w): Use rb_absint_size instead of RBIGNUM_LEN.
+Wed Jul 15 02:27:22 2015 Koichi Sasada <ko1@atdot.net>
-Sat Jun 8 21:47:33 2013 Tanaka Akira <akr@fsij.org>
+ * vm_core.h, vm.c: remove rb_env_t::prev_envval because we can know it
+ via env->ep.
- * time.c (v2w_bignum): Simplified using rb_integer_pack.
- (rb_big_abs_find_maxbit): Removed.
+ rb_vm_env_prev_envval(env) returns prev_envval via env->ep.
-Sat Jun 8 21:03:40 2013 Tanaka Akira <akr@fsij.org>
+ * vm_core.h (rb_vm_env_local_variables): change parameter type
+ from VALUE (T_DATA/env) to `const rb_env_t *' to make same as
+ rb_vm_env_prev_envval().
- * bignum.c (rb_absint_singlebit_p): New function.
+ * proc.c: catch up these changes.
- * internal.h (rb_absint_singlebit_p): Declared.
+ * vm_dump.c: ditto.
- * time.c (v2w_bignum): Use rb_absint_singlebit_p instead of
- rb_big_abs_find_minbit.
- (rb_big_abs_find_minbit): Removed.
+ * vm.c: rename macros.
-Sat Jun 8 20:24:23 2013 Tanaka Akira <akr@fsij.org>
+ * ENV_IN_HEAP_P() to VM_EP_IN_HEAP_P() because it uses ep.
+ * ENV_VAL() to VM_ENV_EP_ENVVAL() because it is too short.
- * time.c (rb_big_abs_find_maxbit): Use rb_absint_size.
- (bdigit_find_maxbit): Removed.
+Wed Jul 15 01:09:09 2015 Koichi Sasada <ko1@atdot.net>
-Sat Jun 8 19:47:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ * vm.c: refactoring Proc/Env related code.
- * class.c (include_modules_at): invalidate method cache if included
- module contains constants
+ * vm_core.h: remove blockprocval field from rb_proc_t and rb_binding_t.
+ Instead of this field, mark given block in Proc at rb_env_t::env.
- * test/ruby/test_module.rb: add test
+ * vm.c (vm_make_env_each): make an Env object with this layout.
+ And also simplify parameters.
-Sat Jun 8 19:31:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ * proc.c: catch up this fix.
- * random.c (limited_big_rand): declare rnd, lim and mask as uint32_t
- to avoid 64 bit to 32 bit shorten warnings.
+ * vm_core.h: remove rb_env_t::local_size because it is not used.
-Sat Jun 8 19:23:53 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * vm_dump.c (rb_vmdebug_env_dump_raw): catch up this fix.
- * win32/Makefile.sub: r41163 changed win32/win32.c and configure.in
- but it didn't treat about mswin32/mswin64, so fix it.
- NOTE: this needs a review by usa whether additional condition is
- required or not.
+ * vm_core.h (rb_vm_make_env_object): remove rb_vm_make_env_object()
+ because it is only referred from vm.c.
-Sat Jun 8 19:06:26 2013 Tanaka Akira <akr@fsij.org>
+ * vm_eval.c (eval_string_with_cref): catch up this fix.
- * random.c: Unused RBignum internal accessing macros removed.
+Wed Jul 15 00:03:36 2015 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-Sat Jun 8 19:04:15 2013 Tanaka Akira <akr@fsij.org>
+ * gc.c (__has_feature): move into internal.h.
- * random.c (limited_big_rand): The argument, limit, is changed to
- VALUE. Use rb_integer_pack and rb_integer_unpack.
+ * internal.h (__has_feature): ditto.
-Sat Jun 8 17:15:18 2013 Tanaka Akira <akr@fsij.org>
+ * internal.h (__has_extension): new macro.
- * random.c (make_seed_value): Fix the length given for
- rb_integer_unpack.
+ * internal.h (STATIC_ASSERT): use _Static_assert with
+ clang. [ruby-core:69931] [Bug #11343]
-Sat Jun 8 16:38:02 2013 Tanaka Akira <akr@fsij.org>
+Wed Jul 15 00:00:00 2015 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
- * bignum.c (rb_integer_unpack): Don't use rb_funcall if possible.
+ * random.c (fill_random_bytes_syscall): fix compile error with
+ clang. [ruby-core:69931] [Bug #11343]
- * random.c: Use uint32_t for elements of seed.
- (make_seed_value): Use rb_integer_unpack.
+Tue Jul 14 11:22:42 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Jun 8 15:58:18 2013 Tanaka Akira <akr@fsij.org>
+ * lib/webrick/utils.rb (WEBrick::Utils::TimeoutHandler#register):
+ notify the handler thread of new timeout registration.
- * random.c (rand_init): Add a cast to fix clang compile error:
- random.c:410:32: error: implicit conversion loses integer precision:
- 'size_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
- This cast doesn't cause a problem because len is not bigger than
- MT_MAX_STATE.
+ * lib/webrick/utils.rb (WEBrick::Utils::TimeoutHandler#initialize):
+ make sleep intervals adaptive than fixed period intervals.
-Sat Jun 8 15:30:03 2013 Tanaka Akira <akr@fsij.org>
+ * lib/webrick/server.rb (WEBrick::GenericServer#start): flush
+ shutdown pipe.
- * random.c (rand_init): Use rb_integer_pack.
- (roomof): Removed.
+ * lib/webrick/server.rb (WEBrick::GenericServer#stop): request the
+ server to stop immediately by sending data via shutdown pipe.
-Sat Jun 8 14:58:32 2013 Tanaka Akira <akr@fsij.org>
+Mon Jul 13 23:58:08 2015 Stefano Tortarolo <stefano.tortarolo@gmail.com>
- * internal.h (INTEGER_PACK_FORCE_BIGNUM): New flag constant.
+ * lib/webrick/httpproxy.rb (WEBrick::HTTPProxyServer#do_CONNECT):
+ fix typos in debugger statements. [Fix GH-967]
- * bignum.c (rb_integer_unpack): Support INTEGER_PACK_FORCE_BIGNUM.
+Mon Jul 13 19:11:35 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * random.c (int_pair_to_real_inclusive): Use
- INTEGER_PACK_FORCE_BIGNUM to use rb_big_mul instead of rb_funcall.
+ * lib/timeout.rb (timeout): warn as deprecated for a long time.
-Sat Jun 8 14:17:01 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Jul 13 01:37:27 2015 Zachary Scott <zzak@ruby-lang.org>
- * configure.in: check for NET_LUID. header macro varies across
- compiler versions.
+ * ext/openssl/ossl.c: [DOC] Backport ruby/openssl@dbb3fdb [Bug #11345]
+ Thanks to Tomoya Chiba for the report and help with patch.
- * win32/win32.c: use configured macro.
+Sun Jul 12 09:20:02 2015 Shota Fukumori <her@sorah.jp>
-Sat Jun 8 11:59:55 2013 Tanaka Akira <akr@fsij.org>
+ * ext/socket/basicsocket.c: [DOC] typo (Errno::AGAIN -> Errno::EAGAIN)
- * random.c (int_pair_to_real_inclusive): Use rb_funcall instead of
- rb_big_mul because rb_integer_unpack can return a Fixnum.
+ * ext/socket/socket.c: ditto
-Sat Jun 8 11:17:39 2013 Tanaka Akira <akr@fsij.org>
+ * ext/socket/tcpserver.c: ditto
- * random.c (int_pair_to_real_inclusive): Use rb_integer_pack.
+ * ext/socket/udpsocket.c: ditto
-Sat Jun 8 09:49:42 2013 Tanaka Akira <akr@fsij.org>
+ * ext/socket/unixserver.c: ditto
- * random.c (int_pair_to_real_inclusive): Use rb_integer_unpack.
+ * io.c: ditto
-Sat Jun 8 08:12:22 2013 Tanaka Akira <akr@fsij.org>
+Sun Jul 12 06:42:23 2015 ksss <co000ri@gmail.com>
- * random.c (random_load): Use rb_integer_pack.
+ * test/stringio/test_stringio.rb (test_sysread): add a test for
+ StringIO#sysread. [Fix GH-966]
-Sat Jun 8 06:15:46 2013 Tanaka Akira <akr@fsij.org>
+Sat Jul 11 21:16:34 2015 ksss <co000ri@gmail.com>
- * random.c (numberof): Removed.
+ * ext/stringio/stringio.c (Init_stringio): [DOC] Fix an example,
+ StringIO#puts should be set "\n" at last. [Fix GH-965]
-Sat Jun 8 06:00:47 2013 Tanaka Akira <akr@fsij.org>
+Sat Jul 11 12:45:51 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * random.c: include internal.h.
- (mt_state): Use rb_integer_unpack.
+ * lib/timeout.rb (Timeout#timeout): remove regexp with wrong line
+ number and fix caller depth.
-Sat Jun 8 00:55:51 2013 Tanaka Akira <akr@fsij.org>
+Fri Jul 10 22:05:50 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * bignum.c (integer_pack_loop_setup): word_num_nailbytes_ret argument
- removed.
- (rb_integer_pack): Follow the above change.
- (rb_integer_unpack): Follow the above change.
+ * lib/timeout.rb (ExitException): removed internal exception class
+ and use Timeout::Error instead, as using throw/catch to isolate
+ each timeouts now. [ruby-dev:49179] [Bug #11344]
-Sat Jun 8 00:37:32 2013 Tanaka Akira <akr@fsij.org>
+Fri Jul 10 17:41:54 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * bignum.c (validate_integer_pack_format): Renamed from
- validate_integer_format.
- (integer_pack_loop_setup): Renamed from integer_format_loop_setup.
- (integer_pack_fill_dd): Renamed from int_export_fill_dd.
- (integer_pack_take_lowbits): Renamed from int_export_take_lowbits.
- (integer_unpack_push_bits): Renamed from int_import_push_bits.
+ * dir.c (is_case_sensitive): get attributes by the file descriptor
+ of open directory, instead of using mount point name.
-Fri Jun 7 23:58:06 2013 Tanaka Akira <akr@fsij.org>
+Fri Jul 10 10:46:02 2015 ksss <co000ri@gmail.com>
- * bignum.c (rb_integer_pack): Arguments changed. Use flags to
- specify word order and byte order.
- (rb_integer_unpack): Ditto.
- (validate_integer_format): Follow the above change.
- (integer_format_loop_setup): Ditto.
+ * ext/stringio/stringio.c (writable): remove unnecessary check for
+ deprecated safe level 4. [Fix GH-963]
- * pack.c: Ditto.
+Thu Jul 9 15:07:12 2015 NAKAMURA Usaku <usa@ruby-lang.org>
- * internal.h: Ditto.
- (INTEGER_PACK_MSWORD_FIRST): Defined.
- (INTEGER_PACK_LSWORD_FIRST): Ditto.
- (INTEGER_PACK_MSBYTE_FIRST): Ditto.
- (INTEGER_PACK_LSBYTE_FIRST): Ditto.
- (INTEGER_PACK_NATIVE_BYTE_ORDER): Ditto.
- (INTEGER_PACK_LITTLE_ENDIAN): Ditto.
- (INTEGER_PACK_BIG_ENDIAN): Ditto.
+ * win32/win32.c (waitpid): return immediately if interrupted.
+ reported by <takkanm AT gmail.com> [ruby-dev:49176] [Bug #11340]
-Fri Jun 7 22:10:50 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Thu Jul 9 13:03:46 2015 Koichi Sasada <ko1@atdot.net>
- * lib/rubygems/specification.rb (Gem::Specification#to_yaml):
- use Gem::NoAliasYAMLTree.create instead of Gem::NoAliasYAMLTree.new
- to suppress deprecated warnings.
+ * vm_insnhelper.c (vm_search_super_method): use CI_SET_FASTPATH().
-Fri Jun 7 21:39:39 2013 Tanaka Akira <akr@fsij.org>
+Thu Jul 9 11:07:06 2015 Koichi Sasada <ko1@atdot.net>
- * bignum.c (rb_integer_pack): Renamed from rb_int_export.
- (rb_integer_unpack): Renamed from rb_int_import.
+ * vm_core.h: remove rb_call_info_t::klass because
+ rb_callable_method_entry_t has information about defined class.
- * internal.h, pack.c: Follow the above change.
+ * vm_insnhelper.c (vm_search_method): don't set ci->klass because
+ it is removed.
-Fri Jun 7 21:05:26 2013 Tanaka Akira <akr@fsij.org>
+ * vm_insnhelper.c (rb_equal_opt): ditto.
- * bignum.c (integer_format_loop_setup): Extracted from rb_int_export
- and rb_int_import.
+ * vm_insnhelper.c (vm_search_superclass): removed because it is too
+ simple to write code directly.
-Fri Jun 7 19:48:38 2013 Tanaka Akira <akr@fsij.org>
+ * vm_insnhelper.c (vm_defined): don't use vm_search_superclass().
+ This fix avoid searching current callable `me' twice.
- * bignum.c (validate_integer_format): Extracted from rb_int_export and
- rb_int_import.
+ * vm_insnhelper.c (vm_search_super_method): ditto.
-Fri Jun 7 19:23:15 2013 Tanaka Akira <akr@fsij.org>
+Thu Jul 9 10:03:10 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * bignum.c (rb_absint_size): Use numberof.
- (rb_int_export): Ditto.
+ * lib/net/http/responses.rb: Added 308 status to CODE_TO_OBJ list.
+ [fix GH-961] Patch by @billinghamj
-Fri Jun 7 18:58:56 2013 Tanaka Akira <akr@fsij.org>
+Thu Jul 9 09:34:14 2015 Koichi Sasada <ko1@atdot.net>
- * internal.h (numberof): Gathered from various files.
+ * vm_core.h (rb_control_frame_t): fix comments (layout index).
- * 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.
+Thu Jul 9 09:25:50 2015 Zachary Scott <e@zzak.io>
-Fri Jun 7 18:24:39 2013 Tanaka Akira <akr@fsij.org>
+ * parse.y: Improve duplicate key warning with patch by @andremedeiros
+ [Fix GH-938] https://github.com/ruby/ruby/pull/938 [Bug #11327]
- * bignum.c (rb_absint_size): Declare a variable, i, just before used
- to suppress a warning.
- (rb_int_export): Ditto.
+Wed Jul 8 07:43:01 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Fri Jun 7 17:41:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ * lib/csv.rb: typo fix [ci skip][fix GH-958] Patch by @henrik
- * bignum.c (rb_absint_size): explicit cast to BDIGIT to avoid implicit
- 64 bit to 32 bit shortening warning
- * bignum.c (rb_int_export): ditto
- * bignum.c (int_import_push_bits): ditto
+Wed Jul 8 04:42:27 2015 Eric Wong <e@80x24.org>
-Fri Jun 7 17:31:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ * iseq.c (iseq_data_to_ary): dump kw_arg as symbol
+ * test/-ext-/iseq_load/test_iseq_load.rb: test kw_arg roundtrip
+ [ruby-core:69891] [Bug #11338]
- * internal.h (RCLASS_SUPER): use descriptive variable name
- * internal.h (RCLASS_SET_SUPER): ditto
+Tue Jul 7 18:18:41 2015 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-Fri Jun 7 13:25:27 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * random.c (fill_random_bytes_syscall): fix compile error.
- * ext/json/fbuffer/fbuffer.h (fbuffer_append_str): change the place of
- RB_GC_GUARD. it should be after the object is used.
+Tue Jul 7 16:47:30 2015 Eric Wong <e@80x24.org>
-Fri Jun 7 13:22:43 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * compile.c (COMPILE_ERROR): reduce GET_THREAD() calls
- * gc.c (before_gc_sweep): noinline can also avoid the segv instead of
- -O0 of r41084. this way is expected less slow.
+Tue Jul 7 16:39:04 2015 Eric Wong <e@80x24.org>
-Fri Jun 7 11:45:42 2013 Kenta Murata <mrkn@cookpad.com>
+ * random.c (fill_random_bytes_syscall): return -1 for error
+ * random.c (fill_random_bytes): try urandom on syscall failure
- * rational.c (numeric_quo): move num_quo in numeric.c to numeric_quo
- in rational.c to refer canonicalization state for mathn support.
- [ruby-core:41575] [Bug #5736]
+Tue Jul 7 15:02:18 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * numeric.c (num_quo): ditto.
+ * file.c (rb_str_normalize_ospath): skip invalid byte sequence not
+ to loop infinitely. this case usually does not happen as the
+ input name should come from real file systems.
- * test/test_mathn.rb: add a test for the change at r41109.
+Tue Jul 7 14:40:08 2015 Koichi Sasada <ko1@atdot.net>
-Fri Jun 7 11:41:42 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm_backtrace.c: remove debug flag introduced accidentally.
- * configure.in: revert r41106. size_t may not be unsigned
+Tue Jul 7 12:05:37 2015 Koichi Sasada <ko1@atdot.net>
- * bignum.c (rb_absint_size_in_word, rb_int_export, rb_int_import): use
- NUM2SIZET() and SIZET2NUM() already defined in ruby/ruby.h.
+ * cont.c (cont_free): remove mysterious fflush()
+ introduced at r19890, maybe accidentally.
-Fri Jun 7 11:28:37 2013 Masaya Tarui <tarui@ruby-lang.org>
+Tue Jul 7 11:45:14 2015 Koichi Sasada <ko1@atdot.net>
- * gc.c: use oldgen bitmap as initial mark bitmap when major gc.
- so can skip oldgen bitmap check around mark & sweep.
- * gc.c (slot_sweep_body): change scan algorithm for performance:
- from object's pointer base to bitmap one.
+ * proc.c (rb_method_call): because data->me should be non-NULL,
+ do not check data->me
-Fri Jun 7 11:25:56 2013 Masaya Tarui <tarui@ruby-lang.org>
+ * proc.c (method_inspect): ditto.
- * gc.c: introduce oldgen bitmap for preparing performance tuning.
+Tue Jul 7 11:37:25 2015 Koichi Sasada <ko1@atdot.net>
-Fri Jun 7 11:20:57 2013 Masaya Tarui <tarui@ruby-lang.org>
+ * vm_core.h: remove rb_iseq_t::orig because rb_iseq_clone()
+ no longer exists.
- * gc.c (MARKED_IN_BITMAP, MARK_IN_BITMAP, CLEAR_IN_BITMAP): bring
- bitmap macros in one place, and introduce BITMAP_BIT.
+ * iseq.c: don't use rb_iseq_t::orig.
-Fri Jun 7 11:18:35 2013 Masaya Tarui <tarui@ruby-lang.org>
+Tue Jul 07 11:25:57 2015 Koichi Sasada <ko1@atdot.net>
- * array.c (ary_new): change order of allocation in order
- to remove FL_OLDGEN operation.
+ * iseq.c, internal.h (rb_iseq_clone): removed because we don't need to
+ clone iseq any more.
-Fri Jun 7 11:16:28 2013 Masaya Tarui <tarui@ruby-lang.org>
+ * class.c (clone_method): share iseq between cloned methods. All of
+ method dependent information are able to refer from method entry.
- * tool/rdocbench.rb: add gc total time information.
+Tue Jul 7 04:42:25 2015 Eric Wong <e@80x24.org>
-Fri Jun 7 10:12:01 2013 Koichi Sasada <ko1@atdot.net>
+ * string.c (Init_String): use rb_str_freeze for String#freeze
+ to resize internal buffer
+ [ruby-core:69870] [Feature #11330]
- * gc.c: remove "Sunny" terminology.
- "Sunny" doesn't mean antonym of "Shady" (questionable, doubtful, etc).
- Instead of "Sunny", use "non-shady" or "normal".
+Tue Jul 7 04:12:32 2015 Koichi Sasada <ko1@atdot.net>
-Fri Jun 7 09:29:33 2013 Kenta Murata <mrkn@cookpad.com>
+ * vm.c (vm_define_method): remove an unused local variable.
- * bignum.c (rb_int_import): explicitly casting BDIGIT_DBL to BDIGIT
- to prevent warning.
+Tue Jul 7 03:57:28 2015 Koichi Sasada <ko1@atdot.net>
-Fri Jun 7 07:29:33 2013 Tanaka Akira <akr@fsij.org>
+ * vm_core.h: remove rb_iseq_t::defined_method_id because it is not
+ needed.
- * internal.h (rb_int_export): countp argument is split into
- wordcount_allocated and wordcount.
+ * eval.c (frame_func_id): simplify. rb_callable_method_entry_t
+ has enough information.
- * bignum.c (rb_int_export): Follow the above change.
+ * eval.c (frame_called_id): ditto.
- * pack.c (pack_pack): Ditto.
+ * iseq.c (prepare_iseq_build): catch up this fix.
-Fri Jun 7 07:17:00 2013 Kenta Murata <mrkn@mrkn.jp>
+ * proc.c (rb_mod_define_method): ditto.
- * NEWS: describe a compatibility issue of Numeric#quo
- introduced at r41109.
+ * vm.c (vm_define_method): ditto.
-Fri Jun 7 07:15:00 2013 Kenta Murata <mrkn@mrkn.jp>
+Tue Jul 7 03:47:26 2015 Koichi Sasada <ko1@atdot.net>
- * NEWS: fix style.
+ * vm_core.h: remove a useless declaration.
-Fri Jun 7 06:48:17 2013 Benoit Daloze <eregontp@gmail.com>
+Tue Jul 7 03:33:20 2015 Koichi Sasada <ko1@atdot.net>
- * numeric.c: remove unused ID id_to_r introduced in r41109.
+ * vm_core.h: remove rb_iseq_t::klass to reduce dynamic data.
-Fri Jun 7 06:15:31 2013 Tanaka Akira <akr@fsij.org>
+ * internal.h, iseq.c (rb_iseq_klass): remove it because
+ rb_iseq_t::klass is removed.
- * bignum.c (rb_int_import): New function.
- (int_import_push_bits): Ditto.
+ * vm_insnhelper.c (vm_super_outside): do not see cfp->iseq, but
+ check callable method entry on a frame.
+ This fix simplify the logic to search super class.
- * internal.h (rb_int_import): Declared.
+ * test/ruby/test_method.rb: support super() from Proc.
+ Now, [Bug #4881] and [Bug #3136] was solved.
- * pack.c (pack_unpack): Use rb_int_import for BER compressed integer.
+ * proc.c (rb_mod_define_method): catch up this change.
-Thu Jun 6 22:24:00 2013 Kenta Murata <mrkn@mrkn.jp>
+ * vm.c (vm_define_method): ditto.
- * numeric.c (num_quo): Use to_r method to convert the receiver to
- rational. [ruby-core:41575] [Bug #5736]
+ * vm_backtrace.c (rb_profile_frames): now, each `frame' objects
+ are rb_callable_method_entry_t data or iseq VALUEs.
- * test/ruby/test_numeric.rb: add a test for the above change.
+ This fix introduce minor compatibility issue that
+ rb_profile_frame_label() always returns
+ rb_profile_frame_base_label().
-Thu Jun 6 20:40:17 2013 Tanaka Akira <akr@fsij.org>
+ * test/-ext-/debug/test_profile_frames.rb: catch up this change.
- * configure.in: Invoke RUBY_REPLACE_TYPE for size_t.
- Don't invoke RUBY_CHECK_PRINTF_PREFIX for size_t to avoid conflict
- with RUBY_REPLACE_TYPE.
+Tue Jul 7 01:52:14 2015 Koichi Sasada <ko1@atdot.net>
- * internal.h (rb_absint_size): Declared.
- (rb_absint_size_in_word): Ditto.
- (rb_int_export): Ditto.
+ * cont.c (fiber_init): initialize control frame correctly.
+ This fix does not affect any ordinal execution, but
+ affects debug prints.
- * bignum.c (rb_absint_size): New function.
- (rb_absint_size_in_word): Ditto.
- (int_export_fill_dd): Ditto.
- (int_export_take_lowbits): Ditto.
- (rb_int_export): Ditto.
+Mon Jul 6 17:59:05 2015 Koichi Sasada <ko1@atdot.net>
- * pack.c (pack_pack): Use rb_int_export for BER compressed integer.
+ * vm_insnhelper.c (vm_search_super_method): do not skip calling
+ same methods in super.
+ [Bug #3351]
-Thu Jun 6 19:31:33 2013 Tadayoshi Funaba <tadf@dotrb.org>
+ * test/ruby/test_super.rb: fix a test.
- * ext/date/date_core.c: fixed coding error [ruby-core:55337].
- reported by Riley Lynch.
+Mon Jul 6 17:59:11 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Thu Jun 6 14:16:37 2013 Narihiro Nakamura <authornari@gmail.com>
+ * ext/tk/tcltklib.c: removed deprecated safe level.
- * ext/objspace/object_tracing.c: rename allocation_info to
- lookup_allocation_info. At times I confused "struct
- allocation_info" with "function allocation_info".
+Mon Jul 6 17:16:37 2015 Koichi Sasada <ko1@atdot.net>
-Thu Jun 6 13:57:06 2013 Narihiro Nakamura <authornari@gmail.com>
+ * method.h, proc.c (rb_method_entry_location): make it static
+ and remove prefix `rb_' because it is used only in proc.c.
- * ext/objspace/object_tracing.c: allocation_info function isn't
- called by any other file.
+Mon Jul 6 16:42:10 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Thu Jun 6 09:41:00 2013 Kenta Murata <mrkn@cookpad.com>
+ * test/lib/memory_status.rb: removed redundant path.
- * numeric.c (num_quo): should return a Float for a Float argument.
- [ruby-dev:44710] [Bug #5515]
+Mon Jul 6 01:18:11 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/ruby/test_fixnum.rb: Add an assertion for the above change.
+ * test/lib/test/unit/parallel.rb: make @@project_dir one level
+ upper as this file had moved one level deeper.
- * test/ruby/test_bignum.rb: ditto.
+Sun Jul 5 23:54:10 2015 mizokami <suzunatsu@yahoo.com>
-Thu Jun 6 00:59:44 2013 Masaya Tarui <tarui@ruby-lang.org>
+ * lib/optparse.rb: [DOC] Fix typo.
- * gc.c (gc_mark): get rid of pushing useless objects.
- * gc.c (rgengc_rememberset_mark): bypass gc_mark() in order to push
- sunny old object at minor gc.
- * gc.c (gc_mark_children): move sunny old check to gc_mark().
- * gc.c (rgengc_check_shady): remove DEMOTE that already unnecessary.
- * gc.c (rb_gc_writebarrier): ditto.
+Sun Jul 5 18:25:37 2015 Eric Wong <e@80x24.org>
- change sunny old check point in order to save mark stack and
- remove unnatural rest_sweep & demote.
+ * gc.c (gc_profile_record_get): fix spelling error in keys
-Thu Jun 6 00:52:42 2013 Masaya Tarui <tarui@ruby-lang.org>
+Sun Jul 5 14:49:01 2015 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
- * gc.c (rgengc_rememberset_mark): change scan algorithm for performance:
- from object's pointer base to bitmap one.
+ * README.md: fix a typo pointed out by raoulvdberge.
+ https://github.com/ruby/ruby/pull/953#commitcomment-11998186
-Thu Jun 6 00:30:04 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Sun Jul 5 12:56:20 2015 Irvi Firqotul Aini <viarc7@gmail.com>
- * win32/win32.c (NET_LUID): define it on MinGW32.
- mingw-w64 has NET_LUID but mingw32 (mingw.org) still doesn't have
- NET_LUID. reported by taco on IRC
+ * README.md: Added link HowToReport bugs.
-Thu Jun 6 00:05:08 2013 Akinori MUSHA <knu@iDaemons.org>
+Sun Jul 5 10:51:48 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * string.c (String#b): Allow code range scan to happen later so
- ascii_only? on a result string returns the correct value.
- [ruby-core:55315] [Bug #8496]
+ * array.c (rb_ary_sort_bang): the original array may not be
+ embedded even if a substitution array is embedded, as it is
+ embedded when the original array is short enough but not
+ embedded. [ruby-dev:49166] [Bug #11332]
-Wed Jun 5 22:40:42 2013 Shugo Maeda <shugo@ruby-lang.org>
+Sun Jul 5 09:31:40 2015 Eric Wong <e@80x24.org>
- * lib/net/imap.rb (capability_response): should ignore trailing
- spaces. Thanks, Peter Kovacs. [ruby-core:55024] [Bug #8415]
+ * test/ruby/test_process.rb: test for fd=3 usability in child
- * test/net/imap/test_imap_response_parser.rb: related test.
+Sat Jul 4 19:43:31 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Wed Jun 5 21:17:08 2013 Tanaka Akira <akr@fsij.org>
+ * Add test case for empty array and first method with args.
+ Patch by @yui-knk [fix GH-955]
- * bignum.c (big_fdiv): Use nlz() instead of bdigbitsize().
- (bdigbitsize): Removed.
+Sat Jul 4 19:39:08 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Wed Jun 5 20:32:00 2013 Kenta Murata <mrkn@cookpad.com>
+ * Add test for `Enumerable#sort` with block. Patch by @yui-knk
+ [fix GH-954]
- * include/ruby/ruby.h: fix alignment in comment.
+Sat Jul 4 14:38:43 2015 Eric Wong <e@80x24.org>
-Wed Jun 5 20:05:29 2013 Tanaka Akira <akr@fsij.org>
+ * enum.c (zip_ary): remove volatile, use RB_GC_GUARD
+ (zip_i): ditto
- * random.c (int_pair_to_real_inclusive): Add a cast to BDIGIT.
- (random_load): Fix shift width for fixnums.
- Re-implement bignum extraction without ifdefs.
+Sat Jul 4 10:42:57 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Jun 5 15:26:10 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * lib/rubygems/test_case.rb (teardown): do not delete features
+ loaded from the original load paths, the same libraries should
+ be loaded again when the same features are required.
+ [ruby-dev:49031] [Bug #11222]
- * gc.c (before_gc_sweep): don't optimize it to avoid segv on Ubuntu
- 10.04 gcc 4.4.
- http://u32.rubyci.org/~chkbuild/ruby-trunk/log/20130527T190301Z.diff.html.gz
+Sat Jul 4 09:38:52 2015 Eric Wong <e@80x24.org>
-Wed Jun 5 09:46:46 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * vm.c (rb_vm_mark): reduce branches for always-set VM fields
+ (rb_vm_add_root_module): ditto
- * test/fileutils/test_fileutils.rb (TestFileUtils#test_mkdir): add
- EACCES for Windows.
+Fri Jul 03 20:05:10 2015 Koichi Sasada <ko1@atdot.net>
-Wed Jun 5 08:13:37 2013 Tanaka Akira <akr@fsij.org>
+ * method.h: introduce rb_callable_method_entry_t to remove
+ rb_control_frame_t::klass.
+ [Bug #11278], [Bug #11279]
- * bignum.c (rb_big_pow): Don't need to multiply SIZEOF_BDIGITS.
- Use nlz instead of bitlength_bdigit.
- (bitlength_bdigit): Removed.
+ rb_method_entry_t data belong to modules/classes.
+ rb_method_entry_t::owner points defined module or class.
-Wed Jun 5 07:14:18 2013 Tadayoshi Funaba <tadf@dotrb.org>
+ module M
+ def foo; end
+ end
- * ext/date/date_core.c (d_lite_cmp, d_lite_equal): simplified.
+ In this case, owner is M.
-Wed Jun 5 07:07:01 2013 Tadayoshi Funaba <tadf@dotrb.org>
+ rb_callable_method_entry_t data belong to only classes.
+ For modules, MRI creates corresponding T_ICLASS internally.
+ rb_callable_method_entry_t can also belong to T_ICLASS.
- * ext/date/date_core.c: fixed a bug [ruby-core:55295]. reported
- by Riley Lynch.
+ rb_callable_method_entry_t::defined_class points T_CLASS or
+ T_ICLASS.
+ rb_method_entry_t data for classes (not for modules) are also
+ rb_callable_method_entry_t data because it is completely same data.
+ In this case, rb_method_entry_t::owner == rb_method_entry_t::defined_class.
-Wed Jun 5 06:44:08 2013 Eric Hodel <drbrain@segment7.net>
+ For example, there are classes C and D, and includes M,
- * lib/rubygems: Update to RubyGems 2.0.3
+ class C; include M; end
+ class D; include M; end
- * test/rubygems: Tests for the above.
+ then, two T_ICLASS objects for C's super class and D's super class
+ will be created.
- * NEWS: Added RubyGems 2.0.3 note.
+ When C.new.foo is called, then M#foo is searched and
+ rb_callable_method_t data is used by VM to invoke M#foo.
-Wed Jun 5 06:35:15 2013 Eric Hodel <drbrain@segment7.net>
+ rb_method_entry_t data is only one for M#foo.
+ However, rb_callable_method_entry_t data are two (and can be more).
+ It is proportional to the number of including (and prepending)
+ classes (the number of T_ICLASS which point to the module).
- * doc/marshal.rdoc: Add description of Marshal format.
+ Now, created rb_callable_method_entry_t are collected when
+ the original module M was modified. We can think it is a cache.
-Wed Jun 5 01:16:09 2013 Benoit Daloze <eregontp@gmail.com>
+ We need to select what kind of method entry data is needed.
+ To operate definition, then you need to use rb_method_entry_t.
- * array.c (Array#+): fix documentation example.
- Patch by Logan Serman. [Fixes GH-324]
+ You can access them by the following functions.
-Wed Jun 5 00:21:54 2013 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
+ * rb_method_entry(VALUE klass, ID id);
+ * rb_method_entry_with_refinements(VALUE klass, ID id);
+ * rb_method_entry_without_refinements(VALUE klass, ID id);
+ * rb_resolve_refined_method(VALUE refinements, const rb_method_entry_t *me);
- * lib/irb/lc/ja/help-message: update help messages.
- following r41028. [ruby-dev:46707] [Feature #7510]
+ To invoke methods, then you need to use rb_callable_method_entry_t
+ which you can get by the following APIs corresponding to the
+ above listed functions.
-Wed Jun 5 00:09:32 2013 Tanaka Akira <akr@fsij.org>
+ * rb_callable_method_entry(VALUE klass, ID id);
+ * rb_callable_method_entry_with_refinements(VALUE klass, ID id);
+ * rb_callable_method_entry_without_refinements(VALUE klass, ID id);
+ * rb_resolve_refined_method_callable(VALUE refinements, const rb_callable_method_entry_t *me);
- * marshal.c (r_object0): Generalize a round up expression.
- Use BDIGIT instead of int.
+ VM pushes rb_callable_method_entry_t, so that rb_vm_frame_method_entry()
+ returns rb_callable_method_entry_t.
+ You can check a super class of current method by
+ rb_callable_method_entry_t::defined_class.
-Tue Jun 4 23:44:02 2013 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
+ * method.h: renamed from rb_method_entry_t::klass to
+ rb_method_entry_t::owner.
- * object.c (rb_Hash): fix docs. patched by Stefan Sch"ussler.
- [ruby-core:55299] [Bug #8487]
+ * internal.h: add rb_classext_struct::callable_m_tbl to cache
+ rb_callable_method_entry_t data.
-Tue Jun 4 23:16:49 2013 Benoit Daloze <eregontp@gmail.com>
+ We need to consider about this field again because it is only
+ active for T_ICLASS.
- * lib/irb/completion.rb: Use %w literal construction for long lists.
- Patch by Dave Goodchild. [Fixes GH-299]
+ * class.c (method_entry_i): ditto.
-Tue Jun 4 23:08:42 2013 Benoit Daloze <eregontp@gmail.com>
+ * class.c (rb_define_attr): rb_method_entry() does not takes
+ defined_class_ptr.
- * ext/objspace/objspace.c: improve wording and remove duplicated comment.
- Based on a patch by Dave Goodchild. [Fixes GH-299]
+ * gc.c (mark_method_entry): mark RCLASS_CALLABLE_M_TBL() for T_ICLASS.
-Tue Jun 4 18:41:47 2013 Tanaka Akira <akr@fsij.org>
+ * cont.c (fiber_init): rb_control_frame_t::klass is removed.
- * bignum.c (bitlength_bdigit): Fix an off-by-one error.
+ * proc.c: fix `struct METHOD' data structure because
+ rb_callable_method_t has all information.
-Tue Jun 4 15:30:00 2013 Kenta Murata <mrkn@cookpad.com>
+ * vm_core.h: remove several fields.
+ * rb_control_frame_t::klass.
+ * rb_block_t::klass.
- * ext/bigdecimal/lib/bigdecimal/util.rb (Float#to_d): fix the number
- of figures. Patch by Vipul A M <vipulnsward@gmail.com>.
- https://github.com/ruby/ruby/pull/323 fix GH-323
+ And catch up changes.
- * test/bigdecimal/test_bigdecimal_util.rb: fix for the above change.
+ * eval.c: catch up changes.
-Tue Jun 4 00:44:27 2013 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+ * gc.c: ditto.
- * test/fileutils/test_fileutils.rb (TestFileUtils#test_mkdir): add
- EEXIST for Linux. (suggested by nurse)
+ * insns.def: ditto.
-Mon Jun 3 23:58:19 2013 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+ * vm.c: ditto.
- * lib/fileutils.rb (FileUtils.rmdir): use remove_tailing_slash.
- * test/fileutils/test_fileutils.rb: test for above.
+ * vm_args.c: ditto.
-Mon Jun 3 23:47:55 2013 Tanaka Akira <akr@fsij.org>
+ * vm_backtrace.c: ditto.
- * bignum.c (bitlength_bdigit): New function.
- (rb_big_pow): Use bitlength_bdigit instead of ffs.
+ * vm_dump.c: ditto.
-Mon Jun 3 23:11:19 2013 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
+ * vm_eval.c: ditto.
- * lib/fileutils.rb: fix behavior when mkdir/mkdir_p accepted "/".
- * test/fileutils/test_fileutils.rb: add test for above change.
- Patched by Mitsunori Komatsu. [GH-319]
+ * vm_insnhelper.c: ditto.
-Mon Jun 3 19:02:20 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm_method.c: ditto.
- * dir.c (is_hfs): use the file descriptor instead of a path.
+Fri Jul 3 14:30:18 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Jun 3 07:15:17 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * win32/file.c: some mingw compilers need a tweek for the
+ declarations of _wfreopen_s. [Bug #11320]
- * configure.in: removes AC_CHECK_FUNCS(readdir_r). readdir_r()
- is only used from dir.c and it doesn't need readdir_r().
- * configure.in (SIZEOF_STRUCT_DIRENT_TOO_SMALL): removed. It is
- only used for readdir_r.
- * dir.c: removes NAME_MAX_FOR_STRUCT_DIRENT. It is not right way
- to detect maximum length of path len. POSIX require to use
- fpathconf(). IOW, it might have lead to make a vulnerability
- using stack smashing. Moreover, readdir() works enough for our
- usage.
- * dir.c (READDIR): removes an implementation which uses
- readdir_r() and parenthesize in a macro body correctly.
- * dir.c (dir_read): removes IF_HAVE_READDIR_R(DEFINE_STRUCT_DIRENT
- entry), it is used only for readdir_r().
- * dir.c (dir_each): ditto.
- * dir.c (glob_helper): ditto.
+Fri Jul 3 12:25:19 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * dir.c (READDIR): removes entry and dp argument.
- * dir.c (dir_read): adjust for the above change.
- * dir.c (dir_each): ditto.
- * dir.c (glob_helper): ditto.
+ * transcode.c (rb_econv_set_replacement): target encoding name can
+ be empty now. [ruby-core:69841] [Bug #11324]
-Mon Jun 3 03:40:29 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Fri Jul 3 07:21:06 2015 Eric Wong <e@80x24.org>
- * vm_insnhelper.c (vm_yield_setup_block_args): partially revert r41019.
- The code is not useless.
+ * benchmark/bm_io_nonblock_noex.rb: new benchmark
+ * ext/openssl/ossl_ssl.c (no_exception_p): new function
+ (ossl_start_ssl): adjust for no_exception_p
+ (ossl_ssl_connect): adjust ossl_start_ssl call
+ (ossl_ssl_connect_nonblock): ditto
+ (ossl_ssl_accept): ditto
+ (ossl_ssl_accept_nonblock): ditto
+ (ossl_ssl_read_internal): adjust for no_exception_p
+ (ossl_ssl_write_internal): ditto
+ (ossl_ssl_write): adjust ossl_write_internal call
+ (ossl_ssl_write_nonblock): ditto
+ * ext/stringio/stringio.c (strio_read_nonblock):
+ delay exception check
+ * io.c (no_exception_p): new function
+ (io_getpartial): call no_exception_p
+ (io_readpartial): adjust for io_getpartial
+ (get_kwargs_exception): remove
+ (io_read_nonblock): adjust for io_getpartial,
+ check no_exception_p on EOF
+ (io_write_nonblock): call no_exception_p
+ (rb_io_write_nonblock): do not check `exception: false'
+ (argf_getpartial): adjust for io_getpartial
+ [ruby-core:69778] [Feature #11318]
-Mon Jun 3 01:25:25 2013 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
+Fri Jul 3 07:13:11 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/socket/test_sockopt.rb: change test name. follow r41037.
+ * dir.c (replace_real_basename): Win32 API does not set errno, get
+ the last error by GetLastError() and map to errno. [Bug #10015]
-Mon Jun 3 01:08:43 2013 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
+Thu Jul 2 21:32:06 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/rinda/test_rinda.rb: rename functions introduced in r41009.
+ * dir.c (replace_real_basename): show warnings at errors.
+ [Bug #10015]
-Sun Jun 2 23:33:42 2013 Kazuki Tsujimoto <kazuki@callcc.net>
+Thu Jul 2 18:39:20 2015 Koichi Sasada <ko1@atdot.net>
- * enc/trans/japanese_euc.trans, test/ruby/test_transcode.rb,
- tool/transcode-tblgen.rb: change EUC-JP-2004 to EUC-JIS-2004.
- This is follow up to changes in r41024.
+ * gc.c: remove `#define RGENGC_OBJ_INFO 1' line introduced to
+ debug Bug #11244.
-Sun Jun 2 22:44:42 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Thu Jul 2 18:34:26 2015 Koichi Sasada <ko1@atdot.net>
- * ext/socket/option.c: rename functions introduced in r41009
- s/ip/ipv4/g because they are ipv4 functions.
- (there's a policy that the name "ip" is for methods which supports
- both ipv4 and ipv6)
+ * gc.c (rb_raw_obj_info): separated from rb_obj_info().
+ Fill internal object information into passed buffer.
-Sun Jun 2 16:15:29 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * gc.h: declare rb_raw_obj_info().
- * dln_find.c (dln_find_exe, dln_find_file): remove deprecated
- non-reentrant functions.
+Thu Jul 2 16:15:04 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun Jun 2 15:04:35 2013 Zachary Scott <zachary@zacharyscott.net>
+ * dir.c (replace_real_basename): update path type by the target
+ attributes if possible, to improve the performance. [Bug #10015]
- * lib/cgi/util.rb, lib/erb.rb: Use String#b [Feature #8394] by znz
+Thu Jul 2 14:45:53 2015 NAKAMURA Usaku <usa@ruby-lang.org>
-Sun Jun 2 14:10:21 2013 Zachary Scott <zachary@zacharyscott.net>
+ * st.c: get rid of VC++'s warnings of C4700 (uninitialized local
+ variable used). I think that these are wrong, but should shut them
+ up.
- * lib/irb/lc/help-message: Apply english updates for irb --help #7510
+Thu Jul 2 14:15:50 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun Jun 2 12:03:58 2013 Zachary Scott <zachary@zacharyscott.net>
+ * lib/rubygems.rb (Gem.load_path_insert_index): search
+ @gem_prelude_index first.
- * range.c: Fix rdoc on Range#bsearch [Bug #8242] [ruby-core:54143]
+ * lib/rubygems/test_case.rb (Gem::TestCase#setup): keep already
+ expanded paths to preserve instance variables.
-Sun Jun 2 02:08:37 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Thu Jul 2 14:12:01 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * enc/euc_jp.c: fix typo: the name of EUC-JIS-2004.
+ * ruby.c (process_options): also copy initial load path marks at
+ setting load paths encoding.
-Sat Jun 1 23:17:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+Thu Jul 2 12:26:11 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * vm_eval.c (rb_mod_module_eval): mention in docs that arguments passed
- to the method are passed to the block
+ * test/rubygems/test_gem_server.rb (process_based_port): use
+ dynamically chosen port numbers to get rid of conflicts.
-Sat Jun 1 17:58:13 2013 Akinori MUSHA <knu@iDaemons.org>
+Thu Jul 2 11:58:59 2015 NAKAMURA Usaku <usa@ruby-lang.org>
- * lib/set.rb (Set#freeze, taint, untaint): Save a "self" by
- utilizing super returning self, and add tests while at it.
+ * test/rubygems/test_gem_specification.rb: skip tests which the
+ platform does not permit the filename of its test file.
-Sat Jun 1 17:24:47 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Jul 2 11:36:20 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * compile.c (iseq_set_arguments): not a simple single argument if any
- keyword arguments exist. [ruby-core:55203] [Bug #8463]
+ * test/rubygems/test_gem_resolver_git_specification.rb: require
+ rubygems/installer.rb before Gem::TestCase#setup runs, otherwise
+ as Gem::TestCase#teardown restores $LOADED_FEATURES to the state
+ at that time, the requiring the file in GitSpecification#install
+ method causes a lot of constant redefinitions.
- * vm_insnhelper.c (vm_yield_setup_block_args): split single parameter
- if any keyword arguments exist, and then extract keyword arguments.
- [ruby-core:55203] [Bug #8463]
+Thu Jul 2 10:43:36 2015 Eric Wong <e@80x24.org>
-Sat Jun 1 11:16:22 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/socket/rubysocket.h: flags for common socket families
+ (rsock_getfamily): update signature
+ * include/ruby/io.h: comment socket FMODE flags
+ * ext/socket/init.c (rsock_getfamily): memoize family
+ * ext/socket/basicsocket.c: adjust rsock_getfamily calls
+ * ext/socket/ancdata.c: ditto
+ [ruby-core:69713] [Feature #11298]
- * error.c (rb_exc_new_cstr): rename from rb_exc_new2.
+Thu Jul 2 10:30:01 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * error.c (rb_exc_new_str): rename from rb_exc_new3.
+ * lib/rubygems/resolver.rb: fixed NameError of Gem::Util::NULL_DEVICE.
-Sat Jun 1 10:13:17 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Jul 2 09:51:44 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * string.c (rb_str_new[2-5], rb_{tainted,usascii}_str_new2),
- (rb_str_buf_new2): remove old interfaces.
+ * lib/rubygems/resolver.rb: fix error of null device reference with DOSISH
+ platform.
-Sat Jun 1 08:00:46 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Jul 2 06:49:44 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * ext/zlib/zlib.c (gzfile_read, gzfile_read_all, gzfile_getc),
- (gzreader_gets): check EOF. [ruby-core:55220] [Bug #8467]
+ * lib/rubygems: Update to RubyGems HEAD(c202db2).
+ this version contains many enhancements see http://git.io/vtNwF
+ * test/rubygems: ditto.
-Sat Jun 1 07:32:15 2013 Tanaka Akira <akr@fsij.org>
+Wed Jul 1 23:50:34 2015 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
- * bignum.c: Use BDIGIT type for hbase.
+ * test/net/http/test_httpresponse.rb
+ (HTTPResponseTest#test_read_body_content_encoding_deflate_uppercase):
+ fix a failure without zlib.
-Sat Jun 1 02:37:35 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Wed Jul 1 10:54:56 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * ext/socket/option.c (sockopt_s_byte): constructor of the sockopt
- whose value's is byte.
+ * Add test for Enumerable#none? [fix GH-950] Patch by @yui-knk
- * ext/socket/option.c (sockopt_byte): getter for above.
+Wed Jul 1 09:30:36 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/socket/option.c (inspect_byte): inspect for above.
+ * struct.c (struct_set_members): hide internal back_members
+ object, and members object does not need to be duped as it
+ should be frozen and hidden.
- * ext/socket/option.c (sockopt_s_ip_multicast_loop): constructor of
- the sockopt whose optname is IP_MULTICAST_LOOP.
+Wed Jul 1 09:28:47 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/socket/option.c (sockopt_ip_multicast_loop): getter for above.
+ * struct.c (struct_member_pos): revert r51080 to fix other
+ implicit conversions but cast the return value to fix the
+ previous implicit conversion.
- * ext/socket/option.c (sockopt_s_ip_multicast_ttl): constructor of
- the sockopt whose optname is IP_MULTICAST_TTL.
+Wed Jul 1 08:47:24 2015 NARUSE, Yui <naruse@ruby-lang.org>
- * ext/socket/option.c (sockopt_ip_multicast_ttl): getter for above.
+ * struct.c (struct_member_pos): avoid implicit conversion loses
+ integer precision: 'long' to 'int'.
- * ext/socket/option.c (sockopt_inspect): use above.
+Wed Jul 1 05:57:03 2015 Eric Wong <e@80x24.org>
-Sat Jun 01 01:50:00 2013 Kenta Murata <mrkn@mrkn.jp>
+ * vm_method.c (rb_add_method_iseq): add RB_GC_GUARD
+ * class.c (clone_method): remove RB_GC_GUARD
+ * struct.c (define_aref_method): ditto
+ (define_aset_method): ditto
+ * vm.c (vm_define_method):
+ * iseq.c (rb_iseq_clone): add RB_GC_GUARD
- * ext/bigdecimal/bigdecimal.c (BigDecimal_power): use rb_dbl2big
- to convert a double value to a Bignum.
+Wed Jul 1 05:43:58 2015 Eric Wong <e@80x24.org>
-Sat Jun 1 00:19:50 2013 Tanaka Akira <akr@fsij.org>
+ * struct.c (AREF_HASH_THRESHOLD): new macro
+ (id_back_members): new ID
+ (struct_member_pos_ideal): new function
+ (struct_member_pos_probe): ditto
+ (struct_set_members): ditto
+ (struct_member_pos): ditto
+ (rb_struct_getmember): use struct_member_pos for O(1) access
+ (rb_struct_aref_sym): ditto
+ (rb_struct_aset_sym): ditto
+ (setup_struct): call struct_set_members
+ (struct_define_without_accessor): ditto
+ (Init_Struct): initialize __members_back__
+ [ruby-core:66851] [ruby-core:69705] [ruby-core:69821]
- * bignum.c (calc_hbase): Make hbase the maximum power of base
- representable in BDIGIT.
+Tue Jun 30 23:12:08 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri May 31 23:56:13 2013 Tanaka Akira <akr@fsij.org>
+ * io.c (rb_io_reopen): FilePathValue() ensures the path
+ NUL-terminated and frozen, so it is unnecessary to make it shared.
- * bignum.c (calc_hbase): Extracted from rb_big2str0.
+Tue Jun 30 23:11:53 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri May 31 23:22:24 2013 Tanaka Akira <akr@fsij.org>
+ * dir.c (check_dirname): ensure path name NUL-terminated for
+ SHARABLE_MIDDLE_SUBSTRING.
- * bignum.c: Don't hard code SIZEOF_BDIGITS for log_base(hbase).
- (big2str_orig): hbase_numdigits argument added.
- (big2str_karatsuba): Ditto.
- (rb_big2str0): Calculate hbase_numdigits.
+ * io.c (rb_sysopen): ditto.
-Fri May 31 17:57:21 2013 Zachary Scott <zachary@zacharyscott.net>
+Tue Jun 30 18:38:16 2015 NAKAMURA Usaku <usa@ruby-lang.org>
- * process.c: Improve Process::exec documentation
+ * win32/file.c (rb_freopen): need to terminate by NUL.
-Fri May 31 17:26:42 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Jun 30 17:28:25 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * vm_eval.c (rb_funcallv): add better names of rb_funcall2.
+ * io.c (rb_io_reopen): freopen(3) with OS encoding path.
+ [ruby-core:69780] [Bug #11320]
- * vm_eval.c (rb_funcallv_public): ditto for rb_funcall3.
+ * win32/file.c (rb_freopen): wrapper of wchar version freopen(3).
+ use _wfreopen_s() if available.
-Fri May 31 17:04:45 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Jun 30 08:24:08 2015 Eric Wong <e@80x24.org>
- * array.c (rb_ary_new_capa): add better names of rb_ary_new2.
+ * io.c (rb_io_oflags_modestr): handle O_TRUNC correctly
+ * test/ruby/test_io.rb (test_reopen_stdio): new test
+ Patch-by: cremno phobia <cremno@mail.ru>
+ [ruby-core:69779] [Bug #11319]
- * array.c (rb_ary_new_from_args): ditto for rb_ary_new3.
+Tue Jun 30 02:47:02 2015 Eric Wong <e@80x24.org>
- * array.c (rb_ary_new_from_values): ditto for rb_ary_new4.
+ * include/ruby/st.h (struct st_table): hide struct list_head
+ * st.c (struct st_table_entry): adjust struct
+ (head, tail): remove shortcut macros
+ (st_head): new wrapper function
+ (st_init_table_with_size): adjust to new struct and API
+ (st_clear): ditto
+ (add_direct): ditto
+ (unpack_entries): ditto
+ (rehash): ditto
+ (st_copy): ditto
+ (remove_entry): ditto
+ (st_shift): ditto
+ (st_foreach_check): ditto
+ (st_foreach): ditto
+ (get_keys): ditto
+ (get_values): ditto
+ (st_values_check): ditto
+ (st_reverse_foreach_check): ditto (unused)
+ (st_reverse_foreach): ditto (unused)
+ [ruby-core:69726] [Misc #10278]
-Fri May 31 16:35:44 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Jun 29 17:38:01 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * configure.in (HAVE_ATTRIBUTE_FUNCTION_ALIAS): define to tell if
- alias attribute is available.
+ * insns.def (defineclass): do not quote unprintable characters at
+ raising an exception.
-Fri May 31 16:03:23 2013 Zachary Scott <zachary@zacharyscott.net>
+Mon Jun 29 16:01:24 2015 NARUSE, Yui <naruse@ruby-lang.org>
- * object.c, proc.c: s/call_seq/call-seq in rdoc. [Fixes GH-322]
+ * lib/net/http/response.rb (inflater): CONTENT_ENCODING can be upper
+ case. [ruby-core:69670] [Bug #11285] patched by Andy Chu
-Fri May 31 15:56:36 2013 Zachary Scott <zachary@zacharyscott.net>
+Mon Jun 29 14:50:08 2015 Shugo Maeda <shugo@ruby-lang.org>
- * ext/openssl/ossl_ssl.c: Add missing paren in rdoc [Fixes GH-321]
+ * eval.c (add_activated_refinement): should not include the original
+ class.
-Fri May 31 11:58:24 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Jun 29 12:09:10 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * vm_method.c (set_visibility): extract from rb_mod_public(),
- rb_mod_protected() and rb_mod_private().
+ * README.md: tweak styles. [fix GH-945][ci skip] Patch by @bryndyment
-Thu May 30 19:47:42 2013 Yusuke Endoh <mame@tsg.ne.jp>
+Mon Jun 29 07:23:55 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * vm_insnhelper.c (vm_callee_setup_keyword_arg,
- vm_callee_setup_arg_complex): consider a hash argument for keyword
- only when the number of arguments is more than the expected
- mandatory parameters. [ruby-core:53199] [ruby-trunk - Bug #8040]
+ * template/sizes.c.tmpl: extract RUBY_DEFINT to define sizes of
+ types checked by configure.in, and fix size of intptr_t in
+ universal binary.
- * test/ruby/test_keyword.rb: update a test for above.
+Mon Jun 29 02:10:10 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu May 30 17:55:04 2013 Zachary Scott <zachary@zacharyscott.net>
+ * insns.def (defineclass): preserve encoding of name in error
+ messages for super class mismatch.
- * process.c: RDoc on Process.spawn
+ * insns.def (defineclass): preserve encoding of name in error
+ messages for non-class super.
-Thu May 30 00:08:14 2013 Koichi Sasada <ko1@atdot.net>
+ * insns.def (defineclass): preserve encoding of name in error
+ messages when already defined but type mismatch.
- * gc.c (gc_profile_enable): rest_sweep() to finish last GC.
- Profiling record is allocated at first of marking phase.
- Enable at lazy sweeping may cause an error (SEGV).
+Sun Jun 28 12:07:35 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed May 29 10:33:27 2013 Koichi Sasada <ko1@atdot.net>
+ * class.c (rb_define_class_id_under): raise TypeError exception
+ same as ruby level class definition when superclass mismatch.
- * hash.c: fix WB bug.
- (1) Hash's key also needs WB.
- (2) callback parameter *key and *value of st_update() is not a
- storage of st_table itself (only local variable). So that
- OBJ_WRITE() is not suitable, especially for `!existing'.
- OBJ_WRITTEN() is used instead of OBJ_WRITE().
+Sun Jun 14 19:02:03 2015 Benoit Daloze <eregontp@gmail.com>
-Tue May 28 12:31:21 2013 Koichi Sasada <ko1@atdot.net>
+ * lib/net/ftp.rb (makeport): close the TCPServer
+ when sending the port fails.
- * ext/objspace/object_tracing.c: fix a bug reported at
- "[ruby-core:55182] [ruby-trunk - Bug #8456][Open] Sugfault in Ruby Head"
- Care about the case TracePoint#path #=> `nil'.
+ * test/net/ftp/test_ftp.rb: test for above.
- * ext/objspace/object_tracing.c: add two new methods:
- * ObjectSpace.allocation_class_path(o)
- * ObjectSpace.allocation_method_id(o)
- They are not useful for Object.new because they are always
- "Class" and :new.
- To trace more useful information, we need to maintain call-tree
- using call/return hooks, which is implemented by
- ll-prof <http://sunagae.net/wiki/doku.php?id=software:llprof>
+Fri Jun 26 12:48:37 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/objspace/test_objspace.rb: add a test.
+ * transcode.c (load_transcoder_entry): fix transcoder loading race
+ condition, by waiting in require. [ruby-dev:49106] [Bug #11277]
-Tue May 28 11:30:02 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Jun 26 07:53:56 2015 Eric Wong <e@80x24.org>
- * ext/extmk.rb (extmake): leave makefiles untouched if the content is
- not changed, to get rid of unnecessary re-linking.
+ * enum.c (enum_minmax): simplify return value creation
+ * test/ruby/test_enum.rb: test behavior on empty
+ * hash.c (rb_hash_fetch_m): remove unnecessary volatile since r41597
+ (env_reject_bang): trade volatile for GC guard
+ (env_select): ditto
+ (env_select_bang): ditto
+ (env_keep_if): ditto
+ (rb_env_clear): ditto
-Tue May 28 03:11:02 2013 Koichi Sasada <ko1@atdot.net>
+Thu Jun 25 21:24:28 2015 Naohisa Goto <ngotogenome@gmail.com>
- * ext/objspace/gc_hook.c, ext/objspace/objspace.c: add new methods to
- hook GC invocation.
- * ObjectSpace.after_gc_start_hook=(proc)
- * ObjectSpace.after_gc_end_hook=(proc)
+ * test/-ext-/popen_deadlock/test_popen_deadlock.rb: test [Bug #11265]
- Note that hooks are not kicked immediately. Procs are kicked
- at postponed_job.
+ * ext/-test-/popen_deadlock/infinite_loop_dlsym.c: new ext to call
+ dlsym(3) infinitely without GVL, used in the above test.
- This feature is a sample of new internal event and
- rb_postponed_job API.
+ * ext/-test-/popen_deadlock/extconf.rb: extconf.rb for the above
+ ext. Currently, only enabled on Solaris (main target) and Linux
+ (as a reference platform and for debugging the ext).
-Tue May 28 02:56:15 2013 Koichi Sasada <ko1@atdot.net>
+Thu Jun 25 19:24:25 2015 Naohisa Goto <ngotogenome@gmail.com>
- * gc.c (gc_stat): remove wrong rest_sweep().
+ * configure.in: not to use vfork on Solaris to avoid deadlock
+ occurred in vfork(2) with multi-threading and dynamic linker
+ on Solaris. [Bug #11265] [ruby-dev:49089]
-Tue May 28 02:44:23 2013 Koichi Sasada <ko1@atdot.net>
+Thu Jun 25 18:25:41 2015 Naohisa Goto <ngotogenome@gmail.com>
- * gc.c (garbage_collect_body): fix GC_ENABLE_LAZY_SWEEP condition.
+ * test/lib/envutil.rb (Test::Unit::Assertions#assert_no_memory_leak):
+ NO_MEMORY_LEAK_ENVS is moved to Memory::NO_MEMORY_LEAK_ENVS
+ to reduce child executions during test-all on Solaris.
- * gc.c (GC_NOTIFY): move debug print location and use stderr instead
- of stdout.
+ * test/lib/memory_status.rb (Memory::NO_MEMORY_LEAK_ENVS): ditto.
-Tue May 28 02:07:21 2013 Koichi Sasada <ko1@atdot.net>
+Thu Jun 25 17:32:33 2015 Koichi Sasada <ko1@atdot.net>
- * vm_trace.c (rb_postponed_job_register_one): fix iteration bug.
+ * vm_method.c (rb_method_entry_create): need to call
+ method_definition_reset() if def is given.
- * ext/-test-/postponed_job/postponed_job.c,
- test/-ext-/postponed_job/test_postponed_job.rb: add a test.
+ Actually, `me' is a new object, so we don't need to call it.
+ It is just to make sure.
-Tue May 28 00:34:23 2013 Koichi Sasada <ko1@atdot.net>
+ * vm_method.c (method_definition_reset): remove duplicated insertion.
- * include/ruby/ruby.h, gc.c: add new internal event
- RUBY_INTERNAL_EVENT_GC_END. This event invokes at the end of
- after_sweep().
- Time chart with lazy sweep is:
- (1) Kick RUBY_INTERNAL_EVENT_GC_START
- (2) [gc_marks()]
- (3) [lazy_sweep()]
- (4) [... run Ruby program (mutator) with lazy_sweep() ...]
- (5) [after_sweep()]
- (6) Kick RUBY_INTERNAL_EVENT_GC_END
- (7) [... run Ruby program (mutator), and go to (1) ...]
- Time chart without lazy sweep (GC.start, etc) is:
- (1) Kick RUBY_INTERNAL_EVENT_GC_START
- (2) [gc_marks()]
- (3) [gc_sweep()]
- (4) [after_sweep()]
- (5) Kick RUBY_INTERNAL_EVENT_GC_END
- (6) [... run Ruby program (mutator), and go to (1) ...]
+ * vm_method.c (rb_method_entry_clone): assign dst->def here,
+ not in method_definition_reset().
- * ext/-test-/tracepoint/tracepoint.c,
- test/-ext-/tracepoint/test_tracepoint.rb: modify a test.
+Thu Jun 25 16:44:54 2015 Koichi Sasada <ko1@atdot.net>
-Tue May 28 00:18:57 2013 Koichi Sasada <ko1@atdot.net>
+ * vm_method.c: make a rb_method_definition_t data (def) *after* making
+ a rb_method_entry_t data (me).
- * vm_trace.c (rb_postponed_job_flush): remove a wrong comment.
+ Normally, `me' points `def'. Some Ruby objects pointed from `def'
+ and objects are marked by `me' (mark_method_entry() in gc.c).
+ However, `def' is built before making a `me', then nobody can mark
+ objects pointed from `def' before making (and pointing from) `me'.
-Mon May 27 22:09:33 2013 Tanaka Akira <akr@fsij.org>
+ I hope this patch solve #11244.
- * include/ruby/ruby.h (RHASH_SIZE): Add a cast to suppress a
- warning, comparison between signed and unsigned integer
- expressions [-Wsign-compare], on ILP32.
+ * vm_method.c: remove `rb_' prefix from some static functions.
-Mon May 27 19:25:47 2013 Koichi Sasada <ko1@atdot.net>
+ * method.h (rb_method_entry_create): constify
- * include/ruby/ruby.h: rename RUBY_INTERNAL_EVENT_FREE to
- RUBY_INTERNAL_EVENT_FREEOBJ.
+ * gc.c (mark_method_entry): add checking `def' and
+ `def->body.iseq.iseqptr' availability because they can be NULL.
- * ext/-test-/tracepoint/tracepoint.c,
- ext/objspace/object_tracing.c,
- gc.c, vm_trace.c: catch up this change.
+Thu Jun 25 14:14:16 2015 takiy33 <takiy33@gmail.com>
-Mon May 27 18:57:28 2013 Koichi Sasada <ko1@atdot.net>
+ * test/test_prime.rb (test_eratosthenes_works_fine_after_timeout):
+ use spaces instead of TABs in ruby codes. [Fix GH-944]
- * ext/objspace/objspace.c: support ObjectSpace.trace_object_allocations.
- Read the following test to know HOWTO.
- This feature is a sample of RUBY_INTERNAL_EVENT.
+Thu Jun 25 07:08:35 2015 Koichi Sasada <ko1@atdot.net>
- * test/objspace/test_objspace.rb: add a test.
+ * gc.c (obj_info, method_type_name): show method type name in a string
+ instead of a number.
- * ext/objspace/object_tracing.c: ditto.
+Thu Jun 25 06:49:25 2015 Koichi Sasada <ko1@atdot.net>
- * gc.c (rb_gc_count): add. This function returns GC count.
+ * gc.c (obj_info): show more details for T_IMEMO/imemo_ment.
- * internal.h: add decl. of rb_gc_count(). Same as `GC.count'.
+Thu Jun 25 06:40:46 2015 Koichi Sasada <ko1@atdot.net>
-Mon May 27 17:33:28 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm_method.c (rb_method_definition_reset): need a WB for
+ VM_METHOD_TYPE_ATTRSET.
- * tool/rbinstall.rb (install_recursive): add maxdepth option.
+Thu Jun 25 03:33:21 2015 Koichi Sasada <ko1@atdot.net>
- * tool/rbinstall.rb (bin-comm): limit depth of bindir and reject empty
- files. [ruby-core:55101] [Bug #8432]
+ * gc.c (RGENGC_OBJ_INFO, obj_info): add a macro to enable/disable
+ rich obj_info() output.
-Mon May 27 16:16:18 2013 Koichi Sasada <ko1@atdot.net>
+ At the default, the value of RGENGC_OBJ_INFO is
+ (RGENGC_DEBUG | RGENGC_CHECK_MODE).
- * vm_trace.c (rb_postponed_job_flush, rb_postponed_job_register): use
- ruby_xmalloc/xfree. It is safe during GC.
+ * gc.c (RGENGC_OBJ_INFO): force enable it to debug #11244.
-Mon May 27 09:24:03 2013 Koichi Sasada <ko1@atdot.net>
+ * gc.c (gc_mark_ptr): print more details with obj_info().
- * test/-ext-/postponed_job/test_postponed_job.rb: fix typo and class name.
+ * gc.c (gc_mark_children): remove useless debug prints.
-Mon May 27 09:05:17 2013 Koichi Sasada <ko1@atdot.net>
+Thu Jun 25 02:40:33 2015 Eric Wong <e@80x24.org>
- * include/ruby/ruby.h, gc.c, vm_trace.c: add internal events.
- * RUBY_INTERNAL_EVENT_NEWOBJ: object created.
- * RUBY_INTERNAL_EVENT_FREE: object freed.
- * RUBY_INTERNAL_EVENT_GC_START: GC started.
- And rename `RUBY_EVENT_SWITCH' to `RUBY_INTERNAL_EVENT_SWITCH'.
+ * ext/openssl/ossl_ssl.c (ossl_ssl_read_internal):
+ do not process kwargs in blocking mode
+ * test/openssl/test_ssl.rb: test sysread
- Internal events can not invoke any Ruby program because the tracing
- timing may be critical (under huge restriction).
- These events can be hooked only by C-extensions.
- We recommend to use rb_postponed_job_register() API to call Ruby
- program safely.
+Wed Jun 24 16:54:11 2015 Koichi Sasada <ko1@atdot.net>
- This change is mostly written by Aman Gupta (tmm1).
- https://bugs.ruby-lang.org/issues/8107#note-12
- [Feature #8107]
+ * gc.c (gc_mark_children): add additional debug code for #11244.
- * include/ruby/debug.h, vm_trace.c: added two new APIs.
- * rb_tracearg_event_flag() returns rb_event_flag_t of this event.
- * rb_tracearg_object() returns created/freed object.
+Wed Jun 24 16:05:42 2015 Eric Wong <e@80x24.org>
- * ext/-test-/tracepoint/extconf.rb,
- ext/-test-/tracepoint/tracepoint.c,
- test/-ext-/tracepoint/test_tracepoint.rb: add a test.
+ * string.c (rb_str_justify): use RB_GC_GUARD
-Mon May 27 08:38:21 2013 Koichi Sasada <ko1@atdot.net>
+Wed Jun 24 14:25:17 2015 Koichi Sasada <ko1@atdot.net>
- * ext/-test-/postponed_job/postponed_job.c: fix `init' function name.
+ * gc.c (gc_mark_ptr): add a check code for #11244.
-Mon May 27 06:22:41 2013 Koichi Sasada <ko1@atdot.net>
+ It should be removed later. But we can remain this check
+ because it is only a branch.
- * include/ruby/debug.h, vm_trace.c: add rb_postponed_job API.
- Postponed jobs are registered with this API. Registered jobs
- are invoked at `ruby-running-safe-point' as soon as possible.
- This timing is completely same as finalizer timing.
+Wed Jun 24 12:49:11 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- There are two APIs:
- * rb_postponed_job_register(flags, func, data): register a
- postponed job with data. flags are reserved.
- * rb_postponed_job_register_one(flags, func, data): same as
- `rb_postponed_job_register', but only one `func' job is
- registered (skip if `func' is already registered).
+ * string.c (rb_fstring_cstr): new function to make a fstring from
+ a string literal.
- This change is mostly written by Aman Gupta (tmm1).
- https://bugs.ruby-lang.org/issues/8107#note-15
- [Feature #8107]
+ * internal.h (rb_fstring_lit): new macro to make a fstring from a
+ string literal.
- * gc.c: use postponed job API for finalizer.
+ * include/ruby/intern.h (rb_strlen_lit): new macro to get the
+ length of a string literal, borrowed from mruby/mruby@e4afd53.
- * common.mk: add dependency from vm_trace.c to debug.h.
+Wed Jun 24 12:21:16 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * ext/-test-/postponed_job/extconf.rb, postponed_job.c,
- test/-ext-/postponed_job/test_postponed_job.rb: add a test.
+ * re.c: Update documentation for Regexp class.
+ [fix GH-937][ci skip] Patch by @davydovanton
- * thread.c: implement postponed API.
+Wed Jun 24 09:23:03 2015 Eric Wong <e@80x24.org>
- * vm_core.h: ditto.
+ * variable.c (generic_ivar_set): remove FL_ABLE check
+ (gen_ivar_copy): ditto
+ [ruby-core:69715]
-Mon May 27 02:26:02 2013 Koichi Sasada <ko1@atdot.net>
+Wed Jun 24 08:28:15 2015 Eric Wong <e@80x24.org>
- * gc.c (gc_stat): collect promote_operation_count and
- types (RGENGC_PROFILE >= 2).
+ * ext/socket/ancdata.c (bsock_recvmsg_internal): reduce stack use
+ [ruby-core:69595] [Feature #11263]
-Mon May 27 01:40:58 2013 Koichi Sasada <ko1@atdot.net>
+Tue Jun 23 14:32:42 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c (gc_stat): collect shade_operation_count,
- remembered_sunny_object_count and remembered_shady_object_count
- for each types when RGENGC_PROFILE >= 2.
- They are informative for optimization.
+ * error.c (name_err_receiver): raise ArgumentError if no receiver
+ is available on this exception object. [Feature #10881]
-Mon May 27 01:15:22 2013 Koichi Sasada <ko1@atdot.net>
+Tue Jun 23 09:48:34 2015 Eric Wong <e@80x24.org>
- * hash.c (rb_hash_tbl_raw), internal.h: added.
- Returns st_table without shading hash.
+ * dir.c (check_dirname): avoid volatile, use return value
+ (dir_s_chroot, dir_s_mkdir, dir_s_rmdir): adjust callers
- * array.c: use rb_hash_tbl_raw() for read-only purpose.
+Tue Jun 23 06:37:10 2015 Eric Wong <e@80x24.org>
- * compile.c (iseq_compile_each): ditto.
+ * struct.c (struct_ivar_get): cache member definition in a subclass
+ Thanks to Sokolov Yura aka funny_falcon <funny.falcon@gmail.com>
+ in https://bugs.ruby-lang.org/issues/10585
- * gc.c (count_objects): ditto.
+Tue Jun 23 04:58:06 2015 Eric Wong <e@80x24.org>
- * insns.def: ditto.
+ * benchmark/bm_vm2_struct_big_href_hi.rb: new benchmark
+ * benchmark/bm_vm2_struct_big_href_lo.rb: ditto
+ * benchmark/bm_vm2_struct_big_hset.rb: ditto
+ * benchmark/bm_vm2_struct_small_href.rb: ditto
+ * benchmark/bm_vm2_struct_small_hset.rb: ditto
+ Thanks to Sokolov Yura aka funny_falcon <funny.falcon@gmail.com>
+ in https://bugs.ruby-lang.org/issues/10585
- * process.c: ditto.
+Mon Jun 22 18:08:48 2015 Naohisa Goto <ngotogenome@gmail.com>
- * thread.c (clear_coverage): ditto.
+ * test/lib/test/unit.rb (Test::Unit::Parallel#start_watchdog): removed
+ because it has been meaningless since r36385. [Bug #11288]
- * vm_insnhelper.c: ditto.
+ * test/lib/test/unit.rb (Test::Unit::Parallel#_run_parallel): delete
+ lines related to the removed start_watchdog method
-Mon May 27 00:31:09 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Sun Jun 21 23:52:46 2015 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
- * tool/make-snapshot: use ENV["AUTOCONF"] instead of directly using
- literal "autoconf".
+ * NEWS: mention about Array#bsearch_index and Hash#fetch_values.
-Sun May 26 21:31:46 2013 Koichi Sasada <ko1@atdot.net>
+Sun Jun 21 23:46:27 2015 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
- * hash.c, include/ruby/ruby.h: support WB protected hash.
- * constify RHash::ifnone and make new macro RHASH_SET_IFNONE().
- * insert write barrier for st_update().
+ * NEWS: add a reference to a ticket.
- * include/ruby/intern.h: declare rb_hash_set_ifnone(hash, ifnone).
+Sun Jun 21 20:28:09 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * marshal.c (r_object0): use RHASH_SET_IFNONE().
+ * internal.h (roomof): extract from type_roomof, and move from
+ bignum.c.
- * ext/openssl/ossl_x509name.c (Init_ossl_x509name): ditto.
+Sun Jun 21 18:32:37 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat May 25 23:22:38 2013 Kazuki Tsujimoto <kazuki@callcc.net>
+ * ruby_atomic.h (ATOMIC_PTR_CAS): define by generic CAS macro, not
+ via size_t, to suppress a warning by mingw gcc.
- * test/fiddle/test_c_struct_entry.rb,
- test/fiddle/test_c_union_entity.rb,
- test/fiddle/test_cparser.rb, test/fiddle/test_func.rb,
- test/fiddle/test_handle.rb, test/fiddle/test_import.rb,
- test/fiddle/test_pointer.rb: don't run test if the system
- don't support fiddle.
+Sun Jun 21 05:31:41 2015 Shota Fukumori <her@sorah.jp>
-Sat May 25 21:29:34 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * ext/objspace/objspace_dump.c(dump_object): Return empty JSON object when
+ passed object is a special const, instead of SEGV.
+ Based patch by Kohei Suzuki (eagletmt). [ruby-core:69692] [Bug #11291]
- * ext/pty/pty.c (get_device_once): FreeBSD 10-current and 9-stable
- added O_CLOEXEC support to posix_openpt, so assume FreeBSD 9.2 or
- later supports it.
- http://www.freebsd.org/cgi/query-pr.cgi?pr=162374
+ * test/objspace/test_objspace.rb(test_dump_special_consts): Test for above fix.
-Sat May 25 18:46:23 2013 Yusuke Endoh <mame@tsg.ne.jp>
- * proc.c (rb_method_entry_min_max_arity): fix missing break in switch.
- This was introduced in r38236, which is not intentional apparently.
- This has caused no actual harm because VM_METHOD_TYPE_OPTIMIZED is
- not used except for OPTIMIZED_METHOD_TYPE_SEND, but may do in
- future. Coverity Scan found this inadequacy.
+Sat Jun 20 03:56:58 2015 Yusuke Endoh <mame@ruby-lang.org>
-Sat May 25 18:08:06 2013 Yusuke Endoh <mame@tsg.ne.jp>
+ * enc/make_encmake.rb: the list of encoding extension libraries must
+ not include encinit.c itself. It caused "undefined reference to
+ Init_encinit".
- * dir.c (bracket): fix copy-paste error. When the first and last
- characters of fnmatch range have different length, fnmatch may
- have wrongly matched a path that does not really match.
- Coverity Scan found this bug.
+Sat Jun 20 02:03:53 2015 Naohisa Goto <ngotogenome@gmail.com>
-Sat May 25 17:06:25 2013 Koichi Sasada <ko1@atdot.net>
+ * process.c (rb_execarg_parent_start1): new macro ALWAYS_NEED_ENVP
+ to generate envp_str anytime on Solaris 10 (or earlier version
+ of Solaris) to avoid calling execv() which is async-signal unsafe
+ on Solaris 10. [Bug #11265] [ruby-dev:49089]
- * gc.c (after_gc_sweep): reduce full GC timing.
+ * process.c (exec_with_sh, proc_exec_cmd): On Solaris 10,
+ because ALWAYS_NEED_ENVP is 1 and envp_str is always generated,
+ execv() in exec_with_sh() and proc_exec_cmd() are never called.
+ To guarantee this, execv() is replaced by a macro to print
+ out error message on Solaris 10.
-Sat May 25 11:28:49 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * process.c (proc_exec_sh): Because proc_exec_sh() may be called
+ by rb_proc_exec() with envp_str = Qfalse, execl() is replaced
+ by a macro that calls execle() with "extern char **environ"
+ traditional global variable on Solaris 10.
+ TODO: This may be unsafe and should be changed in the future.
+ Although rb_proc_exec() is not used from inside current version
+ of ruby, it may be called by third-party extensions.
- * variable.c (set_const_visibility): return without clearing method
- cache if no arguments.
+Sat Jun 20 01:10:13 2015 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
- * vm_method.c (set_method_visibility): ditto.
+ * NEWS: mention about $SAFE.
-Sat May 25 11:27:32 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Jun 19 14:53:35 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * vm_method.c (set_method_visibility): quote unprintable method name.
+ * proc.c (rb_mod_define_method): now requires a block direct to
+ this method call. [ruby-core:69655] [Bug #11283]
-Sat May 25 11:24:24 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Jun 19 13:54:43 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (rb_frame_callee): returns the called name of the current
- frame, not the previous frame.
+ * proc.c (rb_mod_define_method): get rid of inadvertent ID
+ creations at error.
- * eval.c (prev_frame_callee, prev_frame_func): rename and make static,
- as these are used by rb_f_method_name() and rb_f_callee_name() only.
+Fri Jun 19 07:58:11 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * variable.c (set_const_visibility): use the called name.
+ * ext/extmk.rb: if no with-ext option is given, default to
+ enable everything. [ruby-dev:49108] [Bug #11280]
-Sat May 25 08:58:23 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Jun 19 06:30:07 2015 Koichi Sasada <ko1@atdot.net>
- * string.c (rb_str_quote_unprintable): check if argument is a string.
+ * bootstraptest/test_method.rb: remove a test because $SAFE=2 was
+ obsolete.
-Fri May 24 19:32:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ Please check btest, too.
- * variable.c (set_const_visibility): use rb_frame_this_func() instead
- of rb_frame_callee() for getting the name of the called method
+Thu Jun 18 23:51:51 2015 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
- * test/ruby/test_module.rb: add test for private_constant with no args
+ * bin/erb: $SAFE=3 is obsolete.
-Fri May 24 18:53:10 2013 Koichi Sasada <ko1@atdot.net>
+Thu Jun 18 23:45:11 2015 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
- * gc.c: do major/full GC when:
- * number of oldgen object is bigger than twice of
- number of oldgen object at last full GC.
- * number of remembered shady object is bigger than twice of
- number of remembered shady object at last full GC.
- * number of oldgen object and remembered shady object is bigger
- than half of total object space.
- (please fix my English!)
+ * safe.c: removed needless doc related $SAFE=2
-Fri May 24 17:07:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+Thu Jun 18 23:38:07 2015 NAKAMURA Usaku <usa@ruby-lang.org>
- * intern.h: remove dangling rb_class_init_copy declaration
- [ruby-core:55120] [Bug #8434]
+ * thread.c (rb_thread_safe_level): fix document. $SAFE=3 is obsolete.
+ [ci skip]
-Fri May 24 16:31:23 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Thu Jun 18 23:25:51 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/strscan/strscan.c (strscan_aref): raise error if given
- name reference is not found.
+ * ext/extmk.rb: configure intersection of with-ext and not
+ without-ext, as withouts is no longer true by default if
+ with-ext option is given. [ruby-dev:49108] [Bug #11280]
-Fri May 24 15:48:18 2013 Koichi Sasada <ko1@atdot.net>
+Thu Jun 18 23:20:46 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * gc.c (after_gc_sweep, garbage_collect_body): do major GC (full GC)
- before extending heaps.
- TODO: do major GC when there are many old (promoted) objects.
+ * include/ruby/ruby.h: $SAFE=2 is now obsolete.
- * gc.c (after_gc_sweep): remove TODO comments.
+ * dir.c, ext/fiddle/handle.c, ext/socket/basicsocket.c, file.c
+ gc.c, io.c, process.c, safe.c, signal.c, win32/file.c:
+ removed code for $SAFE=2
-Fri May 24 11:04:00 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/erb/test_erb.rb, test/fiddle/test_handle.rb
+ test/ruby/test_env.rb: removed tests for $SAFE=2.
- * configure.in (LIBRUBY_RPATHFLAGS): do not append -L option with
- runtime library directory if cross compiling, but only -R option.
- runtime path makes no sense on the host system. [ruby-dev:47363]
- [Bug #8443]
+Thu Jun 18 22:50:07 2015 Yusuke Endoh <mame@ruby-lang.org>
-Fri May 24 02:57:17 2013 Koichi Sasada <ko1@atdot.net>
+ * enc/make_encmake.rb: added --transes and --no-transes options.
- * object.c (rb_obj_clone): should not propagate OLDGEN status.
- This propagation had caused WB miss for class.
+Thu Jun 18 18:24:12 2015 Eric Wong <e@80x24.org>
-Thu May 23 17:35:30 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/socket/test_unix.rb: replace sleep with select
- * load.c (loaded_feature_path): fix invalid read by index underflow.
- the beginning of name is also a boundary as well as just after '/'.
+Thu Jun 18 17:59:06 2015 Koichi Sasada <ko1@atdot.net>
-Thu May 23 17:21:22 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm.c (rb_vm_control_frame_id_and_class): remove useless codes.
+ `me' knows ID and owner class.
- * gc.c (gc_profile_dump_on): revert r40898. ok to show the record
- accumulating while lazy_sweep().
+Thu Jun 18 16:58:35 2015 Koichi Sasada <ko1@atdot.net>
-Wed May 22 16:50:18 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * method.h: constify rb_method_alias_struct::original_me and
+ rb_method_refined_struct::orig_me.
- * gc.c (gc_profile_dump_on): use size_t to get rid of overflow and
- show the header when next_index > 0, instead of next_index != 1.
+ * class.c (move_refined_method): use RB_OBJ_WRITE() for
+ me->def->body.refined.orig_me.
-Wed May 22 15:18:59 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Jun 18 14:35:28 2015 Koichi Sasada <ko1@atdot.net>
- * win32/win32.c (setup_overlapped): check the error code in addition
- to the result of SetFilePointer() to determine if an error occurred,
- because INVALID_SET_FILE_POINTER is a valid value.
- [ruby-core:55098] [Bug #8431]
+ * ext/objspace/objspace.c (count_imemo_objects): support imemo_ment.
- * win32/win32.c (setup_overlapped, finish_overlapped): extract from
- rb_w32_read() and rb_w32_write().
+Thu Jun 18 13:32:46 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed May 22 14:19:56 2013 Koichi Sasada <ko1@atdot.net>
+ * error.c (name_err_receiver): add NameError#receiver method.
+ [Feature #10881]
- * gc.c (gc_prepare_free_objects, rest_sweep, lazy_sweep): fix position
- of `during_gc' setting.
+Thu Jun 18 10:00:06 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Wed May 22 07:36:08 2013 Koichi Sasada <ko1@atdot.net>
+ * safe.c: removed needless doc related $SAFE=3
- * gc.c (garbage_collect): all GC is start from garbage_collect()
- (or garbage_collect_body()). `garbage_collect()' accept additional
- two parameters `full_mark' and `immediate_sweep'.
- If `full_mark' is TRUE, then force it full gc (major gc), otherwise,
- it depends on status of object space. Now, it will be minor gc.
- If `immediate_sweep' is TRUE, then disable lazy sweep.
- To allocate free memory, `full_mark' and `immediate_sweep' should be
- TRUE. Otherwise, they should be FALSE.
+Thu Jun 18 09:59:23 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * gc.c (gc_prepare_free_objects): use `garbage_collect_body()'.
+ * safe.c: rename old method name for $SAFE=3
- * gc.c (slot_sweep, before_gc_sweep, after_gc_sweep): add logging code.
+Thu Jun 18 06:02:42 2015 Eric Wong <e@80x24.org>
-Tue May 21 22:47:06 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * compile.c (get_exception_sym2type, iseq_build_from_ary_body):
+ rely on %+PRIsVALUE instead of calling rb_inspect directly
- * ext/strscan/strscan.c (strscan_aref): support named captures.
- patched by Konstantin Haase [ruby-core:54664] [Feature #8343]
+Wed Jun 17 20:59:25 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue May 21 21:48:44 2013 Kouhei Sutou <kou@cozmixng.org>
+ * common.mk (ENC_MK): needs fake.rb if cross compilation.
+ [ruby-dev:49098] [Bug #11272]
- * test/ruby/test_dir_m17n.rb (TestDir_M17N#test_entries_compose):
- Use #each instead of #map just for iteration.
+Wed Jun 17 20:23:29 2015 Tanaka Akira <akr@fsij.org>
-Tue May 21 19:57:22 2013 Akinori MUSHA <knu@iDaemons.org>
+ * ext/rbconfig/sizeof/extconf.rb: Check __float80.
- * ext/digest/lib/digest.rb (Digest::Class.file): Take optional
- arguments that are passed to the constructor of the digest
- class.
+Wed Jun 17 15:15:53 2015 NAKAMURA Usaku <usa@ruby-lang.org>
-Tue May 21 17:21:12 2013 Koichi Sasada <ko1@atdot.net>
+ * safe.c (safe_setter): of course, don't have to warn the limitation of
+ $SAFE=3 after it's removed.
- * gc.c: remove gc_profile_record::is_marked. always true.
+Wed Jun 17 14:29:43 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Tue May 21 17:13:40 2013 Koichi Sasada <ko1@atdot.net>
+ * include/ruby/ruby.h: $SAFE=3 is now obsolete.
- * gc.c: fix to collect additional information for GC::Profiler.
- * major/minor GC
- * trigger reason of GC
+ * ext/socket/init.c, ext/socket/socket.c, ext/socket/tcpsocket.c
+ ext/socket/udpsocket.c, gc.c, object.c, re.c, safe.c: removed code
+ for $SAFE=3
- * gc.c (gc_profile_dump_on): change reporting format with
- added information.
+ * bootstraptest/test_method.rb, test/erb/test_erb.rb, test/ruby/test_dir.rb
+ test/ruby/test_file.rb, test/ruby/test_method.rb, test/ruby/test_regexp.rb
+ test/ruby/test_thread.rb: remove tests for $SAFE=3
- * gc.c (gc_profile_record_get): return added information by
- :GC_FLAGS => array.
+Wed Jun 17 12:13:33 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Tue May 21 16:45:31 2013 Koichi Sasada <ko1@atdot.net>
+ * ChangeLog: added contributor name.
- * gc.c: GC::Profiler's sweeping time is accumulated all slot
- sweeping time. At lazy GC, GC::Profiler makes new record entry
- for each lazy_sweep(). In this change, accumulating all
- slot_sweep() time.
- And change indentation.
+Wed Jun 17 10:57:28 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Tue May 21 16:29:09 2013 Koichi Sasada <ko1@atdot.net>
+ * lib/csv.rb: accept to use Range object for row selection.
+ contributed by Mitsutaka Mimura.
+ [Feature #11267][ruby-dev:49091]
- * common.mk (rdoc-bench): add a benchmark rule
- using RDoc. Generate all rdoc related files
- (same as `make rdoc') in temporary directory
- and remove them. Execution time, GC::Profiler
- and results of GC.stat are printed.
+Wed Jun 17 09:50:12 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * tool/rdocbench.rb: added for `rdoc-bench'.
+ * lib/rdoc/servlet.rb (documentation_search, root_search):
+ requires json for JSON.dump and fix sporadic failures due to
+ the loading order.
-Tue May 21 16:25:05 2013 Koichi Sasada <ko1@atdot.net>
+Tue Jun 16 19:19:53 2015 Tanaka Akira <akr@fsij.org>
- * gc.c (gc_profile_dump_on): `count' should be (int) because it
- can be negative number.
- And use pointer for `record' (don't copy).
+ * ext/rbconfig/sizeof/extconf.rb: Check several types defined in C99
+ and x86_64 ABI.
-Tue May 21 03:11:18 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * template/sizes.c.tmpl: Relax a pattern for types.
- * dir.c (dir_each): compose HFS file names from
- UTF8-MAC. [ruby-core:48745] [Bug #7267]
+Tue Jun 16 17:37:01 2015 Koichi Sasada <ko1@atdot.net>
-Tue May 21 03:08:52 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/objspace/test_objspace.rb: relax pattern because uncollectible
+ flag and marked flag can be false at major GC.
+ [Bug #10852]
- * test/ruby/envutil.rb (assert_separately): require envutil in the
- child process too.
+Tue Jun 16 04:50:44 2015 Eric Wong <e@80x24.org>
-Tue May 21 03:07:26 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/socket/basicsocket.c (bsock_recv): document outbuf
+ * ext/socket/unixsocket.c (unix_recvfrom): ditto
+ * ext/socket/init.c (rsock_strbuf, recvfrom_locktmp): new functions
+ (rsock_s_recvfrom): support destination buffer as 3rd arg
+ (rsock_s_recvfrom_nonblock): ditto
+ * string.c (rb_str_locktmp_ensure): export for internal ext
+ * test/socket/test_nonblock.rb: test recv_nonblock
+ * test/socket/test_unix.rb: test recv
+ [ruby-core:69543] [Feature #11242]
- * string.c (rb_str_conv_enc_opts): should infect.
+Tue Jun 16 04:38:02 2015 Eric Wong <e@80x24.org>
-Mon May 20 22:24:45 2013 Akinori MUSHA <knu@iDaemons.org>
+ * ext/socket/ancdata.c (bsock_sendmsg_internal,
+ bsock_recvmsg_internal):
+ support "exception: false" kwarg
+ * ext/socket/init.c (rsock_s_recvfrom_nonblock):
+ ditto
+ * ext/socket/init.c (rsock_s_recvfrom_nonblock): use rsock_opt_false_p
+ * ext/socket/socket.c (sock_connect_nonblock): ditto
+ * ext/socket/rubysocket.h (rsock_opt_false_p): new function
+ * ext/socket/basicsocket.c (bsock_recv_nonblock): update rdoc
+ * ext/socket/udpsocket.c (udp_recvfrom_nonblock): ditto
+ * test/socket/test_nonblock.rb: new tests
+ [ruby-core:69542] [Feature #11229]
- * lib/set.rb (Set#delete_if, Set#keep_if): Avoid blockless call of
- proc, which is not portable to JRuby. Replace &method() with
- faster and simpler literal blocks while at it.
+Mon Jun 15 14:33:02 2015 Akinori MUSHA <knu@iDaemons.org>
-Mon May 20 22:00:31 2013 Zachary Scott <zachary@zacharyscott.net>
+ * lib/set.rb: Make Set#each and SortedSet#each generate a sized
+ enumerator. [GH-931] by kachick (Kenichi Kamiya)
- * lib/e2mmap.rb: Format of E2MM documentation
+ * test/test_set.rb: Import tests from Set into SortedSet. [GH-931]
+ by kachick (Kenichi Kamiya)
-Mon May 20 21:41:15 2013 Zachary Scott <zachary@zacharyscott.net>
+Mon Jun 15 02:26:34 2015 NARUSE, Yui <naruse@ruby-lang.org>
- * ext/extmk.rb: nodoc this file
+ * lib/net/http.rb (Net::HTTP#connect): use connect_nonblock and
+ io/wait to eliminate timeout use. fix GH-899
-Mon May 20 20:43:32 2013 Zachary Scott <zachary@zacharyscott.net>
+Sat Jun 13 07:21:18 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * lib/cmath.rb: Remove duplicate RDoc heading from overview
+ * thread.c (thread_start_func_2): don't interrupt when last thread
+ exit unless main thread is already exited. Otherwise main thread
+ could be wrongly interrupted when it uses rb_thread_call_without_gvl().
+ Patch by Takehiro Kubo. [Bug #11237][ruby-dev:49044][GH-898]
-Mon May 20 20:36:19 2013 Zachary Scott <zachary@zacharyscott.net>
+ * test/-ext-/gvl/test_last_thread.rb: new test for the above fix.
- * lib/securerandom.rb: Update position of overview for RDoc
+ * ext/-test-/gvl/call_without_gvl/call_without_gvl.c: new ext for
+ the above test.
+ * ext/-test-/gvl/call_without_gvl/extconf.rb: ditto.
-Mon May 20 19:33:55 2013 Benoit Daloze <eregontp@gmail.com>
+Mon Jun 15 00:14:33 2015 Tanaka Akira <akr@fsij.org>
- * math.c: improve and fix documentation of sin, tan and log
+ * ext/pathname/lib/pathname.rb (descend): Blockless form supported.
+ (ascend): Ditto.
+ [ruby-core:68820] [Feature #11052] Patch by Piotr Szotkowski.
-Mon May 20 19:31:49 2013 Benoit Daloze <eregontp@gmail.com>
+Sun Jun 14 20:09:25 2015 Tanaka Akira <akr@fsij.org>
- * lib/logger.rb (Logger::Application): show namespace in documentation
+ * time.c (time_getlocaltime): [DOC] Add examples of valid utc_offset
+ formats.
+ [ruby-core:68306] [Misc #10905] Patch by Charles Korn.
-Mon May 20 11:50:12 2013 Zachary Scott <zachary@zacharyscott.net>
+Sun Jun 14 18:49:56 2015 Tanaka Akira <akr@fsij.org>
- * lib/pp.rb: Revert part of r40834 and nodoc PP::ObjectMixin
- [ruby-core:55068]
+ * ext/socket/raddrinfo.c (parse_numeric_port): Detect
+ port overflow.
+ (numeric_getaddrinfo): Use parse_numeric_port.
+ numeric_getaddrinfo fails if port is too big now.
+ This makes rb_getaddrinfo invokes the real getaddrinfo()
+ on such condition.
+ This change is related to [ruby-core:69355] [Bug #11179].
-Mon May 20 10:40:21 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sun Jun 14 17:26:03 2015 Tanaka Akira <akr@fsij.org>
- * lib/webrick/htmlutils.rb (WEBrick::HTMLUtils#escape): replace HTML
- meta chars even in non-ascii string. [Bug #8425] [ruby-core:55052]
+ * enum.c (enum_chunk_while): New method Enumerable#chunk_while.
+ [ruby-core:67738] [Feature #10769] proposed by Tsuyoshi Sawada.
- * lib/webrick/httputils.rb (WEBrick::HTTPUtils#{_escape,_unescape}):
- fix %-escape encodings. [Bug #8425] [ruby-core:55052]
+Sun Jun 14 17:20:40 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/webrick/httpservlet/filehandler.rb (set_dir_list): revert r20152
- partially and fix misuse of bytesize and regexp repetition operator.
+ * file.c (rb_file_load_ok): try opening file without gvl not to
+ lock entire process. [Bug #11060]
-Mon May 20 08:03:51 2013 Zachary Scott <zachary@zacharyscott.net>
+Sun Jun 14 10:43:50 2015 NAKAMURA Usaku <usa@ruby-lang.org>
- * lib/profiler.rb: Document Profiler__ methods
+ * tool/runruby.rb: just remove the lines of RUBY_VERSION check and raise
+ instead of replacing the check to `true`, for getting rid of a
+ warning `possibly useless use of true in void context`.
-Mon May 20 08:02:13 2013 Zachary Scott <zachary@zacharyscott.net>
+Sun Jun 14 10:13:55 2015 Kouhei Sutou <kou@cozmixng.org>
- * lib/tempfile.rb: nodoc Tempfile#inspect
+ * lib/rexml/source.rb (REXML::IOSource#scan): Fix a typo in
+ document. [fix GH-934]
+ Patch by Anton Davydov. Thanks!!!
-Mon May 20 07:48:24 2013 Zachary Scott <zachary@zacharyscott.net>
+Sun Jun 14 10:09:48 2015 Kouhei Sutou <kou@cozmixng.org>
- * ext/stringio/stringio.c: Correct position of method rdoc
+ * lib/rexml/attlistdecl.rb (REXML::AttlistDecl): Fix a typo in
+ document. [fix GH-934]
+ Patch by Anton Davydov. Thanks!!!
-Mon May 20 07:27:41 2013 Zachary Scott <zachary@zacharyscott.net>
+Sun Jun 14 06:24:57 2015 Benoit Daloze <eregontp@gmail.com>
- * math.c: RDoc formatting of Math core docs with domains and codomains
- Patch by @eLobato [Fixes GH-309]
+ * test/ruby/test_io.rb: add test for IO.binread fd leak.
+ See r50881.
-Mon May 20 05:58:12 2013 Zachary Scott <zachary@zacharyscott.net>
+Sun Jun 14 05:23:51 2015 Benoit Daloze <eregontp@gmail.com>
- * ext/bigdecimal/bigdecimal.c: Formatting for BigMath [Fixes GH-306]
- Based on a patch by @eLobato.
- * ext/bigdecimal/lib/bigdecimal/math.rb: ditto
+ * io.c (rb_io_s_binread): close fd if seek offset is invalid.
-Mon May 20 04:56:59 2013 Zachary Scott <zachary@zacharyscott.net>
+Sun Jun 14 04:40:32 2015 Benoit Daloze <eregontp@gmail.com>
- * lib/forwardable.rb: Forwardable examples in overview were broken
- Based on patch by @joem [Fixes GH-303] [Bug #8392]
+ * test/lib/leakchecker.rb (check): refactor.
-Mon May 20 03:35:26 2013 Zachary Scott <zachary@zacharyscott.net>
+Sun Jun 14 04:34:14 2015 Benoit Daloze <eregontp@gmail.com>
- * lib/optparse.rb: nodoc OptionParser::Version and SPLAT_PROC
+ * test/lib/leakchecker.rb: Return false for no leaks.
+ Otherwise the GC could run for nothing.
-Mon May 20 03:16:52 2013 Zachary Scott <zachary@zacharyscott.net>
+Sun Jun 14 04:15:40 2015 Benoit Daloze <eregontp@gmail.com>
- * lib/pp.rb: Document PP::ObjectMixin [Fixes GH-312]
+ * lib/delegate.rb: [DOC] Update SimpleDelegator example. [ci skip]
-Sun May 19 23:52:22 2013 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
+Sat Jun 13 20:28:14 2015 NARUSE, Yui <naruse@ruby-lang.org>
- * test/webrick/test_htmlutils.rb: add test for WEBrick::HTMLUtils.
+ * file.c (rb_stat_ino): get inode from the interval of struct st.
-Sun May 19 23:12:07 2013 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
+ * win32/win32.c (stati64_set_inode): get nFileIndexHigh/Low, and set it
+ to the interval of struct st as inode.
+ [Feature #11216]
- * encoding.c: document fix, change default script encoding.
- patched by @windwiny [Fixes GH-310]
+ * win32/win32.c (stati64_set_inode_handle): call stati64_set_inode.
-Sun May 19 17:29:07 2013 Akinori MUSHA <knu@iDaemons.org>
+ * win32/win32.c (rb_w32_fstati64): call stati64_set_inode_handle.
- * lib/set.rb (Set#delete_if, Set#keep_if): Add comments.
+ * win32/win32.c (stati64_handle): call stati64_set_inode.
-Sun May 19 11:37:36 2013 Kazuki Tsujimoto <kazuki@callcc.net>
+Sat Jun 13 19:44:53 2015 NAKAMURA Usaku <usa@ruby-lang.org>
- * ext/fiddle/extconf.rb: ignore rc version of libffi to fix build failure.
+ * ext/io/console/depend (.list.chksum): revert a part of r50859, because
+ it was not mentioned at its commit log and it caused a build error on
+ Windows ($(MAKE) is already quoted).
-Sun May 19 10:38:50 2013 Akinori MUSHA <knu@iDaemons.org>
+Sat Jun 13 17:35:11 2015 NARUSE, Yui <naruse@ruby-lang.org>
- * misc/ruby-electric.el (ruby-electric-delete-backward-char): Use
- delete-char instead of delete-backward-char, which is an
- interactive function.
+ * vm_core.h (rb_thread_t): add th->name.
-Sun May 19 03:59:29 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * vm.c (th_init): initialize th->name.
- * string.c (str_scrub0): added for refactoring.
+ * thread.c (Init_Thread): add Thread.name and name=. [Feature #11251]
-Sun May 19 03:48:26 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * thread.c (rb_thread_inspect): show thread's name if set.
- * lib/uri/common.rb (URI.decode_www_form): scrub string if decoded
- bytes are invalid for the encoding.
+ * thread.c (rb_thread_getname): defined.
-Sun May 19 02:46:32 2013 Akinori MUSHA <knu@iDaemons.org>
+ * thread.c (rb_thread_setname): ditto.
- * lib/set.rb (Set#delete_if, Set#keep_if): Make Set#delete_if and
- Set#keep_if more space and time efficient by avoiding to_a.
+Sat Jun 13 11:39:43 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Sun May 19 02:33:09 2013 Akinori MUSHA <knu@iDaemons.org>
+ * lib/tempfile.rb: Fix typo. [fix GH-933] Patch by @Zorbash
- * misc/ruby-electric.el (ruby-electric-setup-keymap): Make
- backquotes electric as well. It was listed in
- ruby-electric-expand-delimiters-list but not activated.
+Sat Jun 13 11:38:00 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * misc/ruby-electric.el (ruby-electric-delete-backward-char):
- Introduce electric DEL that deletes what the previous electric
- command has input.
+ * ext/openssl/ossl_ocsp.c: fix documentation on ocsp response cert status.
+ [fix GH-932] Patch by @chrisholmes
- * misc/ruby-electric.el (ruby-electric-matching-char): Make
- electric quotes work again at the end of buffer.
+Sat Jun 13 11:35:19 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Sun May 19 01:39:50 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/bigdecimal/bigdecimal.gemspec: Fix require paths for released gem.
+ [fix GH-929] Patch by @voxik
+ * ext/io/console/io-console.gemspec: ditto.
- * configure.in (setjmp-type): check if setjmpex() is really available.
- workaround for i686-w64-mingw32 which declares it but lacks its
- definition.
+Sat Jun 13 00:45:08 2015 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
- * include/ruby/defines.h: include setjmpex.h only if also setjmpex()
- is available.
+ * lib/prime.rb: Return sized enumerators.
+ Patch by Kenichi Kamiya [GH-931]
-Sat May 18 23:57:46 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Jun 13 00:45:06 2015 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
- * configure.in (setjmp-type): use setjmpex() on w64-mingw32 to get rid
- of -Wclobbered warnings.
+ * lib/prime.rb: Fix with_object with no block given
- * include/ruby/defines.h: include setjmpex.h here becase setjmp.h is
- included from win32.h via intrin.h, winnt.h, and so on.
+Sat Jun 13 00:44:59 2015 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-Sat May 18 20:28:12 2013 Tanaka Akira <akr@fsij.org>
+ * lib/prime.rb: Have with_index accept an offset parameter.
+ Based on patch by T Yamada. [#11007]
- * ext/socket/mkconstants.rb (INTEGER2NUM): Make less comparisons.
+Fri Jun 12 22:21:12 2015 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-Sat May 18 20:15:28 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * test/ruby/test_extlibs.rb (TestExtLibs::check_existence): fix
+ error. [Bug #11255] [ruby-dev:49079]
- * string.c (str_scrub_bang): add String#scrub!. [Feature #8414]
+Fri Jun 12 21:17:46 2015 NAKAMURA Usaku <usa@ruby-lang.org>
-Sat May 18 16:59:52 2013 Tanaka Akira <akr@fsij.org>
+ * pack.c (pack_{un,}pack): new template character `j` and `J`, pointer
+ with signed and unsigned integers.
- * ext/socket/mkconstants.rb (INTEGER2NUM): Renamed from INTEGER2VALUE.
+ * NEWS: mention about this feature.
+ [Feature #11215] [ruby-dev:49015]
-Sat May 18 16:57:58 2013 Tanaka Akira <akr@fsij.org>
+Fri Jun 12 21:01:44 2015 NAKAMURA Usaku <usa@ruby-lang.org>
- * ext/socket/mkconstants.rb (INTEGER2VALUE): Suppress a warning:
- comparison between signed and unsigned integer expressions
+ * file.c (File::SHARE_DELETE): new flag to be able to delete opened file
+ on Windows.
-Sat May 18 16:38:39 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * include/win32/win32.c (O_SHARE_DELETE): new pseudo file mode flag.
- * compile.c (iseq_compile_each): forward anonymous and first keyword
- rest argument one. [ruby-core:55033] [Bug #8416].
+ * win32/win32.c (rb_w32_{w,}open): support above flag. [EXPERIMENTAL]
-Sat May 18 15:49:14 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * NEWS: mention about this feature.
+ [Feature #11218] [ruby-dev:49022]
- * vm_core.h (rb_vm_tag): move jmpbuf between tag and prev so ensure to
- be accessible.
+Fri Jun 12 18:21:45 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Sat May 18 11:05:14 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ChangeLog: added missing commit message.
- * enumerator.c (inspect_enumerator): use VALUE instead of mere char*
- by using rb_sprintf() and rb_id2str().
+Fri Jun 12 18:20:37 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * enumerator.c (append_method): extract from inspect_enumerator().
+ * sample/exyacc.rb: Fix some typos. [fix GH-927] Patch by @davydovanton
+ * sample/list.rb: ditto.
+ * sample/trick2013/kinaba/remarks.markdown: ditto.
-Sat May 18 09:00:32 2013 Tanaka Akira <akr@fsij.org>
+Fri Jun 12 17:34:14 2015 Wojciech Mach <wojtek@wojtekmach.pl>
- * ext/socket/mkconstants.rb (INTEGER2VALUE): Use LONG2FIX if possible.
+ * hash.c (rb_hash_fetch_values): add `Hash#fetch_values`.
+ [Feature #10017] [Fix GH-776]
-Sat May 18 00:38:47 2013 Tanaka Akira <akr@fsij.org>
+Fri Jun 12 16:28:17 2015 Radan Skoric <radan.skoric@gmail.com>
- * ext/socket/mkconstants.rb: Convert integer constants bigger than int
- correctly.
+ * array.c (rb_ary_bsearch_index): Implement Array#bsearch_index
+ method, which is similar to bsearch and returns the index or
+ nil. [Feature #10730]
-Fri May 17 22:02:15 2013 Tanaka Akira <akr@fsij.org>
+Thu Jun 11 19:11:22 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * ext/socket/ifaddr.c: Use unsigned LONG_LONG to represent flags
- because SunOS 5.11 (OpenIndiana) defines ifa_flags as uint64_t.
+ * ext/zlib/zlib.c: Fix indentation for rdoc.
+ [Bug #11221][ruby-core:69465]
-Fri May 17 21:47:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Thu Jun 11 16:23:37 2015 Koichi Sasada <ko1@atdot.net>
- * cont.c: Typo in constant MAX_MACHINE_STACK_CACHE from '..MAHINE..'
- patch by @schmurfy [Fixes GH-307]
+ * method.h (METHOD_ENTRY_BASIC_SET): fix last commit (unbalanced parens).
-Fri May 17 19:18:24 2013 Akinori MUSHA <knu@iDaemons.org>
+Thu Jun 11 15:14:16 2015 NARUSE, Yui <naruse@ruby-lang.org>
- * misc/ruby-electric.el (ruby-electric-matching-char): Do not put
- a closing quote when the quote typed does not start a string, as
- in $', ?\' or ?\".
+ * configure.in: define SET_THREAD_NAME if it has pthread_set_name_np
+ for FreeBSD, and don't define it if both pthread_setname_np
+ and pthread_set_name_np don't exist.
-Fri May 17 18:06:15 2013 Tanaka Akira <akr@fsij.org>
+ * thread_pthread.c (SET_THREAD_NAME): don't define if they don't exist.
- * configure.in: Consider error messages to find out version option of
- C compiler.
- The C compiler of Sun Studio C emits "Warning: Option -qversion
- passed to ld, if ld is invoked, ignored otherwise" and exit
- successfully.
+ * thread_pthread.c (native_set_thread_name): run if SET_THREAD_NAME
+ is defined.
-Fri May 17 17:34:48 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Jun 11 15:53:31 2015 Koichi Sasada <ko1@atdot.net>
- * gc.c (rb_gc_guarded_ptr): unoptimize on other compilers than gcc and
- msvc.
+ * method.h (METHOD_ENTRY_BASIC_SET): should clear last bit.
-Fri May 17 11:06:48 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Jun 11 14:34:45 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * eval_intern.h (TH_PUSH_TAG): ensure jmpbuf to be accessible before
- pushing tag to get rid of unaccessible tag by stack overflow.
+ * lib/rubygems.rb: bump version to 2.4.7 and 2.4.8. these versions fixed
+ CVE-2015-3900.
+ * lib/rubygems/remote_fetcher.rb: ditto.
+ * test/rubygems/test_gem_remote_fetcher.rb: added testcase for CVE-2015-3900
-Thu May 16 17:15:32 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Thu Jun 11 14:18:51 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * vm_eval.c (rb_catch_obj): add volatile to tag to prevent crash
- experimentally.
- http://www.rubyist.net/~akr/chkbuild/debian/ruby-trunk/log/20130515T133500Z.log.html.gz
+ * lib/rubygems.rb: bump version to 2.4.6. It's missing change at r49774.
-Thu May 16 16:19:50 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Jun 11 13:50:19 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * win32/Makefile.sub (verconf.in): no longer used.
+ * array.c (ary_ensure_room_for_push): check if array size will
+ exceed maximum size to get rid of buffer overflow.
+ [ruby-dev:49043] [Bug #11235]
- * win32/Makefile.sub (config.status): fix typo.
+ * array.c (ary_ensure_room_for_unshift, rb_ary_splice): ditto.
- * configure.in, template/verconf.h.in (RUBY_EXEC_PREFIX): fix for
- default prefix.
+Thu Jun 11 13:17:34 2015 NAKAMURA Usaku <usa@ruby-lang.org>
-Thu May 16 13:12:27 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/test_cmath.rb (TestCMath#test_trigonometric_functions): should
+ not compare float values (in complex values) by `==`.
- * template/verconf.h.in: generate verconf.h from the template and
- rbconfig.rb.
+Thu Jun 11 08:52:01 2015 Koichi Sasada <ko1@atdot.net>
-Thu May 16 05:47:18 2013 Aaron Patterson <aaron@tenderlovemaking.com>
+ * method.h: embed rb_method_entry_t::attr::flags (5 bits) into
+ rb_method_entry_t::flags to make one word spare space.
- * ext/psych/lib/psych/visitors/yaml_tree.rb: fix syntax error.
- Thanks @spastorino! [ruby-core:55011]
+ Add some macros to access these flags.
-Thu May 16 03:05:45 2013 Koichi Sasada <ko1@atdot.net>
+ * vm_method.c: use these macros.
- * gc.c (rb_node_newnode): use newobj_of() instead of rb_newobj().
+ * internal.h: define IMEMO_FL_USHIFT and IMEMO_FL_USER[0-4]
+ for T_IMEMO local flags.
-Thu May 16 02:03:39 2013 Tanaka Akira <akr@fsij.org>
+Thu Jun 11 08:27:06 2015 Koichi Sasada <ko1@atdot.net>
- * ext/socket/depend: Add a dependency for ifaddr.o.
+ * vm.c: use VM_ASSERT instead of assert().
-Thu May 16 01:44:45 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm_args.c: ditto.
- * common.mk (verconf.h): $< cannot be used in explicit rules with
- nmake.
+ * vm_insnhelper.c: ditto.
- * win32/Makefile.sub (CONFIG_H): create verconf.in instead of
- verconf.h.
+ * vm_method.c: ditto.
-Thu May 16 01:25:07 2013 Aaron Patterson <aaron@tenderlovemaking.com>
+Thu Jun 11 08:16:48 2015 Koichi Sasada <ko1@atdot.net>
- * ext/psych/lib/psych/visitors/yaml_tree.rb: only emit warnings when
- -w is enabled.
+ * vm_core.h: define VM_ASSERT() for assertion
+ enabled only when (VM_CHECK_MODE > 0).
-Wed May 15 18:58:17 2013 Koichi Sasada <ko1@atdot.net>
+ * vm_insnhelper.c: move definition VM_CHECK_MODE
+ from vm_insnhelper.c to vm_core.h.
- * gc.c (newobj): rename to `newobj_of' and accept additional
- three parameters v1, v2, v3. newobj_of() do OBJSETUP() and
- fill values with v1, v2, v3.
+ * vm.c: remove <assert.h>
- * gc.c (rb_data_object_alloc, rb_data_typed_object_alloc):
- use newobj_of().
+Thu Jun 11 06:46:07 2015 Koichi Sasada <ko1@atdot.net>
-Wed May 15 17:55:49 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm_insnhelper.c (check_frame): check type of cref_or_me first.
- * configure.in (RUBY_PLATFORM): move to config.h as needed by
- version.c.
+Thu Jun 11 04:34:39 2015 Kazuki Tanaka <gogotanaka@ruby-lang.org>
-Wed May 15 17:04:11 2013 Koichi Sasada <ko1@atdot.net>
+ * test/test_cmath.rb: Add some assertions.
- * gc.c: add an additional RGENGC_PROFILE mode (2).
- Profiling result can be check by GC.stat.
+Thu Jun 11 00:34:39 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c (type_name): separate from obj_type_name().
+ * template/fake.rb.in: expanded macro result may have spaces
+ between tokens. [ruby-dev:49047] [Bug #11243]
-Wed May 15 16:58:24 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Jun 10 22:27:32 2015 Naohisa Goto <ngotogenome@gmail.com>
- * configure.in: save configured load path values into verconf.in.
+ * lib/mkmf.rb: revert r50804 because of build failure when specifying
+ LDFLAGS during configure, observed on Solaris with GCC 4.6.
+ [Bug #11245]
- * common.mk (verconf.h): create from verconf.in with shvar_to_cpp.rb.
+Wed Jun 10 21:59:51 2015 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
- * tool/shvar_to_cpp.rb: turn shell variables into C macros.
- [Bug #7959]
+ * README.ja.md: fix markup miss.
- * loadpath.c: split load path staffs from version.c.
+Wed Jun 10 11:06:25 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * dmyloadpath.c: miniruby has no builtin load paths, so verconf.h is
- not needed.
+ * template/fake.rb.in: turn into erb template from autoconf
+ template to fake more accurately.
-Wed May 15 03:56:09 2013 Aaron Patterson <aaron@tenderlovemaking.com>
+ * common.mk (fake.rb): needs preprocessed file now.
- * ext/psych/lib/psych/visitors/yaml_tree.rb: adding backwards
- compatible YAMLTree.new method
+ * version.c (Init_version): add dummy expression to
+ RUBY_ENGINE_VERSION.
-Wed May 15 02:22:16 2013 Aaron Patterson <aaron@tenderlovemaking.com>
+Tue Jun 9 12:31:25 2015 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
- * ext/psych/lib/psych.rb: Adding Psych.safe_load for loading a user
- defined, restricted subset of Ruby object types.
- * ext/psych/lib/psych/class_loader.rb: A class loader for
- encapsulating the logic for which objects are allowed to be
- deserialized.
- * ext/psych/lib/psych/deprecated.rb: Changes to use the class loader
- * ext/psych/lib/psych/exception.rb: ditto
- * ext/psych/lib/psych/json/stream.rb: ditto
- * ext/psych/lib/psych/nodes/node.rb: ditto
- * ext/psych/lib/psych/scalar_scanner.rb: ditto
- * ext/psych/lib/psych/stream.rb: ditto
- * ext/psych/lib/psych/streaming.rb: ditto
- * ext/psych/lib/psych/visitors/json_tree.rb: ditto
- * ext/psych/lib/psych/visitors/to_ruby.rb: ditto
- * ext/psych/lib/psych/visitors/yaml_tree.rb: ditto
- * ext/psych/psych_to_ruby.c: ditto
- * test/psych/helper.rb: ditto
- * test/psych/test_safe_load.rb: tests for restricted subset.
- * test/psych/test_scalar_scanner.rb: ditto
- * test/psych/visitors/test_to_ruby.rb: ditto
- * test/psych/visitors/test_yaml_tree.rb: ditto
+ * lib/prime.rb: Simplify and optimize EratosthenesSieve
-Wed May 15 02:06:35 2013 Aaron Patterson <aaron@tenderlovemaking.com>
+Tue Jun 9 11:45:00 2015 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
- * test/psych/helper.rb: envutil is not available outside Ruby, so
- port the functions from envutil to the test helper.
+ * lib/prime.rb: Simplify and optimize EratosthenesSieve
+ based on patch by Ajay Kumar. [Fixes GH-921]
- * test/psych/test_deprecated.rb: ditto
+Mon Jun 8 05:09:58 2015 Koichi Sasada <ko1@atdot.net>
- * test/psych/test_encoding.rb: ditto
+ * gc.c (obj_info): print method id for T_IMEMO/ment.
-Wed May 15 00:42:54 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+Sun Jun 7 07:05:43 2015 Kazuki Tanaka <gogotanaka@ruby-lang.org>
- * signal.c: need to include unistd.h for write(2).
- unistd.h is now included via ruby/defines.h, but should explicitly
- include here. (suggested by kosaki)
+ * Move test cases from test/ruby/test_complex.rb to test/test_cmath.rb
-Tue May 14 23:43:05 2013 Tanaka Akira <akr@fsij.org>
+Sat Jun 6 18:23:41 2015 Koichi Sasada <ko1@atdot.net>
- * ext/socket/.document: Add ifaddr.c.
+ * method.h: back to share rb_method_definition_t by
+ rb_method_entry_t.
-Tue May 14 23:24:31 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ r50728 changed sharing `def's to isolating `def's
+ on alias and so on. However, this change conflicts
+ future improvement plan. So I change back to sharing approach.
- * ext/socket/extconf.rb: check for if_nametoindex() for
- i686-w64-mingw32, and check for declarations of if_indextoname() and
- if_nametoindex().
+ * method.h: move rb_method_definition_t::flags to
+ rb_method_entry_t::attr::flags.
- * ext/socket/ifaddr.c (ifaddr_ifindex): not-implement unless
- if_nametoindex() is available.
+ rb_method_entry_t::attr is union with VALUE because this field
+ should have same size of VALUE. rb_method_entry_t is T_IMEMO).
- * ext/socket/rubysocket.h: declare if_indextoname() and
- if_nametoindex() if available but not declared.
+ And also add the following access macros to it's fields.
-Tue May 14 19:58:17 2013 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
+ * METHOD_ENTRY_VISI(me)
+ * METHOD_ENTRY_BASIC(me)
+ * METHOD_ENTRY_SAFE(me)
- * ext/dl/lib/dl/func.rb (DL::Function#call): check tainted when
- $SAFE > 0.
- * ext/fiddle/function.c (function_call): check tainted when $SAFE > 0.
- * test/fiddle/test_func.rb (module Fiddle): add test for above.
+ * vm_method.c (rb_method_definition_addref): added instead of
+ rb_method_definition_clone().
+ Do not create new definition, but increment alias_count.
-Tue May 14 14:51:52 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * class.c (clone_method): catch up this fix.
- * include/ruby/win32.h (INTPTR_MAX, INTPTR_MIN, UINTPTR_MAX): split
- from intptr_t and uintptr_t, since VC9 defines the latter only in
- crtdefs.h.
+ * class.c (method_entry_i): ditto.
-Tue May 14 12:21:28 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * proc.c (mnew_internal): ditto.
- * win32/win32.c (NET_LUID): mingw may have NET_LUID and not defined
- _IFDEF_.
+ * proc.c (mnew_missing): ditto.
-Tue May 14 03:33:17 2013 Koichi Sasada <ko1@atdot.net>
+ * vm_eval.c: ditto.
- * string.c (rb_str_new_frozen): remove debug print.
+ * vm_insnhelper.c: ditto.
-Tue May 14 03:22:51 2013 Koichi Sasada <ko1@atdot.net>
+ * vm_method.c: ditto.
- * include/ruby/ruby.h: enable to generate write barrier protected
- arrays (T_ARRAY).
+Sat Jun 6 15:59:38 2015 Koichi Sasada <ko1@atdot.net>
-Tue May 14 03:21:42 2013 Koichi Sasada <ko1@atdot.net>
+ * class.c: ins_methods_push() needs rb_method_visibility_t type on
+ 2nd arg.
- * include/ruby/ruby.h: enable to generate write barrier protected
- strings (T_STRING).
+Sat Jun 6 15:05:47 2015 Koichi Sasada <ko1@atdot.net>
-Tue May 14 03:19:59 2013 Koichi Sasada <ko1@atdot.net>
+ * class.c (ins_methods_push): Change type and name of parameters
+ to make more clear.
- * include/ruby/ruby.h: enable to generate write barrier protected
- objects (T_OBJECT).
+Sat Jun 6 08:52:13 2015 Eric Wong <e@80x24.org>
-Tue May 14 03:17:15 2013 Koichi Sasada <ko1@atdot.net>
+ * test/socket/test_nonblock.rb: try to avoid EMSGSIZE
+ [ruby-core:69466]
- * include/ruby/ruby.h: enable to generate write barrier protected
- objects for numeric types (Float, Complex, Rational, Bignum).
+Sat Jun 6 07:58:30 2015 Koichi Sasada <ko1@atdot.net>
-Tue May 14 03:10:59 2013 Koichi Sasada <ko1@atdot.net>
+ * gc.c: remove struct mark_tbl_arg and pass objspace directly
+ to avoid indirect access overhead.
- * include/ruby/ruby.h: enable RGENGC (USE_RGENGC)
- but no type creates write protected (sunny) objects
- (RGENGC_WB_PROTECTED_* == 0).
+Sat Jun 6 07:08:45 2015 Eric Wong <e@80x24.org>
-Tue May 14 02:47:30 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/socket/ancdata.c (bsock_sendmsg_internal): drop redundant assignment
- * gc.c: support RGENGC. [ruby-trunk - Feature #8339]
- See this ticket about RGENGC.
+Sat Jun 6 01:00:06 2015 Naohisa Goto <ngotogenome@gmail.com>
- * gc.c: Add several flags:
- * RGENGC_DEBUG: if >0, then prints debug information.
- * RGENGC_CHECK_MODE: if >0, add assertions.
- * RGENGC_PROFILE: if >0, add profiling features.
- check GC.stat and GC::Profiler.
+ * ext/socket/ancdata.c (bsock_sendmsg_internal): all arguments are
+ parsed even on systems without HAVE_STRUCT_MSGHDR_MSG_CONTROL
+ to prevent SEGV caused by passing Qnil to RARRAY_LENINT and
+ to preserve behavior before r50776.
+ [Bug #11224] [ruby-core:69468] [Bug #11225] [ruby-core:69469]
- * include/ruby/ruby.h: disable RGENGC by default (USE_RGENGC == 0).
+Fri Jun 5 22:37:42 2015 Koichi Sasada <ko1@atdot.net>
- * array.c: add write barriers for T_ARRAY and generate sunny objects.
+ * class.c (ins_methods_push): change 3rd parameter's type
+ from long to rb_method_visibility_t.
- * include/ruby/ruby.h (RARRAY_PTR_USE): added. Use this macro if
- you want to access raw pointers. If you modify the contents which
- pointer pointed, then you need to care write barrier.
+ * class.c (ins_methods_i): catch up this fix.
- * bignum.c, marshal.c, random.c: generate T_BIGNUM sunny objects.
+ * class.c (method_entry_i): cast to st_data_t instead of `long'.
- * complex.c, include/ruby/ruby.h: add write barriers for T_COMPLEX
- and generate sunny objects.
+Fri Jun 5 20:37:10 2015 Koichi Sasada <ko1@atdot.net>
- * rational.c (nurat_s_new_internal), include/ruby/ruby.h: add write
- barriers for T_RATIONAL and generate sunny objects.
+ * internal.h: move definition of rb_cref_t to method.h.
- * internal.h: add write barriers for RBasic::klass.
+ * eval_intern.h: move definition of rb_scope_visibility_t
+ to method.h.
- * numeric.c (rb_float_new_in_heap): generate sunny T_FLOAT objects.
+ * method.h: change rb_cref_t::scope_visi from VALUE to
+ rb_scope_visibility_t.
+ [Bug #11219]
- * object.c (rb_class_allocate_instance), range.c:
- generate sunny T_OBJECT objects.
+ * vm.c (vm_cref_new): accept rb_method_visibility_t directly.
- * string.c: add write barriers for T_STRING and generate sunny objects.
+ * vm_insnhelper.c (rb_vm_rewrite_cref): don't use 0,
+ but METHOD_VISI_UNDEF.
- * variable.c: add write barriers for ivars.
+ * vm_method.c (rb_scope_visibility_set): don't need to use cast.
- * vm_insnhelper.c (vm_setivar): ditto.
+ * vm_method.c (rb_scope_module_func_set): ditto.
- * include/ruby/ruby.h, debug.c: use two flags
- FL_WB_PROTECTED and FL_OLDGEN.
+Fri Jun 5 17:27:30 2015 Eric Wong <e@80x24.org>
- * node.h (NODE_FL_CREF_PUSHED_BY_EVAL, NODE_FL_CREF_OMOD_SHARED):
- move flag bits.
+ * ext/socket/ancdata.c (bsock_sendmsg_internal): avoid msg_control
+ ptr if msg_controllen is zero to fix portability problems.
-Tue May 14 01:54:48 2013 Koichi Sasada <ko1@atdot.net>
+Fri Jun 5 09:17:45 2015 Eric Wong <e@80x24.org>
- * gc.c: remove rb_objspace_t::marked_num.
- We can use `objspace_live_num()' instead of removed `marked_num'
- if it is after `after_gc_sweep()' function call.
+ * ext/socket/ancdata.c (bsock_sendmsg_internal): fix build error
+ from r50776
- * gc.c (after_gc_sweep): use objspace_live_num() instead of removed
- rb_objspace_t::marked_num.
+Fri Jun 5 07:05:58 2015 Eric Wong <e@80x24.org>
- * gc.c (gc_mark_ptr, gc_marks): remove rb_objspace_t::marked_num code.
+ * io.c (sym_wait_readable, sym_wait_writable): declare
+ (io_getpartial): use sym_wait_readable
+ (io_write_nonblock): use sym_wait_writable
+ (Init_IO): initialize sym_wait_*able
- * gc.c (gc_prepare_free_objects): do not call set_heaps_increment()
- with checking objspace->heap.marked_num. At this point, we only
- need to check availability of free-cell.
+Fri Jun 5 06:43:00 2015 Eric Wong <e@80x24.org>
- * gc.c (lazy_sweep): call after_gc_sweep() if there are no sweep_able entry.
+ * doc/extension.rdoc: note rb_get_kwargs changes keywords_hash
+ [ruby-core:68507]
- * gc.c (rest_sweep, gc_prepare_free_objects): remove after_gc_sweep() call.
+Fri Jun 5 05:50:29 2015 Eric Wong <e@80x24.org>
-Tue May 14 01:50:41 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/socket/ancdata.c (bsock_sendmsg_internal): use rb_scan_args
+ [ruby-core:69439] [Feature #11207]
- * gc.c: disable GC_PROFILE_MORE_DETAIL (fix last commit).
+Fri Jun 5 02:20:06 2015 Koichi Sasada <ko1@atdot.net>
- * gc.c (gc_prof_set_malloc_info): fix "objspace->heap.live_num" to
- "objspace_live_num(objspace)". There is no such member variable.
+ * test/lib/envutil.rb (assert_no_memory_leak): change default value
+ of limit from 1.5 to 2.0. It is ad-hoc fix to solve test failure
+ in travis-ci.
-Tue May 14 01:25:55 2013 Koichi Sasada <ko1@atdot.net>
+Fri Jun 5 01:17:21 2015 Koichi Sasada <ko1@atdot.net>
- * gc.c: refactoring GC::Profiler.
+ * vm_insnhelper.c (vm_defined): no need to use cast.
- * gc.c (gc_prof_sweep_timer_start/stop): removed because
- they doesn't support lazy sweep.
+Fri Jun 5 01:14:02 2015 Koichi Sasada <ko1@atdot.net>
- * gc.c (gc_prof_sweep_slot_timer_start/stop): added.
- redefine `sweeping time' to accumulated time of all of
- slot_sweep().
+ * vm_insnhelper.c (vm_defined): show additional messages on rb_bug().
- * gc.c (rb_objspace_t::profile::count): renamed to
- rb_objspace_t::profile::next_index. `counter' seems ambiguous.
- increment it when next record is acquired.
+Fri Jun 5 01:06:02 2015 Koichi Sasada <ko1@atdot.net>
-Tue May 14 00:48:55 2013 Koichi Sasada <ko1@atdot.net>
+ * vm_method.c (rb_add_method_iseq): use intermediate struct to
+ avoid initializing struct with variables.
+ [Bug #11217]
- * include/ruby/ruby.h: constify RRational::(num,den) and
- RComplex::(real,imag).
- Add macro to set these values:
- * RRATIONAL_SET_NUM()
- * RRATIONAL_SET_DEN()
- * RCOMPLEX_SET_REAL()
- * RCOMPLEX_SET_IMAG()
- This change is a part of RGENGC branch [ruby-trunk - Feature #8339].
+ * method.h: add a comment about it.
- TODO: API design. RRATIONAL_SET(rat,num,den) is enough?
- TODO: Setting constify variable with cast has same issue of r40691.
+Fri Jun 5 00:55:21 2015 Koichi Sasada <ko1@atdot.net>
- * complex.c, rational.c: use above macros.
+ * method.h: constify rb_method_refined_t::orig_me.
-Mon May 13 21:49:17 2013 Tanaka Akira <akr@fsij.org>
+ Also constify the following functions.
- * ext/socket/extconf.rb: Check socketpair again.
- It is required on Unix.
+ * rb_resolve_refined_method()
+ * rb_method_entry_with_refinements()
+ * rb_method_entry_without_refinements()
+ * rb_method_entry_copy()'s parameter.
-Mon May 13 21:20:32 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * class.c: catch up this fix.
- * win32/win32.c (getipaddrs): use alternative interface name if
- available, because if_nametoindex() requires them.
+ * vm_insnhelper.c: ditto.
-Mon May 13 20:23:24 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * vm_method.c: ditto.
- * win32/win32.c, include/ruby/win32.h (getipaddrs): [experimental]
- emulate getipaddrs(3) on Unix.
+Thu Jun 4 12:47:54 SGT 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * win32/Makefile.sub, configure.in (LIBS): need iphlpapi.lib for above
- function.
+ * array.c: Revert r50763. because "reentered" is not typo.
- * include/ruby/win32.h (socketpair): rb_w32_socketpair() doesn't
- substitute for any function, so use non-prefixed name.
+Thu Jun 4 11:12:29 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * ext/socket/extconf.rb (socketpair); follow above change.
+ * ext/win32ole/win32ole.c: fix a typo. Patch by @davydovanton
+ [fix GH-923]
+ * include/ruby/st.h: ditto.
+ * include/ruby/util.h: ditto.
-Mon May 13 20:11:06 2013 Koichi Sasada <ko1@atdot.net>
+Thu Jun 4 10:54:30 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * iseq.c (prepare_iseq_build): remove additional line break.
+ * array.c: fix a typo. Patch by @manish-shrivastava
+ [fix GH-922]
-Mon May 13 19:29:54 2013 Koichi Sasada <ko1@atdot.net>
+Thu Jun 4 09:52:02 2015 Eric Wong <e@80x24.org>
- * 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].
+ * ext/openssl/lib/openssl/ssl.rb: use io/nonblock instead of fcntl
+ [ruby-core:69382] [Feature #11190]
- * object.c: add new function rb_obj_reveal().
- This function reveal internal (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);
+Thu Jun 4 07:22:45 2015 Koichi Sasada <ko1@atdot.net>
- TODO: API design. rb_obj_reveal() should be replaced with others.
+ * method.h: introduce rb_method_refined_t for refined method entry.
- TODO: modify constified variables using cast may be harmful for
- compiler's analysis and optimization.
- Any idea to prohibit 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)".
+ * class.c (move_refined_method): catch up this fix.
- * 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.
+ * gc.c (mark_method_entry): ditto.
- * 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.
+ * vm_eval.c (vm_call0_body): ditto.
- * ext/coverage/coverage.c, ext/readline/readline.c,
- ext/socket/ancdata.c, ext/socket/init.c,
- * ext/zlib/zlib.c: ditto.
+ * vm_insnhelper.c (vm_call_method): ditto.
-Mon May 13 18:44:14 2013 Koichi Sasada <ko1@atdot.net>
+ * vm_method.c: ditto.
- * *.c, parse.y, insns.def: use RARRAY_AREF/ASET macro
- instead of using RARRAY_PTR().
+Thu Jun 4 07:12:20 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon May 13 16:53:53 2013 Koichi Sasada <ko1@atdot.net>
+ * dir.c (dirent_match): match short names only when FNM_SHORTNAME
+ flag is given, for the backward compatibility, and the new
+ behavior is often dangerous. [ruby-core:69435] [Bug #11206]
- * 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].
+Thu Jun 4 05:44:01 2015 Eric Wong <e@80x24.org>
-Mon May 13 15:31:10 2013 Koichi Sasada <ko1@atdot.net>
+ * variable.c (special_generic_ivar): remove flag
+ (givar_i, rb_mark_generic_ivar_tbl): remove functions
+ (rb_free_generic_ivar, rb_ivar_lookup, rb_ivar_delete,
+ generic_ivar_set, rb_ivar_set, rb_ivar_defined,
+ rb_copy_generic_ivar, rb_ivar_foreach, rb_ivar_count,
+ rb_obj_remove_instance_variable):
+ adjust for lack of ivar support in special constants
+ * test/ruby/test_variable.rb: test ivars for special consts
+ * internal.h: remove rb_mark_generic_ivar_tbl decl
+ * gc.c (gc_mark_roots): remove rb_mark_generic_ivar_tbl call
+ [ruby-core:69441] [Feature #11208]
- * object.c (rb_obj_setup): added.
+Thu Jun 4 05:13:34 2015 Koichi Sasada <ko1@atdot.net>
- * include/ruby/ruby.h (OBJSETUP): use rb_obj_setup() instead of
- a macro.
+ * vm_insnhelper.c (def_iseq_ptr): `iseqval' is not available any more.
-Mon May 13 15:24:16 2013 Koichi Sasada <ko1@atdot.net>
+Thu Jun 4 04:50:12 2015 Koichi Sasada <ko1@atdot.net>
- * gc.c (rb_data_object_alloc): check klass only if klass is not 0.
- klass==0 means internal object.
+ * class.c (method_entry_i): mtbl should not have `me' as NULL.
-Mon May 13 14:57:28 2013 Koichi Sasada <ko1@atdot.net>
+Thu Jun 4 04:28:45 2015 Koichi Sasada <ko1@atdot.net>
- * gc.c (rb_data_object_alloc, rb_data_typed_object_alloc):
- use NEWOBJ_OF() instead of NEWOBJ().
+ * class.c (clone_method): do not use me->klass, but use explicitly
+ passed argument.
-Mon May 13 14:51:59 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Jun 4 04:10:43 2015 Koichi Sasada <ko1@atdot.net>
- * 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]
+ * vm_core.h (rb_vm_rewrite_cref_stack): rename to rb_vm_rewrite_cref().
- * vm_method.c (rb_method_entry_at): return the method entry for id at
- klass, without ancestors.
+ * class.c (clone_method): use renamed name.
- * class.c (rb_singleton_class_get): get the singleton class if exists,
- or nil.
+ * vm_insnhelper.c (rb_vm_rewrite_cref): do not use `node' in variable
+ names.
-Mon May 13 10:20:59 2013 Yuki Yugui Sonoda <yugui@google.com>
+Wed Jun 3 23:03:50 2015 Koichi Sasada <ko1@atdot.net>
- * ext/openssl/ossl_ssl.c: Disabled OpenSSL::SSL::SSLSocket if
- defined(OPENSSL_NO_SOCK).
+ * vm_method.c: rename `rb_frame_...' to `rb_scope_...'.
- 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.
+ * eval_intern.h: move decl. of rb_scope_visibility_set() to method.h.
-Mon May 13 10:30:04 2013 Zachary Scott <zachary@zacharyscott.net>
+ * load.c: catch up this fix.
- * hash.c: Hash[] and {} are not equivalent by @eam [Fixes GH-301]
+Wed Jun 3 21:14:20 2015 Tanaka Akira <akr@fsij.org>
-Mon May 13 10:04:22 2013 Zachary Scott <zachary@zacharyscott.net>
+ * ext/rbconfig/sizeof/extconf.rb: Check C99 standard integer types.
- * random.c: Document Random::DEFAULT by @eLobato [Fixes GH-304]
+Wed Jun 3 21:00:47 2015 Tanaka Akira <akr@fsij.org>
-Sun May 12 21:12:42 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * configure.in: Don't check __int128.
- * include/ruby/ruby.h (OFFT2NUM): RUBY_REPLACE_TYPE also defines macro
- to convert int type to VALUE if found.
+ * ext/rbconfig/sizeof/extconf.rb: Check __int128.
-Wed May 8 13:46:52 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * ext/rbconfig/sizeof/depend: sizes.c depends on
+ ext/rbconfig/sizeof/extconf.rb.
- * include/ruby/intern.h (rb_iv_set, rb_iv_get): removed. Because
- ruby.h has a declaration for that.
+ * template/sizes.c.tmpl: Detect check_sizeof.
-Wed May 8 13:49:06 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+Wed Jun 3 20:07:07 2015 Koichi Sasada <ko1@atdot.net>
- * include/ruby/intern.h (rb_uint2big, rb_int2big, rb_uint2inum)
- (rb_int2inum, rb_ll2inum, rb_ull2inum): removed because ruby.h
- has a declaration for these.
+ * class.c (clone_method): remove redundant check for me->def != NULL.
+ Now, all `me` have `me->def`.
-Sun May 12 17:52:23 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * proc.c (rb_method_entry_location): ditto.
- * configure.in: removes 'ac_cv_func_fseeko=yes' form MinGW
- specific definitions.
+ * vm.c (rb_vm_check_redefinition_opt_method): ditto.
-Sun May 12 17:25:46 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * vm.c (add_opt_method): ditto.
- * file.c (rb_file_s_truncate): use correct type. chsize takes
- a long.
+ * vm_eval.c (vm_call0_body): ditto.
-Sun May 12 17:18:46 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+Wed Jun 3 19:24:12 2015 Koichi Sasada <ko1@atdot.net>
- * process.c: move '#define HAVE_SPAWNV 1' to win32/Makefile.sub.
- * win32/Makefile.sub: see above.
+ * vm_core.h: rename enum missing_reason to enum method_missing_reason.
-Sun May 12 17:13:32 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * vm_core.h: use enum method_missing_reason for
+ rb_thread_t::method_missing_reason.
- * configure.in: removes AC_CHECK_FUNCS(setitimer) because it's
- unused.
+ * vm_eval.c: catch up this fix.
-Sun May 12 17:08:16 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * vm_insnhelper.c: ditto.
- * configure.in: removes AC_CHECK_FUNCS(pause) because it's unused.
+Wed Jun 3 16:17:21 2015 Aaron Patterson <tenderlove@ruby-lang.org>
-Sun May 12 17:05:18 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * vm.c: eagerly allocate `loading_table`. This eliminates the need to
+ do NULL checks when looking up the `loading_table` hash.
+ https://github.com/ruby/ruby/pull/918
- * signal.c (rb_f_kill): fixes typo. s/HAS_KILLPG/HAVE_KILLPG/.
+ * load.c: remove various NULL checks
-Sun May 12 17:03:27 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+Wed Jun 3 11:47:15 2015 Koichi Sasada <ko1@atdot.net>
- * configure.in: abort if gettimeofday doesn't exist.
+ * method.h: change fields order to gather frequent access fields.
-Sun May 12 16:31:27 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * vm_insnhelper.c (vm_call_method): add LIKELY().
- * configure.in: adds RUBY_REPLACE_TYPE(off_t) for creating
- NUM2OFFT.
- * file.c (rb_file_truncate): use correct type. chsize() take
- a long.
- * include/ruby/ruby.h (NUM2OFFT): use a definition created by
- a configure script by default.
+Wed Jun 03 10:35:45 2015 Koichi Sasada <ko1@atdot.net>
-Sun May 12 16:03:41 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * method.h: split rb_method_definition_t::flag to several flags.
- * configure.in: removes AC_CHECK_FUNC(fseeko, fseeko64, ftello,
- ftello64). They are not used from anywhere.
+ `flag' contains several categories of attributes and it makes us
+ confusion (at least, I had confused).
- * win32/win32.c (fseeko): removes.
- * win32/win32.c (rb_w32_ftello): removes.
- * include/ruby/win32.h: removes declarations of rb_w32_ftello and
- rb_w32_fseeko.
- * win32/Makefile.sub: removes '#define HAVE_FTELLO 1'.
+ * rb_method_visibility_t (flags::visi)
+ * NOEX_UNDEF -> METHOD_VISI_UNDEF = 0
+ * NOEX_PUBLIC -> METHOD_VISI_PUBLIC = 1
+ * NOEX_PRIVATE -> METHOD_VISI_PRIVATE = 2
+ * NOEX_PROTECTED -> METHOD_VISI_PROTECTED = 3
+ * NOEX_SAFE(flag) -> safe (flags::safe, 3 bits)
+ * NOEX_BASIC -> basic (flags::basic, 1 bit)
+ * NOEX_MODFUNC -> rb_scope_visibility_t in CREF
+ * NOEX_SUPER -> MISSING_SUPER (enum missing_reason)
+ * NOEX_VCALL -> MISSING_VCALL (enum missing_reason)
+ * NOEX_RESPONDS -> BOUND_RESPONDS (macro)
-Sun May 12 15:51:47 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ Now, NOEX_NOREDEF is not supported (I'm not sure it is needed).
- * configure.in: remove AC_CHECK_FUNC(close). It is not used from
- anywhere.
+ Background:
+ I did not know what "NOEX" stands for.
+ I asked Matz (who made this name) and his answer was "Nothing".
+ "At first, it meant NO EXport (private), but the original
+ meaning was gone."
+ This is why I remove the mysterious word "NOEX" from MRI.
-Sun May 12 15:50:45 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * vm_core.h: introduce `enum missing_reason' to represent
+ method_missing (NoMethodError) reason.
- * configure.in: adds comments for setjmp check.
+ * eval_intern.h: introduce rb_scope_visibility_t to represent
+ scope visibility.
+ It has 3 method visibilities (public/private/protected)
+ and `module_function`.
-Sun May 12 15:38:09 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+Wed Jun 3 08:06:30 2015 NAKAMURA Usaku <usa@ruby-lang.org>
- * configure.in: move clock_gettime() check into regular place.
+ * gem/bundled_gems: updated to test-unit 3.1.1 and minitest 5.7.0.
-Wed May 8 13:45:53 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+Wed Jun 3 04:48:05 2015 Koichi Sasada <ko1@atdot.net>
- * configure.in: add getenv() declaration check.
- * dln_find.c: add HAVE_DECL_GETENV test.
+ * vm_insnhelper.c (vm_defined): check respond_to_missing?
+ at defined?(func()).
+ [Bug #11212]
-Sun May 12 15:33:18 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * test/ruby/test_defined.rb: add a test for this fix.
- * configure.in: sorts AC_CHECK_FUNCS()s as alphabetical order.
+Wed Jun 3 04:34:39 2015 Koichi Sasada <ko1@atdot.net>
-Wed May 8 13:41:57 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * vm_insnhelper.c (vm_defined): skip respond_to_missing? when
+ a method is available.
+ [Bug #11211]
- * bignum.c: remove redundant decl for big_lshift() big_rshift().
+ * test/ruby/test_defined.rb: add a test for this fix.
-Sun May 12 16:06:43 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Wed Jun 3 04:14:13 2015 Koichi Sasada <ko1@atdot.net>
- * ext/socket/rubysocket.h (rsock_inspect_sockaddr): as r40646
- check HAVE_TYPE_STRUCT_SOCKADDR_DL.
+ * insns.def (defined), vm_insnhelper.c (vm_defined):
+ move instruction body to the vm_defined() function.
-Sat May 11 23:01:58 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Wed Jun 3 02:29:25 2015 Benoit Daloze <eregontp@gmail.com>
- * ext/socket/rubysocket.h (HAVE_TYPE_STRUCT_SOCKADDR_DL):
- MSVC has struct sockaddr_dl, but its content is broken.
- http://ruby-mswin.cloudapp.net/vc10-x64/ruby-trunk/log/20130511T103938Z.log.html.gz
+ * test/ruby/test_module.rb: Do not assume class variable order.
+ Patch by @enebo.
-Sat May 11 22:07:42 2013 Tanaka Akira <akr@fsij.org>
+Wed Jun 3 01:10:38 2015 Yusuke Endoh <mame@tsg.ne.jp>
- * test/rinda/test_rinda.rb: Socket.getifaddrs may returns an interface
- which #addr method returns nil for venet0 in OpenVZ.
+ * vm_method.c (rb_method_definition_set): remove a double assignment.
+ Coverity Scan found this bug.
-Sat May 11 21:56:34 2013 Tanaka Akira <akr@fsij.org>
+Wed Jun 3 00:04:51 2015 Koichi Sasada <ko1@atdot.net>
- * ext/socket/raddrinfo.c (rsock_inspect_sockaddr): Add casts to
- suppress warnings.
+ * vm_method.c (rb_alias): rename parameter names.
-Sat May 11 17:28:51 2013 Tanaka Akira <akr@fsij.org>
+Tue Jun 2 23:27:18 2015 Koichi Sasada <ko1@atdot.net>
- * ext/socket: New method, Socket.getifaddrs, implemented.
- [ruby-core:54777] [Feature #8368]
+ * method.h: remove rb_method_iseq_t::iseqval.
+ While making a r50728, iseqval is needed (to mark correctly),
+ but now just iseqptr is enough.
-Sat May 11 00:47:22 2013 Tanaka Akira <akr@fsij.org>
+ * class.c: catch up this fix.
- * gc.h (SET_MACHINE_STACK_END): Add !defined(_ILP32) to a defining
- condition to avoid compilation error on x32.
- https://sites.google.com/site/x32abi/
+ * gc.c: ditto.
-Fri May 10 23:56:34 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * proc.c: ditto.
- * parse.y (parser_peek_variable_name): treat invalid global, class,
- and instance variable names as mere strings rather than errors.
- [ruby-core:54885] [Bug #8375]
+ * vm_method.c: ditto.
-Fri May 10 20:22:40 2013 Tanaka Akira <akr@fsij.org>
+Tue Jun 2 21:29:28 2015 Koichi Sasada <ko1@atdot.net>
- * configure.in: Move library checks into "Checks for libraries." part.
+ * proc.c (proc_curry): remove a debug line.
-Fri May 10 19:32:01 2013 Tanaka Akira <akr@fsij.org>
+Tue Jun 2 12:43:46 2015 Koichi Sasada <ko1@atdot.net>
- * configure.in: Reformat arguments of AC_CHECK_HEADERS and
- AC_CHECK_FUNCS to track modifications easily.
+ * method.h: make rb_method_entry_t a VALUE.
+ Motivation and new data structure are described in [Bug #11203].
-Fri May 10 12:01:36 2013 Tanaka Akira <akr@fsij.org>
+ This patch also solve the following issues.
- * configure.in: Don't link librt if clock_gettime is available in
- the main C library.
- glibc 2.17 moves clock_* from librt to the main C library.
- http://sourceware.org/ml/libc-announce/2012/msg00001.html
+ * [Bug #11200] Memory leak of method entries
+ * [Bug #11046] __callee__ returns incorrect method name in orphan
+ proc
-Thu May 9 22:00:35 2013 Tanaka Akira <akr@fsij.org>
+ * test/ruby/test_method.rb: add a test for [Bug #11046].
- * ext/socket/ancdata.c (bsock_sendmsg_internal): controls_num should
- not be negative.
+ * vm_core.h: remove rb_control_frame_t::me. me is located at value
+ stack.
-Thu May 9 21:09:57 2013 Tanaka Akira <akr@fsij.org>
+ * vm_core.h, gc.c, vm_method.c: remove unlinked_method... codes
+ because method entries are simple VALUEs.
- * file.c, ext/etc/etc.c, ext/socket/unixsocket.c,
- ext/openssl/ossl.h, ext/openssl/openssl_missing.c: Use
- HAVE_AGGREGATE_MEMBER instead of HAVE_ST_MEMBER.
+ * method.h: Now, all method entries has own independent method
+ definitions. Strictly speaking, this change is not essential,
+ but for future changes.
-Thu May 9 20:43:41 2013 Tanaka Akira <akr@fsij.org>
+ * rb_method_entry_t::flag is move to rb_method_definition_t::flag.
+ * rb_method_definition_t::alias_count is now
+ rb_method_definition_t::alias_count_ptr, a pointer to the counter.
- * ext/socket/ancdata.c (bsock_sendmsg_internal): Always set
- controls_num to raise NotImplementedError appropriately.
- (bsock_recvmsg_internal): Raise NotImplementedError if
- :scm_rights=>true is given on platforms which don't have
- 4.4BSD style control message.
+ * vm_core.h, vm_insnhelper.c (rb_vm_frame_method_entry) added to
+ search the current method entry from value stack.
-Thu May 9 12:06:07 2013 Tanaka Akira <akr@fsij.org>
+ * vm_insnhelper.c (VM_CHECK_MODE): introduced to enable/disable
+ assertions.
- * ext/socket/rubysocket.h, ext/socket/unixsocket.c,
- ext/socket/ancdata.c: Use HAVE_STRUCT_MSGHDR_MSG_CONTROL instead
- of HAVE_ST_MSG_CONTROL.
+Tue Jun 2 10:46:36 2015 Eric Wong <e@80x24.org>
-Thu May 9 11:30:02 2013 Zachary Scott <zachary@zacharyscott.net>
+ * test/socket/test_nonblock.rb: new test for sendmsg_nonblock
- * string.c: Add call-seq alias for String#=== [Bug #8381]
+Tue Jun 2 09:04:14 2015 Eric Wong <e@80x24.org>
-Thu May 9 11:14:18 2013 Zachary Scott <zachary@zacharyscott.net>
+ * lib/benchmark.rb: just use Process::CLOCK_MONOTONIC
+ [ruby-core:69390]
- * doc/contributing.rdoc: Add guide for contributing to CRuby
+Mon Jun 1 22:01:27 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu May 9 04:55:49 2013 Tanaka Akira <akr@fsij.org>
+ * lib/mkmf.rb (pkg_config): split --libs if --libs-only-l option
+ is not available. patch in [ruby-core:69428] by Hans Mackowiak.
+ [ruby-core:69421] [Bug #11201]
- * configure.in: Check socket library again. shutdown() is used in
- io.c.
+Mon Jun 1 21:18:24 2015 Koichi Sasada <ko1@atdot.net>
-Thu May 9 01:52:31 2013 Tanaka Akira <akr@fsij.org>
+ * gc.c (gc_mark_children): remove a garbage character
+ introduced at the last commit.
- * configure.in: Don't check socketpair. socketpair is not used in
- ruby command itself.
+Mon Jun 1 19:24:42 2015 Koichi Sasada <ko1@atdot.net>
-Thu May 9 01:05:41 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm_method.c (rb_method_entry_make): do not show warning message
+ when method_entry is an alias.
- * class.c (rb_mod_included_modules): should not include non-modules.
- [ruby-core:53158] [Bug #8025]
+Mon Jun 1 15:47:16 2015 Koichi Sasada <ko1@atdot.net>
-Wed May 8 22:46:59 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * internal.h: move class related definitions.
- * class.c (rb_mod_included_modules): should not include the original
- module itself. [ruby-core:53158] [Bug #8025]
+Mon Jun 1 15:43:03 2015 Koichi Sasada <ko1@atdot.net>
-Wed May 8 17:43:55 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * class.c: remove needless include pragma for method.h.
- * io.c (rb_io_ext_int_to_encs): ignore internal encoding if external
- encoding is ASCII-8BIT. [Bug #8342]
+ * struct.c: ditto.
-Wed May 8 13:49:38 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * vm_method.c: ditto.
- * ext/json/generator/generator.c (isArrayOrObject): cast char to
- unsigned char. [Bug #8378]
+Mon Jun 1 05:42:00 2015 Koichi Sasada <ko1@atdot.net>
-Wed May 8 13:46:10 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * eval_intern.h, vm_method.c: move macros to functions.
+ * SCOPE_TEST(f) -> rb_frame_visibility_test(flag).
+ * SCOPE_CHECK(f) -> rb_frame_visibility_check(flag).
+ * SCOPE_SET(f) -> rb_frame_visibility_set(flag).
- * ext/json/generator/depend: fix dependencies [Bug #8379]
+ * load.c (load_ext): use it.
- * ext/json/parser/depend: ditto.
+Mon Jun 1 04:47:37 2015 Zachary Scott <e@zzak.io>
-Wed May 8 13:07:17 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/date/date_core.c: [DOC] Add comparison of Time and DateTime
+ Patch provided by @pixeltrix
- * parse.y (parser_yylex): fail if $, @, @@ are not followed by a valid
- name character. [ruby-core:54846] [Bug #8375].
+Mon Jun 1 04:22:09 2015 Koichi Sasada <ko1@atdot.net>
-Wed May 8 13:06:31 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm_core.h (VM_FRAME_MAGIC_DUMMY): introduce new frame type to
+ recognize dummy frame.
- * include/ruby/ruby.h (ISGRAPH): add missing macro.
+ * vm.c (th_init): use new frame type.
-Wed May 8 06:42:56 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * vm_args.c (raise_argument_error): ditto.
- * ext/socket/socket.c (socket_s_ip_address_list): fix wrongly filled
- sin6_scope_id on KAME introduced by r40593 for OpenIndiana.
- KAME uses fe80:<scope_id>::<interface id> for link-local address
- internally.
- Setting sin6_scope_id causes it leaked.
- see also comments of sockaddr_obj().
+Mon Jun 1 04:15:42 2015 Koichi Sasada <ko1@atdot.net>
-Tue May 7 22:12:34 2013 Tanaka Akira <akr@fsij.org>
+ * class.c (rb_class_has_methods): added to reduce dependency
+ to internal class data structure.
- * ext/readline/readline.c (insert_ignore_escape): Add a cast to
- unsigned char * before dereference.
- This suppress a warning on Cygwin.
+ * internal.h: ditto.
-Tue May 7 12:15:24 2013 Tanaka Akira <akr@fsij.org>
+ * hash.c (has_extra_methods): use added function.
- * ext/socket/ancdata.c (bsock_recvmsg_internal): Add a cast to
- suppress warning.
- Bionic defines socklen_t as int.
- Bionic defines msg_controllen as unsigned int (__kernel_size_t)
- instead of socklen_t as POSIX.
+Mon Jun 1 04:11:48 2015 Koichi Sasada <ko1@atdot.net>
-Tue May 7 12:12:42 2013 Tanaka Akira <akr@fsij.org>
+ * gc.c , gc.h (rb_obj_info): export obj_info(VALUE) for debugging.
- * ext/socket/ancdata.c (ancillary_inspect): Don't call
- anc_inspect_ipv6_pktinfo if !HAVE_TYPE_STRUCT_IN6_PKTINFO.
- anc_inspect_ipv6_pktinfo is not defined in the case.
+Mon Jun 1 03:52:55 2015 Koichi Sasada <ko1@atdot.net>
-Tue May 7 12:10:52 2013 Tanaka Akira <akr@fsij.org>
+ * test/ruby/test_gc.rb: increase timeout seconds for GC stressful
+ debugging.
- * ext/socket/socket.c (socket_s_ip_address_list): Cast EXTRA_SPACE as
- int. This suppress a warning.
+Sun May 31 04:18:06 2015 Koichi Sasada <ko1@atdot.net>
-Tue May 7 12:09:29 2013 Tanaka Akira <akr@fsij.org>
+ * method.h: fix typo of comments.
- * ext/socket/extconf.rb: Set close_fds false for Cygwin.
- Cygwin doesn't support fd passing.
- This enables socket extension library cross-compilable by default.
+Sun May 31 03:36:42 2015 Koichi Sasada <ko1@atdot.net>
-Tue May 7 12:07:35 2013 Tanaka Akira <akr@fsij.org>
+ * method.h: add VM_METHOD_TYPE_ALIAS rb_method_definition_t::type
+ to fix [Bug #11173].
- * pack.c (swap32): Don't redefine it if it is already defined.
- Bionic defines it.
- (swap64): Ditto.
+ Now, inter class/method alias creates new method entry
+ VM_METHOD_TYPE_ALIAS, which has an original method entry.
-Mon May 6 20:50:37 2013 Tanaka Akira <akr@fsij.org>
+ * vm_insnhelper.c (find_defined_class_by_owner): added.
+ Search corresponding defined_class from owner class/module.
- * ext/socket/socket.c (socket_s_ip_address_list): Fill sin6_scope_id
- if getifaddrs() returns an IPv6 link local address which
- sin6_scope_id is zero, such as on OpenIndiana SunOS 5.11.
+ * vm_method.c (rb_method_entry_get_without_cache): return me->klass
+ directly for defined_class.
-Sun May 5 18:56:52 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ Now, no need to check me->klass any more.
- * insns.def (defined): use vm_search_superclass() like as normal super
- call. based on a patch <https://gist.github.com/wanabe/5520026> by
- wanabe.
+ * vm_method.c (method_entry_set0): separated from method_entry_set().
- * vm_insnhelper.c (vm_search_superclass): return error but not raise
- exceptions.
+ * vm_method.c (rb_alias): make method entry has VM_METHOD_TYPE_ALIAS.
- * vm_insnhelper.c (vm_search_super_method): check the result of
- vm_search_superclass and raise exceptions on error.
+ * vm_method.c (release_method_definition): support VM_METHOD_TYPE_ALIAS.
-Sun May 5 16:29:41 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm_method.c (rb_hash_method_definition): ditto.
- * insns.def (defined): get method entry from the method top level
- frame, not block frame. [ruby-core:54769] [Bug #8367]
+ * vm_method.c (rb_method_definition_eq): ditto.
-Sun May 5 13:28:54 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm_method.c (release_method_definition): ditto.
- * template/ruby.pc.in (Cflags): use rubyarchhdrdir for multiarch.
- [Bug #7874]
+ * vm_insnhelper.c (vm_call_method): ditto.
-Sat May 4 07:20:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * vm_insnhelper.c (vm_method_cfunc_entry): ditto.
- * doc/security.rdoc: Add note about reporting security vulns
+ * vm_eval.c (vm_call0_body): ditto.
-Sat May 4 04:13:27 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * gc.c (mark_method_entry): ditto.
- * include/ruby/defines.h (RUBY_ATTR_ALLOC_SIZE): New for
- attribute((alloc_size(params))).
+ * proc.c (method_def_iseq): ditto.
- * include/ruby/defines.h (xmalloc, xmalloc2, xcalloc)
- (xrealloc, xrealloc2): Annotated by RUBY_ATTR_ALLOC_SIZE.
- * include/ruby/ruby.h (rb_alloc_tmp_buffer): ditto.
+ * proc.c (method_cref): ditto.
-Fri May 3 19:32:13 2013 Takeyuki FUJIOKA <xibbar@ruby-lang.org>
+ * proc.c (rb_method_entry_min_max_arity): ditto.
- * lib/cgi/util.rb: All class methods modulized.
- We can use these methods like a function when "include CGI::Util".
- [Feature #8354]
+ * test/ruby/test_alias.rb: add tests.
-Fri May 3 14:09:45 2013 Tanaka Akira <akr@fsij.org>
+ * test/ruby/test_module.rb: fix a test to catch up current behavior.
- * ext/socket/extconf.rb: Make default_ipv6 true for Cygwin.
- Cygwin supports IPv6 since Cygwin 1.7.1 (2009-12).
- http://cygwin.com/ml/cygwin-announce/2009-12/msg00027.html
+Sun May 31 03:34:25 2015 Koichi Sasada <ko1@atdot.net>
-Fri May 3 13:35:26 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm_method.c (rb_unlink_method_entry): make it static.
- * ext/socket/{getaddrinfo,getnameinfo}.c: define socklen_t if not
- defined, e.g., older VC.
+Sun May 31 03:26:58 2015 Koichi Sasada <ko1@atdot.net>
-Fri May 3 13:29:11 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * method.h, vm_method.c (rb_free_method_entry): constify a parameter.
- * include/ruby/win32.h (INTPTR_MAX, INTPTR_MIN, UINTPTR_MAX): also
- should be defined when defining intptr_t and uintptr_t.
- bigdecimal.c requires the former two now.
+ * vm_core.h: remove useless declaration about rb_unlink_method_entry().
-Fri May 3 13:22:12 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat May 30 18:05:02 2015 NAKAMURA Usaku <usa@ruby-lang.org>
- * win32/win32.c (poll_child_status): fix build error on older mingw.
+ * lib/tempfile.rb (Remover#call): fixed wrong condition. introduced at
+ r50682.
-Fri May 3 00:15:58 2013 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
+Sat May 30 16:12:35 2015 Eric Wong <e@80x24.org>
- * common.mk: remove timestamps in distclean-ext realclean-ext.
+ * ext/socket/ancdata.c: use RB_GC_GUARD instead of volatile
+ [ruby-core:69419] [Feature #11198]
-Thu May 2 23:23:49 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat May 30 15:59:10 2015 NAKAMURA Usaku <usa@ruby-lang.org>
- * object.c (rb_obj_is_kind_of): skip prepending modules.
- [ruby-core:54742] [Bug #8357]
+ * lib/tempfile.rb (Tempfile#initialize): initialize @unlinked to fix
+ test failures introduced at r50682. I hope that check the results of
+ tests before committing, at least the tests about the changed feature.
- * object.c (rb_class_inherited_p): ditto.
- [ruby-core:54736] [Bug #8357]
+Sat May 30 11:02:55 2015 Martin Englund <martin@englund.nu>
-Thu May 2 22:11:47 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * doc/dtrace_probes.rdoc: change lingering dtrace probe documentation
+ from function- to method-
- * bin/irb: remove dead code from sample/irb.rb.
+Sat May 30 10:26:09 2015 Masaki Matsushita <glass.saga@gmail.com>
-Thu May 2 17:32:45 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * lib/tempfile.rb: refactoring.
+ * use warn instead of STDERR.print
+ * remove @tmpname and use @tmpfile.path
+ * introduce @unlinked flag
+ * Remover takes only @tmpfile
+ * mode will be modified just before file reopen
- * marshal.c (copy_ivar_i): get rid of overwriting already copied
- instance variables. c.f. [Bug #8276]
+Sat May 30 09:02:51 2015 Eric Wong <e@80x24.org>
-Thu May 2 16:55:43 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * include/ruby/intern.h (rb_generic_ivar_table): deprecate
+ * internal.h (rb_attr_delete): declare
+ * marshal.c (has_ivars): use rb_ivar_foreach
+ (w_ivar): ditto
+ (w_object): update for new interface
+ * time.c (time_mload): use rb_attr_delete
+ * variable.c (generic_ivar_delete): implement
+ (rb_ivar_delete): ditto
+ (rb_attr_delete): ditto
+ [ruby-core:69323] [Feature #11170]
- * thread.c (id_locals): use cached ID.
+Sat May 30 09:14:28 2015 Scott Francis <scott.francis@shopify.com>
- * vm.c (ruby_thread_init): ditto.
+ * cont.c (cont_free): check if ruby_current_thread is still valid.
+ [Fix GH-914]
- * defs/id.def: add more predefined IDs used in core.
+Sat May 30 08:36:04 2015 Eric Wong <e@80x24.org>
-Thu May 2 13:42:42 2013 Ryan Davis <ryand-ruby@zenspider.com>
+ * variable.c (static int special_generic_ivar): move
+ (rb_generic_ivar_table): rewrite for compatibility
+ (gen_ivtbl_bytes): new function
+ (generic_ivar_get): update to use ivar index
+ (generic_ivar_update): ditto
+ (generic_ivar_set): ditto
+ (generic_ivar_defined): ditto
+ (generic_ivar_remove): ditto
+ (rb_mark_generic_ivar): ditto
+ (givar_i): ditto
+ (rb_free_generic_ivar): ditto
+ (rb_mark_generic_ivar_tbl): ditto
+ (rb_generic_ivar_memsize): ditto
+ (rb_copy_generic_ivar): ditto
+ (rb_ivar_set): ditto
+ (rb_ivar_foreach): ditto
+ (rb_ivar_count): ditto
+ (givar_mark_i): remove
+ (gen_ivtbl_mark): new function
+ (gen_ivar_each): ditto
+ (iv_index_tbl_extend): update for struct ivar_update
+ (iv_index_tbl_newsize): ditto
+ [ruby-core:69323] [Feature #11170]
- * lib/minitest/*: Imported minitest 4.7.4 (r8483)
- * test/minitest/*: ditto
+Sat May 30 08:10:46 2015 Eric Wong <e@80x24.org>
-Thu May 2 11:32:22 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * variable.c (iv_index_tbl_make): extract from rb_ivar_set
+ (iv_index_tbl_extend): ditto
+ (iv_index_tbl_newsize): ditto
+ (rb_ivar_set): use extracted functions
+ [ruby-core:69323] (Part 1)
- * win32/win32.c (poll_child_status): [experimental] set the cause of
- a child's death to status if its exitcode seems to be an error.
+Fri May 29 17:39:14 2015 Koichi Sasada <ko1@atdot.net>
- * test/ruby/test_process.rb (TestProcess#test_no_curdir): maybe now
- we can test it.
+ * tool/make_hgraph.rb: added.
- * test/ruby/test_thread.rb (TestThread#test_thread_timer_and_interrupt):
- ditto.
+Fri May 29 14:39:00 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu May 2 11:24:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * compile.c (iseq_compile_each): out of range NTH_REF is always
+ nil.
- * lib/yaml.rb: nodoc EngineManager, add History doc #8344
+ * parse.y (parse_numvar): check overflow of NTH_REF and range.
+ [ruby-core:69393] [Bug #11192]
-Wed May 1 21:11:17 2013 Tanaka Akira <akr@fsij.org>
+ * util.c (ruby_scan_digits): make public and add length parameter.
- * time.c (localtime_with_gmtoff_zone): musl libc may return NULL for
- tm_zone.
+Fri May 29 11:18:58 2015 Eric Wong <e@80x24.org>
-Wed May 1 18:59:36 2013 Benoit Daloze <eregontp@gmail.com>
+ * ext/socket/ancdata.c (bsock_sendmsg_internal,
+ bsock_recvmsg_internal):
+ avoid redundant fcntl on Linux
+ [ruby-core:69154] [Feature #11145]
+ * ext/socket/init.c (rsock_s_recvfrom_nonblock): ditto
+ * ext/socket/rubysocket.h (MSG_DONTWAIT_RELIABLE): new macro
- * enum.c (Enumerable#chunk): fix grammar of error message
- for symbols beginning with an underscore [Bug #8351]
+Fri May 29 10:30:34 2015 Eric Wong <e@80x24.org>
-Wed May 1 16:47:47 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * lib/net/resolv.rb (request): use monotonic clock
+ * lib/net/http.rb (begin_transport, end_transport): ditto
+ [ruby-core:69384] [Feature #11124]
- * ext/curses/extconf.rb (curses_version): try once for each tests, a
- function or a variable. fallback to variable for old SVR4.
+Fri May 29 04:37:38 2015 Koichi Sasada <ko1@atdot.net>
-Wed May 1 16:17:46 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/objspace/objspace.c: add two methods to debug internals.
- * ext/extmk.rb (extmake): extensions not to be installed should not
- make static libraries, but make dynamic libraries always.
+ * ObjectSpace.internal_class_of: return RBASIC_CLASS(obj).
+ * ObjectSpace.internal_super_of: return RCLASS_SUPER(cls).
-Wed May 1 12:20:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * NEWS: add information about both methods.
- * lib/rake/version.rb: Fix RDoc warning with :include: [Bug #8347]
+ * test/objspace/test_objspace.rb: add tests for both methods.
-Wed May 1 11:40:25 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu May 28 06:55:53 2015 Anton Davydov <antondavydov.o@gmail.com>
- * defs/id.def (predefined): add "idProc".
+ * ext/tk/sample/figmemo_sample.rb (open_file),
+ ext/tk/sample/tktextio.rb (TkTextIO): fix typo in messages.
+ [Fix GH-916]
- * eval.c (frame_func_id): use predefined IDs.
+Wed May 27 09:50:51 2015 Eric Wong <e@80x24.org>
- * proc.c (mnew, mproc, mlambda): use predefined IDs.
+ * ext/openssl/ossl_asn1.c (ossl_asn1_traverse, ossl_asn1_decode,
+ ossl_asn1_decode_all): use RB_GC_GUARD instead of volatile
+ [ruby-core:69371] [Bug #11185]
- * vm.c (rb_vm_control_frame_id_and_class): ditto.
+Wed May 27 09:27:30 2015 Eric Wong <e@80x24.org>
- * vm.c (Init_VM): ditto.
+ * lib/drb/drb.rb (set_sockopt): remove redundant fcntl call
+ * lib/drb/unix.rb (set_sockopt): ditto
+ [ruby-core:69128] [Feature #11137]
-Tue Apr 30 23:18:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Tue May 26 22:10:43 2015 Shugo Maeda <shugo@ruby-lang.org>
- * lib/benchmark.rb: Update Benchmark results on newer CPU
+ * vm_method.c (rb_alias): should resolve refined methods.
+ [ruby-core:69360] [Bug #11182]
-Tue Apr 30 12:31:40 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue May 26 21:35:13 2015 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
- * proc.c (mproc, mlambda): use frozen core methods instead of plain
- global methods, so that methods cannot be overridden.
- [ruby-core:54687] [Bug #8345]
+ * include/ruby/defines.h (RUBY_ATTR_ALLOC_SIZE): fix condition.
- * vm.c (Init_VM): define proc and lambda on the frozen core object.
+Mon May 25 22:35:58 2015 NAKAMURA Usaku <usa@ruby-lang.org>
- * include/ruby/intern.h (rb_block_lambda): add declaration instead of
- deprecated rb_f_lambda.
+ * tool/redmine-backporter.rb (rel): after the relations is changed,
+ @changesets is no longer right.
-Mon Apr 29 17:02:30 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Mon May 25 11:27:14 2015 NARUSE, Yui <naruse@ruby-lang.org>
- * ext/nkf/nkf-utf8/nkf.h: Bionic libc doesn't have locale.
- [Feature #8338]
+ * win32/win32.c (setup_overlapped): seek to the file end only when
+ writing (mode:a), not reading (mode:a+, read).
+Mon May 25 00:27:37 2015 Benoit Daloze <eregontp@gmail.com>
-Mon Apr 29 06:58:30 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * numeric.c (Numeric#negative?): [DOC] Fix call-seq.
+ Patch by @yui-knk. [Fixes GH-908]
- * ext/openssl/ossl_bn.c (ossl_bn_initialize): no need of alloca for
- small fixed size array.
+Sun May 24 01:35:22 2015 Koichi Sasada <ko1@atdot.net>
- * ext/openssl/ossl_bn.c (ossl_bn_initialize): check overflow first,
- and use alloca for small size input.
+ * debug.c (ruby_debug_print_id): use rb_id2name() for fprintf().
-Mon Apr 29 00:40:13 2013 Benoit Daloze <eregontp@gmail.com>
+Sat May 23 18:38:46 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/yaml.rb: Clarify documentation about YAML being always Psych.
- Give a tip about using Syck. See #8344.
+ * man/*.1: updated dates in man pages.
+ [ruby-dev:48988] [Bug #11171]
-Sun Apr 28 23:34:01 2013 Benoit Daloze <eregontp@gmail.com>
+Sat May 23 03:10:58 2015 NAKAMURA Usaku <usa@ruby-lang.org>
- * lib/yaml.rb: Use another trick to define the YAML module.
- https://twitter.com/n0kada/status/328342207511801856
+ * win32/win32.c (rb_w32_write_console): should return the count of
+ actually eaten characters, include escape sequences.
-Sun Apr 28 23:19:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Fri May 22 22:36:14 2015 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
- * lib/pp.rb: Update PP module overview by @geopet
+ * lib/prime.rb: Remove obsolete Prime.new
+ patch by Ajay Kumar. [Fixes GH-891]
-Sun Apr 28 22:04:37 2013 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+Fri May 22 21:13:12 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/openssl/ossl_bn.c (ossl_bn_initialize): fix buffer overflow on
- x64 Windows and memory leak when initializing with integer.
- [ruby-core:54615] [Bug #8337]
+ * include/ruby/intern.h (rb_sym_count): move `rb_sym_all_symbols`
+ to a symbol.c specific section. a part of patch by Lourens
+ Naude.
-Sun Apr 28 12:38:04 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri May 22 20:56:33 2015 NAKAMURA Usaku <usa@ruby-lang.org>
- * README.EXT: correct method name to be used. [Bug #7982]
+ * complex.c (f_complex_polar): simple bug reproduced only when y is
+ a float but x is not a float.
- * README.EXT.ja: add notes too.
+Fri May 22 19:42:06 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun Apr 28 10:35:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * process.c (rb_spawn_process): do not discard global escape
+ status. [ruby-core:69304] [Bug #11166]
- * object.c: With feedback from Steve Klabnik, reverted a change to
- #untrusted? and #tainted?. Also adjusted grammar for $SAFE levels
+ * process.c (rb_execarg_spawn): extract the start procedure in a
+ parent process with ensuring the end procedure.
-Sun Apr 28 10:10:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Fri May 22 16:48:32 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * lib/yaml.rb: Disable setting YAML const twice [ruby-core:54642]
+ * NEWS: added news for net-telnet and rake
-Sun Apr 28 09:50:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Thu May 21 20:27:07 2015 NARUSE, Yui <naruse@ruby-lang.org>
- * object.c: Documentation for taint and trust [Bug #8162]
+ * configure.in (RUBY_DTRACE_POSTPROCESS): cmp -b is GNU extension.
+ darwin uses GNU cmp, and FreeBSD and Solaris are not.
+ Note that accidentally equals to expected result.
-Sun Apr 28 09:40:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Thu May 21 18:00:19 2015 Koichi Sasada <ko1@atdot.net>
- * README.EXT: Copy note from r40505 for rb_sprintf() [Bug #7982]
+ * iseq.c: constify.
-Sun Apr 28 08:28:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * iseq.h: ditto.
- * ext/curses/curses.c: Update Curses::Window example for nicer output
- Patch by Michal Suchanek [Bug #8121] [ruby-core:53520]
+ * method.h: ditto.
-Sun Apr 28 08:10:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * proc.c: ditto.
- * README.EXT: Update note from r40504, by Jeremy Evans [Bug #7982]
+ * vm_method.c: ditto.
-Sun Apr 28 08:02:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Thu May 21 17:44:53 2015 Koichi Sasada <ko1@atdot.net>
- * README.EXT: Add note to warn use of %i in Exceptions [Bug #7982]
+ * proc.c: fix issues caused by binding created from Method#to_proc.
+ [Bug #11163]
-Sun Apr 28 02:41:05 2013 Tanaka Akira <akr@fsij.org>
+ * vm.c (vm_cref_new_toplevel): export as rb_vm_cref_new_toplevel().
- * configure.in: Fix a typo. Should check endgrent() instead of
- endgrnam().
+ * test/ruby/test_method.rb: add some assertions.
-Sun Apr 28 00:35:45 2013 Tanaka Akira <akr@fsij.org>
+Thu May 21 17:29:26 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * process.c (obj2gid): Don't call endgrent() if not exist.
- Bionic (Android's libc) don't have endgrent().
+ * lib/matrix.rb: added documentation for Matrix#empty and Matrix#/
+ [Feature #10070][ruby-dev:48433] Patch by @gogotanaka
- * configure.in: Check endgrnam function.
+Thu May 21 17:02:43 2015 Koichi Sasada <ko1@atdot.net>
-Sat Apr 27 23:53:00 2013 Charlie Somerville <charlie@charliesomerville.com>
+ * proc.c: rename functions.
+ * method_get_def() -> method_def()
+ * method_get_iseq() -> method_def_iseq()
+ * method_get_cref() -> method_cref()
- * lib/yaml.rb: add security warning to YAML documentation
+Thu May 21 16:52:44 2015 Koichi Sasada <ko1@atdot.net>
-Sat Apr 27 23:25:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * proc.c (rb_method_get_iseq): rename to rb_method_iseq.
- * lib/yaml.rb: Documentation for YAML module [Bug #8213]
+ * iseq.c: catch up this fix.
-Sat Apr 27 20:19:21 2013 Tanaka Akira <akr@fsij.org>
+ * iseq.h: commit ditto.
- * thread_pthread.c (ruby_init_stack): Add STACK_GROW_DIR_DETECTION.
- This fixes a compilation failure while cross-compiling for Tensilica
- Xtensa Processor.
+Thu May 21 15:41:45 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Sat Apr 27 19:32:44 2013 Benoit Daloze <eregontp@gmail.com>
+ * lib/net/telnet.rb: gemify net-telnet.
+ [Feature #11083]
+ * gems/bundled_gems: added net-telnet to bundled gems.
- * thread.c: fix typos and documentation
+Thu May 21 15:37:32 2015 Zachary Scott <e@zzak.io>
-Sat Apr 27 19:04:55 2013 Tanaka Akira <akr@fsij.org>
+ * vm_method.c: Remove private attribute warning [Bug #10967]
+ Patch by @spastorino [Fixes GH-849]
+ https://github.com/ruby/ruby/pull/849
- * sparc.c: Use __asm__ instead of asm for gcc.
- gcc doesn't provide asm keyword if -ansi option is given.
- http://gcc.gnu.org/onlinedocs/gcc/Alternate-Keywords.html
+ * test/ruby/test_module.rb: Update test for changes
-Sat Apr 27 17:22:50 2013 Tanaka Akira <akr@fsij.org>
+Thu May 21 10:59:43 2015 Koichi Sasada <ko1@atdot.net>
- * ext/socket/extconf.rb: Redundant test removed.
+ * proc.c (method_proc): rename to method_to_proc.
-Sat Apr 27 16:00:10 2013 Tanaka Akira <akr@fsij.org>
+Thu May 21 10:51:54 2015 Jake Worth <jakeworth82@gmail.com>
- * ext/socket/extconf.rb (test_recvmsg_with_msg_peek_creates_fds):
- Extracted.
+ * io.c (rb_f_select): [DOC] Fixes for grammar and style.
+ [Fix GH-906]
-Sat Apr 27 15:50:40 2013 Tanaka Akira <akr@fsij.org>
+Thu May 21 08:25:19 2015 Eric Wong <e@80x24.org>
- * internal.h (SIGNED_INTEGER_TYPE_P): New macro.
- (SIGNED_INTEGER_MAX): Ditto.
- (SIGNED_INTEGER_MIN): Ditto.
- (UNSIGNED_INTEGER_MAX): Ditto.
- (TIMET_MAX): Use SIGNED_INTEGER_MAX and UNSIGNED_INTEGER_MAX.
- (TIMET_MIN): Use SIGNED_INTEGER_MIN.
+ * variable.c (Init_var_tables): init generic_iv_tbl
+ (rb_generic_ivar_table, generic_ivar_get, generic_ivar_set,
+ generic_ivar_defined, generic_ivar_remove,
+ rb_mark_generic_ivar, givar_i, rb_mark_generic_ivar_tbl,
+ rb_free_generic_ivar, rb_copy_generic_ivar, rb_ivar_foreach,
+ rb_ivar_count): remove checks for uninitialize generic_iv_tbl
+ [ruby-core:69155] [Feature #11146]
- * thread.c (TIMEVAL_SEC_MAX): Use SIGNED_INTEGER_MAX.
- (TIMEVAL_SEC_MIN): Use SIGNED_INTEGER_MIN.
+Thu May 21 04:11:03 2015 Koichi Sasada <ko1@atdot.net>
-Sat Apr 27 10:52:52 2013 Tanaka Akira <akr@fsij.org>
+ * iseq.c (exception_type2symbol): show correct bug message.
- * thread.c (TIMEVAL_SEC_MAX, TIMEVAL_SEC_MIN): Consider environments,
- sizeof(time_t) is smaller than sizeof(tv_sec), such as
- OpenBSD 5.2 (amd64).
+Wed May 20 23:19:05 2015 Yusuke Endoh <mame@ruby-lang.org>
-Fri Apr 26 23:34:59 2013 Kouhei Sutou <kou@cozmixng.org>
+ * lib/base64.rb: Fix rdoc-formatting for padding argument.
+ [fix GH-905][ci skip] Patch by @davydovanton
- * lib/rexml/text.rb (REXML::Text.normalize): Fix a bug that all
- entity filters are ignored. [ruby-dev:47278] [Bug #8302]
- Patch by Ippei Obayashi. Thanks!!!
- * test/rexml/test_entity.rb (EntityTester#test_entity_filter): Add
- a test of the above change.
+Wed May 20 13:16:23 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Apr 26 22:53:55 2013 Kouhei Sutou <kou@cozmixng.org>
+ * configure.in (DEPRECATED_BY): deprecate warning with preferable
+ alternative.
- * lib/rexml/element.rb (REXML::Attributes#to_a): Support
- namespaced attributes. [ruby-dev:47277] [Bug #8301]
- Patch by Ippei Obayashi. Thanks!!!
- * test/rexml/test_attributes.rb
- (AttributesTester#test_to_a_with_namespaces): Add a test of the
- above change.
+ * configure.in (RUBY_FUNC_ATTRIBUTE): allow attribute arguments in
+ the macro.
-Fri Apr 26 21:48:29 2013 Kouhei Sutou <kou@cozmixng.org>
+Wed May 20 11:23:24 2015 NARUSE, Yui <naruse@ruby-lang.org>
- * lib/rss/atom.rb (RSS::Atom::Entry): Fix indent of document comment.
+ * vm_dump.c (rb_print_backtrace): return value of libexec's backtrace
+ is size_t, so simply cast as int.
-Fri Apr 26 21:21:17 2013 Kouhei Sutou <kou@cozmixng.org>
+Tue May 19 18:54:41 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/rss/maker.rb (RSS::Maker): Fix indent of document comment.
+ * iseq.c (rb_iseq_compile_with_option): check source type, must be
+ an IO or a String. [ruby-core:69219] [Bug #11159]
-Fri Apr 26 18:41:04 2013 Tanaka Akira <akr@fsij.org>
+Tue May 19 17:15:03 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * ext/socket/extconf.rb: Use a block of enable_config() for
- --{enable,disable}-close-fds-by-recvmsg-with-peek configure option
+ * lib/benchmark.rb: Update Benchmark documentation and formatting.
+ [fix GH-903][ci skip] Patch by @davydovanton
-Fri Apr 26 18:08:08 2013 Tanaka Akira <akr@fsij.org>
+Tue May 19 13:10:08 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * dir.c (dir_set_pos): Fix a compilation error when seekdir() is not
- exist.
+ * numeric.c (num_positive_p): should false on Bignum 0.
+ http://twitter.com/rafaelfranca/status/600509783427391488
+ [ruby-core:69173] [Feature #11151]
-Fri Apr 26 17:41:17 2013 Tanaka Akira <akr@fsij.org>
+Tue May 19 11:22:28 2015 NARUSE, Yui <naruse@ruby-lang.org>
- * thread_pthread.c (ruby_init_stack): Add STACK_GROW_DIR_DETECTION.
- This fixes a compilation failure while cross-compiling for ARM.
+ * lib/uri/rfc2396_parser.rb (initialize_pattern):
+ URI::Generic.build should accept port as a string.
+ pattern[:PORT] is not defined for long.
+ by Dave Slutzkin <daveslutzkin@fastmail.fm>
+ https://github.com/ruby/ruby/pull/804 fix GH-804
-Fri Apr 26 14:35:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Tue May 19 11:18:46 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/rss/atom.rb: Documentation for RSS::Atom based on a patch by
- Michael Denomy
- * lib/rss/maker.rb: Documentation for RSS::Maker also by @mdenomy
+ * include/ruby/ruby.h (rb_data_typed_object_alloc),
+ (rb_data_object_alloc): add old names for source level backward
+ compatibilities.
-Fri Apr 26 12:41:22 2013 Tanaka Akira <akr@fsij.org>
+ * gc.c (rb_data_object_alloc, rb_data_typed_object_alloc): add
+ aliases for binary level backward compatibilities.
- * ext/curses/extconf.rb: Test linkability of curses_version at first.
+Tue May 19 09:54:44 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/socket/extconf.rb: Test the behavior of fd passing with MSG_PEEK
- only if recvmsg(), msg_control member, AF_UNIX and SCM_RIGHTS are
- available.
+ * include/ruby/ruby.h (Data_Make_Struct0): needs function pointer
+ casts to fix function overloading in C++.
-Fri Apr 26 00:07:52 2013 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+Tue May 19 09:43:56 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/rinda/ring.rb (Rinda::RingServer#initialize): accept array
- arguments of address to specify multicast interface.
+ * include/ruby/ruby.h (Data_Make_Struct0, TypedData_Make_Struct0):
+ explicit cast from void* is necessary as implicit cast is
+ disallowed in C++.
- * lib/rinda/ring.rb (Rinda::RingServer#make_socket): add optional
- arguments for multicast interface.
+Mon May 18 15:31:31 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/rinda/test_rinda.rb
- (TestRingFinger#test_ring_server_ipv4_multicast,
- TestRingFinger#test_ring_server_ipv6_multicast): add tests for
- above change.
+ * include/ruby/intern.h (rb_f_notimplement): should not respond to
+ not-implemented methods. as the address inside a DLL and the
+ imported address are different on Windows, use an exported
+ variable to share the same address.
- * test/rinda/test_rinda.rb
- (TestRingServer#test_make_socket_ipv4_multicast,
- TestRingServer#test_make_socket_ipv6_multicast): change bound
- interface address because multicast address is not allowed on Linux
- or Windows.
- [ruby-core:53692] [Bug #8159]
+Mon May 18 13:55:01 2015 Shugo Maeda <shugo@ruby-lang.org>
-Thu Apr 25 23:45:02 2013 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+ * lib/monitor.rb (mon_try_enter, mon_enter): should reset @mon_count
+ just in case the previous owner thread dies without mon_exit.
+ [fix GH-874] Patch by @chrisberkhout
- * lib/rinda/ring.rb (Rinda::RingServer#initialize): add a socket
- to @sockets in make_socket() to close sockets on shutdown even if
- make_socket() is called after initialize.
+Sun May 17 17:21:29 2015 Eric Wong <e@80x24.org>
- * lib/rinda/ring.rb (Rinda::RingServer#make_socket): ditto.
+ * lib/webrick/utils.rb (set_non_blocking): use IO#nonblock=
+ * (set_close_on_exec): use IO#close_on_exec=
+ [Feature #11136]
-Thu Apr 25 23:39:42 2013 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+Sun May 17 15:01:26 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/rinda/test_rinda.rb (TupleSpaceProxyTest#test_take_bug_8215):
- use KILL on Windows since TERM doen't work and ruby process remains
- after test-all on Windows.
+ * numeric.c (num_positive_p, num_negative_p): add methods
+ Numeric#positive? and Numeric#negative?.
+ [ruby-core:69173] [Feature #11151]
-Thu Apr 25 23:16:28 2013 Tanaka Akira <akr@fsij.org>
+ * numeric.c (flo_positive_p, flo_negative_p): specialized
+ functions for Float.
- * ext/curses/extconf.rb: Implement
- --with-curses-version={function,variable} configure option for
- cross-compiling.
+ * complex.c (Init_Complex): Complex do not have positive? and
+ negative? methods
-Thu Apr 25 18:15:46 2013 Tanaka Akira <akr@fsij.org>
+Sun May 17 14:57:42 2015 Eric Wong <e@80x24.org>
- * ext/socket/extconf.rb: Don't use WIDE getaddrinfo by default.
+ * lib/webrick/server.rb (accept_client): avoid redundant fcntl call
+ [Feature #11137]
-Thu Apr 25 17:56:39 2013 Tanaka Akira <akr@fsij.org>
+Sun May 17 12:13:33 2015 Eric Wong <e@80x24.org>
- * ext/socket/extconf.rb: Remove obsolete options: ---with-ipv6-lib and
- --with-ipv6-libdir.
+ * ext/socket/init.c (cloexec_accept): support nonblock flag and
+ use SOCK_NONBLOCK if possible
+ * ext/socket/init.c (rsock_s_accept_nonblock):
+ update cloexec_accept call
+ * ext/socket/init.c (accept_blocking): ditto for blocking
+ * test/socket/test_nonblock.rb: check nonblock? on accepted socket
+ [Feature #11138]
-Thu Apr 25 17:43:49 2013 Tanaka Akira <akr@fsij.org>
+Sun May 17 03:58:59 2015 Aaron Patterson <tenderlove@ruby-lang.org>
- * ext/socket/extconf.rb: Implement
- --{enable,disable}-close-fds-by-recvmsg-with-peek configure option
- for cross-compiling.
- Make --{enable,disable}-wide-getaddrinfo configure option
- cross-compiling friendly.
+ * load.c (loaded_feature_path): stop returning false negatives for
+ filenames which are trailing substrings of file extensions. For
+ example, 'b', which a trailing substring of ".rb" should not return
+ false. [Bug #11155][ruby-core:69206]
-Thu Apr 25 16:11:06 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/ruby/test_autoload.rb: test for fix
- * io.c (rb_io_ext_int_to_encs, parse_mode_enc): bom-prefixed name is
- not a real encoding name, just a fallback. so the proper conversion
- should take place even if if the internal encoding is equal to the
- bom-prefixed name, unless actual encoding is equal to the internal
- encoding. [ruby-core:54563] [Bug #8323]
+Sat May 16 21:41:24 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * io.c (io_set_encoding_by_bom): reset extenal encoding if no BOM
- found. [ruby-core:54569]
+ * string.c: added documentation for character sequence \' with String#sub
+ [Bug #11132][ruby-core:69121][fix GH-900][ci skip] Patch by @shishir127
-Thu Apr 25 14:35:01 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Sat May 16 21:38:05 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * ext/openssl/ossl_bn.c (ossl_bn_initialize): allow Fixnum and Bignum.
- [ruby-core:53986] [Feature #8217]
+ * enum.c: fix a sample code. Patch by @eagletmt
+ [fix GH-901][ci skip]
-Thu Apr 25 14:26:32 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Sat May 16 21:17:11 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/uri/common.rb (URI.decode_www_form): follow current URL Standard.
- It gets encoding argument to specify the character encoding.
- It now allows loose percent encoded strings, but denies ;-separator.
- [ruby-core:53475] [Bug #8103]
+ * gc.c (rb_data_object_wrap, rb_data_typed_object_wrap): rename
+ alloc as wrap. these functions do not allocate data pointers
+ but just wrap the given pointers.
- * lib/uri/common.rb (URI.decode_www_form): follow current URL Standard.
- It gets encoding argument to convert before percent encode.
- Now UTF-16 strings aren't converted to UTF-8 before percent encode
- by default.
+Sat May 16 19:59:24 2015 NAKAMURA Usaku <usa@ruby-lang.org>
-Wed Apr 25 14:26:00 2013 Charlie Somerville <charlie@charliesomerville.com>
+ * win32/win32.c (rb_w32_accept): simplified.
- * benchmark/bm_hash_shift.rb: add benchmark for Hash#shift
+Fri May 15 18:28:20 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * hash.c (rb_hash_shift): use st_shift if hash is not being iterated to
- delete element without iterating the whole hash.
+ * array.c (rb_ary_assoc, rb_ary_rassoc): [DOC] the result when key
+ was found is the existing element, not a new array. reported by
+ Giau Nguyen <giaunv AT nustechnology.com>.
- * hash.c (shift_i): remove function
+Fri May 15 08:24:28 2015 Takeyuki FUJIOKA <xibbar@ruby-lang.org>
- * include/ruby/st.h (st_shift): add st_shift function
+ * lib/cgi/cookie.rb: Implement HttpOnly flag for cookies.
+ [fix GH-887] Patch by @martinpovolny
- * st.c (st_shift): ditto
+Fri May 15 06:54:19 2015 Aaron Patterson <tenderlove@ruby-lang.org>
- [Bug #8312] [ruby-core:54524] Patch by funny-falcon
+ * variable.c: Change autoload to call `require` through Ruby rather
+ than directly calling `rb_require_safe`. This allows things like
+ RubyGems to intercept file loading done though `autoload`.
+ [Feature #11140]
-Thu Apr 25 12:03:38 2013 Tanaka Akira <akr@fsij.org>
+ * test/ruby/test_autoload.rb: Test for change.
- * ext/socket/extconf.rb: Extract C programs as toplevel constants.
+Wed Apr 8 19:18:02 2015 Shota Fukumori (sora_h) <her@sorah.jp>
-Thu Apr 25 02:23:28 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * enum.c (enum_grep_v, grep_i, grep_iter_i, Init_enum):
+ Implement Enumerable#grep_v. [Feature #11049]
- * configure.in (RUBY_RM_RECURSIVE): this hack is needed by only
- autoconf 2.69 or earlier on darwin.
+Thu May 14 15:54:13 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Thu Apr 25 01:22:41 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/pathname/lib/pathname.rb: Remove condition of RUBY_VERSION <= 1.9.
+ [Feature #11082]
- * lib/tracer.rb (get_line): simply read by File.readlines.
+Wed May 13 17:10:37 2015 Masaki Matsushita <glass.saga@gmail.com>
- * lib/debug.rb (script_lines): get source lines from SCRIPT_LINES__ or
- read from the file.
+ * enum.c (enum_to_a): revert r50457.
+ it requires recursion check.
+ then, it doesn't make performance improvement.
+ [Bug #11130] [Feature #9118]
- * lib/debug.rb (display_list): use script_lines instead of recursion.
- [Bug #8318]
+Wed May 13 11:13:40 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/debug.rb (line_at): use script_lines same as display_list.
+ * parse.y (parse_gvar): separate message for gvar without
+ non-space characters from message for invalid identifiers.
- * lib/debug.rb (display_list): Fix debug listing when called from the
- same file it has been required. patch by Dario Bertini <berdario AT
- gmail.com> [Bug #8318] [fix GH-280]
+Tue May 12 22:18:27 2015 Masaki Matsushita <glass.saga@gmail.com>
-Wed Apr 24 21:51:13 2013 Tanaka Akira <akr@fsij.org>
+ * enum.c (enum_to_a): fix incompatibility introduced in r50457.
+ [Bug #11130]
- * configure.in: Check mblen().
- mblen() is optional in uClibc.
+ * test/ruby/test_enum.rb: test for above.
- * eval_intern.h (CharNext): Don't use mblen() is not available.
+Tue May 12 17:08:03 2015 Koichi Sasada <ko1@atdot.net>
-Wed Apr 24 15:55:06 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * method.h: remove unused declaration.
- * io.c (rb_fd_fix_cloexec): use rb_update_max_fd().
+Mon May 11 10:58:45 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Wed Apr 24 14:08:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * gems/bundled_gems: Update minitest-5.6.1 and power_assert-0.2.3.
- * numeric.c: Fix wiki link on Float imprecision in overview, patched
- by Makoto Kishimoto [Bug #8304] [ruby-dev:47280]
+Mon May 11 00:20:31 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Apr 24 14:03:59 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * include/ruby/ruby.h (Data_Make_Struct, TypedData_Make_Struct):
+ allocate wrapper data object before allocating DATA_PTR to get
+ rid of possible memory leak when the former failed.
- * parse.y (parser_yylex): disallow $- without following identifier
- character. [ruby-talk:406969]
+Sun May 10 21:32:45 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * parse.y (is_special_global_name): mere $- is not a valid global
- variable name.
+ * gc.c (gc_mark_children): call dmark function for non-NULL
+ pointers only, so that DATA_PTR can be NULL safely now.
-Wed Apr 24 13:54:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Sun May 10 16:23:58 2015 Kazuki Tsujimoto <kazuki@callcc.net>
- * string.c: Document String#setbyte return value by @gjmurakami-10gen
- [Fixes GH-294]
+ * proc.c (proc_binding): fix segmentation fault on marking phase.
+ envptr of newenvval should not be NULL.
-Wed Apr 24 13:45:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ You can reproduce by
+ make test-all TESTS='--gc-stress -n test_to_proc_binding ruby/test_method.rb'
- * class.c: Example of Object#methods by @windwiny [Fixes GH-293]
- * ruby.c: Document return values of Kernel #sub, #gsub, and #chop
+Sun May 10 12:41:18 2015 Masaki Matsushita <glass.saga@gmail.com>
-Wed Apr 24 12:54:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * ext/zlib/zlib.c (rb_gzreader_external_encoding):
+ define GzipReader#external_encoding.
+ [Bug #10900]
- * ext/socket/lib/socket.rb: Doc typos by @vipulnsward [Fixes GH-292]
+ * test/zlib/test_zlib.rb: test for above.
+Sun May 10 11:57:48 2015 Masaki Matsushita <glass.saga@gmail.com>
-Wed Apr 24 12:54:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * ext/win32ole/win32ole_variant.c: fix typo "indicies".
+ the patch is from davydovanton <antondavydov.o at gmail.com>.
+ [fix GH-892]
- * ext/socket/lib/socket.rb: Doc typos by @vipulnsward [Fixes GH-292]
+ * lib/rubygems/indexer.rb: ditto.
-Wed Apr 24 12:27:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * test/rubygems/test_gem_indexer.rb: ditto.
- * array.c: Fix documentation for Array#index and #replace aliases
- Based on a patch by @phiggins [Fixes GH-282]
+Sun May 10 11:44:37 2015 Masaki Matsushita <glass.saga@gmail.com>
-Tue Apr 23 21:14:38 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * string.c (rb_str_crypt): Raise ArgumentError when
+ string passed to String#crypt contains null.
+ the patch is from jrusnack <jrusnack at redhat.com>.
+ [Bug #10988] [fix GH-853]
- * string.c (rb_str_inspect): refix r40413, on Ruby 1.9 usual character
- escape uses hex/Unicode escapes, so fix to use Unicode escape on
- Unicode strings and hex on others. [ruby-core:54458] [Bug #8290]
+ * test/ruby/test_string.rb: test for above.
-Tue Apr 23 20:10:02 2013 Tanaka Akira <akr@fsij.org>
+Sun May 10 11:23:03 2015 Masaki Matsushita <glass.saga@gmail.com>
- * missing/isnan.c (isnan): Don't define if isnan() macro is defined.
- This fixes a compilation failure on uClibc based Gentoo system.
+ * enum.c (enum_to_a): Use size to set array capa when possible.
+ the patch is from HonoreDB <aweiner at mdsol.com>.
+ [fix GH-444]
-Tue Apr 23 17:40:40 2013 Martin Duerst <duerst@it.aoyama.ac.jp>
+Sat May 9 06:48:36 2015 Eric Wong <e@80x24.org>
- * lib/rexml/document.rb, lib/rexml/element.rb,
- lib/rexml/formatters/pretty.rb: remove opinionated
- language in documentation. [Bug #8309],
- reported by Charles Beckmann
+ * ext/socket/ancdata.c (bsock_recvmsg_internal): GC guard
+ [Bug #11123]
-Tue Apr 23 14:04:44 2013 Shugo Maeda <shugo@ruby-lang.org>
+Fri May 8 22:57:24 2015 takiy33 <takiy33@gmail.com>
- * lib/net/imap.rb (getacl_response): parse the mailbox of an ACL
- response correctly. [ruby-core:54365] [Bug #8281]
+ * test/matrix/test_matrix.rb (test_determinant): refactor test on
+ Matrix#determinant, by merging with test_det for an alias method
+ det. [Fix GH-897]
-Tue Apr 23 11:58:46 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri May 8 15:43:11 2015 Shugo Maeda <shugo@ruby-lang.org>
- * string.c (rb_str_scrub): fix for UTF-32. strlen() on strings
- contain NUL returns wrong result, use sizeof operator instead.
- [ruby-dev:45975] [Feature #6752]
+ * lib/net/imap.rb (body_ext_mpart): should work even if body-fld-dsp
+ is omitted. [ruby-core:69093] [Bug #11128]
-Tue Apr 23 10:26:50 2013 Akinori MUSHA <knu@iDaemons.org>
+Fri May 8 15:05:57 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * test/ruby/test_module.rb
- (TestModule#test_const_get_invalid_name)
- (test_const_defined_invalid_name): Fix expected values.
+ * doc/syntax/control_expressions.rdoc: fix a missing "a"
+ [fix GH-888][ci skip] Patch by @riffraff
-Tue Apr 23 09:51:26 2013 Akinori MUSHA <knu@iDaemons.org>
+Fri May 8 12:11:33 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * string.c (rb_str_inspect): NUL should not be represented as "\0"
- when octal digits may follow. [ruby-core:54458] [Bug #8290]
+ * vm_eval.c (rb_method_call_status): resolve refined method entry
+ to check if undefined. [ruby-core:69064] [Bug #11117]
-Mon Apr 22 22:54:00 2013 Charlie Somerville <charlie@charliesomerville.com>
+Thu May 7 22:22:59 2015 Sho Hashimoto <sho-h@ruby-lang.org>
- * insns.def (opt_mod): Use % operator if both operands are positive for
- a significant performance improvement. Thanks to @samsaffron.
+ * proc.c: [DOC] fix Binding#local_variable_set example. [ci skip]
-Mon Apr 22 17:09:37 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu May 7 11:32:57 2015 NARUSE, Yui <naruse@ruby-lang.org>
- * marshal.c (r_object0): copy all instance variables not only generic
- ivars, before calling post proc. [ruby-core:51163] [Bug #7627]
+ * Makefile.in (rbconfig.rb): add rule to make.
-Mon Apr 22 10:25:21 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Thu May 7 05:14:39 2015 Eric Wong <e@80x24.org>
- * util.c (ruby_hdtoa): revert r29729.
- If you want ruby to behave as before on x86, specify to use SSE like
- -msse2 -mfpmath=sse for gcc.
+ * ext/socket/lib/socket.rb (connect_nonblock): use IO#wait_writable
+ * lib/drb/drb.rb (DRB::DRbTCPSocket#alive?): use IO#wait_readable
+ * lib/webrick/httpserver.rb (run): ditto
+ * lib/resolv.rb (request): ditto for single socket case
+ [ruby-core:68943] [Feature #11081]
-Sun Apr 21 23:19:00 2013 Charlie Somerville <charlie@charliesomerville.com>
+Wed May 6 22:49:54 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * configure.in: Revert using sigsetjmp by default due to performance
- problems on some systems (eg. older Linux)
+ * vm_eval.c (rb_method_call_status): undefined refined method is
+ not callable unless using. [ruby-core:69064] [Bug #11117]
-Sun Apr 21 21:35:00 2013 Charlie Somerville <charlie@charliesomerville.com>
+Sun May 3 22:40:06 2015 Rei Odaira <Rei.Odaira@gmail.com>
- * configure.in: Use sigsetjmp by default so jumping out of signal
- handlers properly restores the signal mask and SS_ONSTACK flag.
- [ruby-core:54175] [Bug #8254]
+ * ext/-test-/file/fs.c: need to include sys/statvfs.h
+ to use statvfs().
- * configure.in: Manually check for presence of sigsetjmp. It is not a
- function on some systems, so AC_CHECK_FUNCS cannot be used.
+ * ext/-test-/file/extconf.rb: check the existence of
+ sys/statvfs.h
-Sun Apr 21 08:00:55 2013 Tanaka Akira <akr@fsij.org>
+Sun May 3 21:59:48 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * test/csv/test_features.rb, test/logger/test_logger.rb
- test/mkmf/test_have_macro.rb, test/net/http/test_http.rb,
- test/openssl/test_config.rb, test/psych/test_encoding.rb,
- test/psych/test_exception.rb, test/psych/test_psych.rb,
- test/psych/test_tainted.rb, test/readline/test_readline.rb,
- test/rexml/test_contrib.rb, test/ruby/test_autoload.rb,
- test/ruby/test_beginendblock.rb, test/ruby/test_exception.rb,
- test/ruby/test_file.rb, test/ruby/test_io.rb,
- test/ruby/test_marshal.rb, test/ruby/test_process.rb,
- test/ruby/test_require.rb, test/ruby/test_rubyoptions.rb,
- test/syslog/test_syslog_logger.rb, test/webrick/test_httpauth.rb,
- test/zlib/test_zlib.rb: Use Tempfile.create.
+ * lib/yaml.rb: fix typo. [ci skip][fix GH-890]
+ Patch by @miketheman
-Sun Apr 21 00:15:36 2013 Tanaka Akira <akr@fsij.org>
+Sun May 3 10:02:12 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/tempfile.rb (Tempfile.create): Close when the block exits.
+ * range.c (linear_object_p, range_include): test if covered for
+ linear objects. [ruby-core:69052] [Bug #11113]
-Sat Apr 20 23:38:14 2013 Tanaka Akira <akr@fsij.org>
+Fri May 1 13:30:24 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/webrick/httpauth/htpasswd.rb: Use Tempfile.create to avoid
- unintentional unlink() by the finalizer.
- lib/webrick/httpauth/htdigest.rb: Ditto.
+ * dln.c (dln_load): check if a different libruby is loaded by the
+ extension library, and then bail out to get rid of very
+ frequently reported stale bug reports.
-Sat Apr 20 22:47:48 2013 Tanaka Akira <akr@fsij.org>
+Thu Apr 30 19:51:11 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/tempfile.rb (Tempfile.create): New method.
- The method name is proposed by Shugo Maeda. [ruby-dev:47220]
- [ruby-core:41478] [Feature #5707]
+ * compile.c (iseq_compile_each): revert r46873 and r46875, not to
+ allow to execute private readers by pretending op assign.
+ [ruby-core:68984] [Bug #11096]
-Sat Apr 20 14:22:10 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Apr 30 17:02:33 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * marshal.c (w_object): dump no ivars to the original by marshal_dump.
- [ruby-core:54334] [Bug #8276]
+ * rational.c: Added documentation for rational literal.
+ [Bug #11075][fix GH-885][ci skip] Patch by @shishir127
- * marshal.c (r_object0): copy all ivars of marshal_dump data to the
- result object instead. [ruby-core:51163] [Bug #7627]
+Thu Apr 30 16:39:44 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Apr 20 02:33:27 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * ext/socket/ipsocket.c (init_inetsock_internal): preserve errno
+ before other library calls and use rb_syserr_fail.
+ [ruby-core:68531] [Bug #10975]
- * string.c (str_scrub): add ruby method String#scrub which verify and
- fix invalid byte sequence. [ruby-dev:45975] [Feature #6752]
+Thu Apr 30 16:22:16 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * string.c (str_compat_and_valid): check given string is compatible
- and valid with given encoding.
+ * parse.y (lambda): push and reset cmdarg_stack in lambda body.
+ [ruby-core:69017] [Bug #11107]
- * transcode.c (str_transcode0): If invalid: :replace is specified for
- String#encode, replace invalid byte sequence even if the destination
- encoding equals to the source encoding.
+Sun Apr 26 07:36:48 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Apr 19 21:55:40 2013 Kouhei Sutou <kou@cozmixng.org>
+ * enc/utf_8.c (code_to_mbclen, code_to_mbc): reject values larger
+ than UTF-8 max codepoints. [Feature #11094]
- * README.EXT.ja (Data_Wrap_Struct): Remove a description about
- orphan argument. Oh, I renamed the argument name without
- changing description at r36180... Sorry....
- Patch by Makoto Kishimoto. Thanks!!! [ruby-dev:47269] [Bug #8292]
- * README.EXT.ja (Data_Make_Struct): Add a sample code that describes
- how it works.
- Patch by Makoto Kishimoto. Thanks!!! [ruby-dev:47269] [Bug #8292]
+Sat Apr 25 14:26:19 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Apr 19 17:54:57 2013 Shugo Maeda <shugo@ruby-lang.org>
+ * string.c (str_buf_cat): expand later so that the buffer can be
+ larger for further use. [Bug #11080] [Bug #11095]
- * lib/net/imap.rb (body_type_msg): should accept
- message/delivery-status with extra data.
- [ruby-core:53741] [Bug #8167]
+Fri Apr 24 23:48:45 2015 Akinori MUSHA <knu@iDaemons.org>
- * test/net/imap/test_imap_response_parser.rb: related test.
+ * misc/ruby-electric.el: Import version 2.2.3 from
+ https://github.com/knu/ruby-electric.el.
-Fri Apr 19 13:03:14 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Apr 24 10:40:02 2015 NAKAMURA Usaku <usa@ruby-lang.org>
- * marshal.c (w_object): do not dump encoding which is dumped with
- marshal_dump data. [ruby-core:54334] [Bug #8276]
+ * win32/win32.c (rb_w32_{getc,putc}): removed. they are needed for old
+ ruby (before 1.8), but not now.
-Fri Apr 19 11:36:53 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Apr 24 08:40:13 2015 NARUSE, Yui <naruse@ruby-lang.org>
- * configure.in (stack_protector): control use of -fstack-protector.
+ * win32/win32.c: remove bcc related code.
- * configure.in (debugflags): let -fstack-protector precede and disable
- debugflags, because they can't work together on SmartOS. [Bug #8268]
+ * include/ruby/win32.h: ditto.
-Fri Apr 19 07:43:52 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Fri Apr 24 08:21:07 2015 NARUSE, Yui <naruse@ruby-lang.org>
- * test/openssl/test_cipher.rb: Correct a typo
- by jgls <joerg@joergleis.com>
- https://github.com/ruby/ruby/pull/291 fix GH-291
+ * win32/win32.c (rb_acrt_lowio_lock_fh): wrap _pioinfo(i)->lock.
-Thu Apr 18 16:58:51 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * win32/win32.c (rb_acrt_lowio_unlock_fh): ditto.
- * vm_method.c (rb_mod_public_method): fix visibility on anonymous
- module. set visibility of singleton method, not method in base
- class. [ruby-core:54404] [Bug #8284]
+Fri Apr 24 06:47:19 2015 NARUSE, Yui <naruse@ruby-lang.org>
-Thu Apr 18 16:20:51 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * win32/win32.c (_filbuf): msvc14 doesn't have it, use _fgetc_nolock.
- * dir.c (glob_helper): should skip dot directories only for recursion,
- but should not if matching to the given pattern. [ruby-core:54387]
- [Bug #8283]
+ * win32/win32.c (_flsbuf): msvc14 doesn't have it, use _fputc_nolock.
-Thu Apr 18 16:20:21 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * win32/win32.c (vcruntime_file): define vcruntime_file on msvc14
+ because it doesn't export FILE's internal structure.
- * pack.c (pack_unpack): increase buffer size to fix buffer overflow,
- and fix garbage just after unpacking without missing paddings.
- [Bug #8286]
+ * win32/win32.c (FILE_COUNT): added to abstract FILE->_cnt.
-Thu Apr 18 13:35:54 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * win32/win32.c (FILE_READPTR): added to abstract FILE->_ptr.
- * pack.c (pack_unpack): output characters even if the input doesn't
- have paddings. [Bug #8286]
+ * win32/win32.c (FILE_FILENO): added to abstract FILE->_file.
-Thu Apr 18 08:20:48 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * win32/win32.c (init_stdhandle): use FILE_FILENO.
- * common.mk (clean-ext): remove timestamps.
+ * win32/win32.c (rb_w32_getc): use FILE_COUNT and FILE_READPTR.
-Wed Apr 17 22:07:50 2013 Tanaka Akira <akr@fsij.org>
+ * win32/win32.c (rb_w32_putc): ditto.
- * ext/socket/rubysocket.h (SOCKLEN_MAX): Expression simplified.
+Fri Apr 24 06:37:07 2015 NARUSE, Yui <naruse@ruby-lang.org>
-Wed Apr 17 20:09:19 2013 Aman Gupta <ruby@tmm1.net>
+ * win32/win32.c (dupfd): use _set_osfhnd.
- * compile.c (iseq_add_mark_object): Use new rb_iseq_add_mark_object().
+ * win32/win32.c (rb_w32_wopen): use _set_osflags.
- * insns.def (setinlinecache): Ditto.
+Thu Apr 24 05:38:01 2015 Koichi Sasada <ko1@atdot.net>
- * iseq.c (rb_iseq_add_mark_object): New function to allocate
- iseq->mark_ary on demand. [Bug #8142]
+ * gc.c (gc_mark_roots): fox to work PRINT_ROOT_TICKS.
- * iseq.h (rb_iseq_add_mark_object): Ditto.
+Fri Apr 24 04:49:05 2015 NARUSE, Yui <naruse@ruby-lang.org>
- * iseq.c (prepare_iseq_build): Avoid allocating mark_ary until needed.
+ * win32/Makefile.sub: MSVC14 have struct timespec.
- * iseq.c (rb_iseq_build_for_ruby2cext): Ditto.
+ * win32/rtname.cmd: support vcruntime140.dll.
-Wed Apr 17 20:00:18 2013 Tanaka Akira <akr@fsij.org>
+ * time.c (localtime_with_gmtoff_zone): MSVC14 doesn't have tzname and
+ daylight but have _tzname and _daylight.
- * ext/socket/rubysocket.h (SOCKLEN_MAX): Defined.
+Thu Apr 23 11:35:55 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/socket/raddrinfo.c (ext/socket/raddrinfo.c): Reject too long
- Linux abstract socket name.
+ * vm_eval.c (rb_obj_instance_eval, rb_obj_instance_exec): allow
+ symbols to just instance_eval/exec, except for definition of
+ singletons. [ruby-core:68961] [Bug #11086]
-Wed Apr 17 19:45:27 2013 Aman Gupta <tmm1@ruby-lang.org>
+Thu Apr 23 10:01:36 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * iseq.c (iseq_location_setup): re-use existing string when iseq has
- the same path and absolute_path. [Bug #8149]
+ * lib/delegate.rb: fix a typo.
+ [fix GH-881][ci skip] Patch by @Zorbash
-Wed Apr 17 11:38:37 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Apr 22 18:36:50 2015 Shugo Maeda <shugo@ruby-lang.org>
- * lib/test/unit/assertions.rb (Test::Unit::Assertions#assert):
- UNASSIGNED is not a valid message.
+ * lib/net/imap.rb (move, uid_move): support the MOVE command defined
+ in RFC6851. Patch by ojab ojab.
+ [ruby-core:68960] [Feature #11077]
-Wed Apr 17 10:58:18 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Apr 22 12:42:12 2015 Kazuki Tanaka <gogotanaka@ruby-lang.org>
- * thread.c (sleep_timeval): get rid of overflow on Windows where
- timeval.tv_sec is not time_t but mere long.
+ * test/ruby/test_object.rb: add tests for Kernel#String and Kernel#Array.
+ [fix GH-879][fix GH-880] Patch by @yui-knk
-Tue Apr 16 23:07:12 2013 Tanaka Akira <akr@fsij.org>
+Tue Apr 21 20:46:02 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * ext/socket/unixsocket.c (unix_send_io): Suppress a warning by clang.
- (unix_recv_io): Ditto.
+ * test/ruby/test_object.rb: renamed tests to explicitly class name.
+ [fix GH-877] Patch by @yui-knk
-Tue Apr 16 12:27:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Tue Apr 21 05:31:00 2015 Eric Wong <e@80x24.org>
- * ext/sdbm/init.c: Fix comment indentation, by windwiny [Fixes GH-277]
+ * ext/socket/lib/socket.rb (connect_internal): avoid common exceptions
+ from connect_nonblock. [ruby-core:68909]
-Tue Apr 16 12:25:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Mon Apr 20 23:46:53 2015 NAKAMURA Usaku <usa@ruby-lang.org>
- * ext/socket/option.c: Document synonymous methods, by windwiny [GH-277]
- * ext/stringio/stringio.c: ditto
- * ext/io/wait/wait.c: ditto
- * ext/gdbm/gdbm.c: ditto
- * ext/dl/cfunc.c: ditto
- * ext/zlib/zlib.c: ditto
- * ext/win32ole/win32ole.c: ditto
- * ext/dbm/dbm.c: ditto
- * ext/json/generator/generator.c: ditto
- * ext/date/date_core.c: ditto
+ * win32/win32.c (rb_w32_wreadlink): follow the official format of
+ REPARSE_DATA_BUFFER structure.
-Tue Apr 16 11:23:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Mon Apr 20 20:23:04 2015 NAKAMURA Usaku <usa@ruby-lang.org>
- * ext/openssl/*: Document synonymous methods, by windwiny [GH-277]
+ * common.mk ($(arch)-fake.rb): revert r50354 because bsdmake seems not
+ to handle such substitution.
-Mon Apr 15 22:21:42 2013 Tanaka Akira <akr@fsij.org>
+ * tool/expand-config.rb: convert path separators here.
- * ext/fiddle/depend: New file.
+Mon Apr 20 16:52:20 2015 NAKAMURA Usaku <usa@ruby-lang.org>
-Mon Apr 15 22:01:02 2013 Akinori MUSHA <knu@iDaemons.org>
+ * tool/fake.rb: don't fake libdir. use libdirname instead.
- * misc/ruby-electric.el (ruby-electric-insert): Check
- ruby-electric-is-last-command-char-expandable-punct-p here.
+Mon Apr 20 16:49:52 2015 NAKAMURA Usaku <usa@ruby-lang.org>
- * misc/ruby-electric.el (ruby-electric-closing-char): New
- interactive function bound to closing characters. Typing one of
- those closing characters right after the matching counterpart
- cancels the effect of automatic closing. For example, typing
- "{" followed by "}" simply makes "{}" instead of "{ } }".
+ * lib/mkmf.rb (MakeMakefile#configuration): DESTDIR should never affect
+ top_srcdir and builddir.
-Mon Apr 15 12:54:42 2013 Martin Bosslet <Martin.Bosslet@gmail.com>
+Mon Apr 20 16:18:17 2015 NAKAMURA Usaku <usa@ruby-lang.org>
- * ext/openssl/ossl_ssl.c: Correct shutdown behavior w.r.t GC.
+ * common.mk ($(arch)-fake.rb): fix the path separator up for Windows.
- * test/openssl/test_ssl.rb: Add tests to verify correct behavior.
+Mon Apr 20 15:02:47 2015 NAKAMURA Usaku <usa@ruby-lang.org>
- [Bug #8240] Patch provided by Shugo Maeda. Thanks!
+ * win32/win32.c (rb_w32_wreadlink): fixed a bug that a junction misses
+ its drive letter.
-Mon Apr 15 10:23:39 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Mon Apr 20 12:54:56 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * ext/coverage/depend: fix id.h place as r40283.
+ * ext/openssl/*: use license instead of licence.
+ [fix GH-876][ci skip] Patch by @davydovanton
+ * lib/net/https.rb: ditto.
- * ext/coverage/extconf.rb: add topdir and topsrcdir to VPATH.
+Mon Apr 20 12:42:40 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
-Sun Apr 14 19:46:14 2013 Tanaka Akira <akr@fsij.org>
+ * benchmark/bm_so_meteor_contest.rb: fix a typo.
+ [fix GH-876][ci skip] Patch by @davydovanton
+ * tool/bisect.sh: ditto.
+ * tool/update-deps: ditto.
- * ext/-test-/debug/depend: New file.
+Mon Apr 20 11:10:46 2015 Eric Wong <e@80x24.org>
- * ext/-test-/exception/depend: Ditto.
+ * ext/socket/socket.c (sock_connect_nonblock): do not raise EISCONN
+ [ruby-core:68926] [Feature #11072]
+ * test/socket/test_nonblock.rb: check non-EISCONN on 2nd connect
- * ext/-test-/printf/depend: Ditto.
+Sun Apr 19 12:19:17 2015 Chad Brewbaker <crb002@gmail.com>
- * ext/-test-/string/depend: Ditto.
+ * ext/{etc,openssl,tk}: Adding parens and comparisons around
+ assignments to get rid of Wparentheses warnings. [Fix GH-875]
- * ext/coverage/depend: Ditto.
+Sun Apr 19 10:42:54 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/io/console/depend: Ditto.
+ * hash.c (get_env_cstr): environment variables must be ASCII
+ compatible, as dummy encodings and wide char encodings are
+ unsupported now.
- * ext/io/nonblock/depend: Ditto.
+Sat Apr 18 15:18:56 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/io/wait/depend: Ditto.
+ * ext/json/parser/parser.rl: raise with messages in UTF-8
+ encoding. [ruby-core:67386] [Bug #10705]
- * ext/openssl/depend: Ditto.
+Fri Apr 17 11:58:34 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/pathname/depend: Ditto.
+ * string.c (STR_SET_EMBED): clear NOFREE flag at embedding as
+ embedded strings no longer refer static strings.
+ [ruby-core:68436] [Bug #10942]
- * ext/psych/depend: Ditto.
+Thu Apr 16 05:15:50 2015 Eric Wong <e@80x24.org>
- * ext/zlib/depend: Ditto.
+ * NEWS: note IO#wait_readable change in r50263
-Sun Apr 14 02:46:50 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Thu Apr 16 05:09:36 2015 Eric Wong <e@80x24.org>
- * lib/mkmf.rb (MakeMakefile#create_makefile): remove {$(VPATH)} other
- than nmake.
+ * lib/net/protocol.rb (rbuf_fill): use IO#wait_*able
+ * lib/net/http/generic_request.rb (wait_for_continue): ditto
+ [ruby-core:68891] [Feature #11056]
- * ext/ripper/depend: use VPATH expecting removed by above.
+Wed Apr 15 18:43:43 2015 Koichi Sasada <ko1@atdot.net>
-Sat Apr 13 23:06:20 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm_trace.c (rb_tracepoint_new): fix documentation.
+ Commented by @emilsoman.
- * lib/mkmf.rb (timestamp_file): gather timestamp files in one
- directory from each extension directories.
+Wed Apr 15 17:36:51 2015 Koichi Sasada <ko1@atdot.net>
-Sat Apr 13 21:09:02 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * vm_trace.c (rb_tracepoint_new): Add documentation for
+ rb_tracepoint_new C level API [ci skip]
+ Provided by @emilsoman. [fix GH-869]
- * lib/mkmf.rb (MakeMakefile#create_makefile): output new macro
- disthdrdir to specify the path of id.h, parse.h and etc.
+Wed Apr 15 10:37:40 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * ext/ripper/depend: use above macro.
+ * doc/contributors.rdoc: fix a typo. Patch by @davydovanton
+ [fix GH-872][ci skip]
+ * doc/syntax/methods.rdoc: ditto.
+ * ext/digest/sha2/sha2.c: ditto.
+ * ext/socket/ipsocket.c: ditto.
+ * ext/tk/*: ditto.
-Sat Apr 13 20:28:08 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Wed Apr 15 07:51:23 2015 Yuki Yugui Sonoda <yugui@yugui.jp>
- * Merge Onigmo 5.13.4 f22cf2e566712cace60d17f84d63119d7c5764ee.
- [bug] fix problem with optimization of \z (Issue #16) [Bug #8210]
+ * doc/extension.ja.rdoc: Added description of TypedData_XXX.
+ Deprecated the old DATA_XXX.
+ Reviewed by ko1 and nobu.
+ Fixes [ruby-dev:40881] #3064
-Sat Apr 13 18:56:15 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * doc/extension.rdoc: ditto.
- * ext/ripper/depend: parse.h and id.h may be created on topdir.
+Wed Apr 15 07:34:49 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Apr 13 12:08:16 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
+ * thread_pthread.c (reserve_stack): keep sp safe zone to get rid
+ of crash by -fstack-check. [ruby-core:68740] [Bug #11030]
- * lib/matrix.rb: Add Vector#cross_product, patch by Luis Ezcurdia
- [fix GH-276] [rubyspec:81eec89a124]
+Tue Apr 14 16:03:49 2015 NAKAMURA Usaku <usa@ruby-lang.org>
-Sat Apr 13 10:20:37 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * tool/merger.rb (versionup): should also increment revision when
+ changing teeny.
- * struct.c (rb_struct_define_without_accessor, rb_struct_define),
- (rb_struct_s_def): hide member names array.
+Tue Apr 14 11:24:56 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * struct.c (anonymous_struct, new_struct, setup_struct): split
- make_struct() for each purpose.
+ * ext/-test-/printf/printf.c (uint_to_str): renamed to get rid of
+ conflict on cygwin. [ruby-core:68877] [Bug #11065]
-Sat Apr 13 09:34:31 2013 Tanaka Akira <akr@fsij.org>
+Tue Apr 14 08:59:04 2015 Zachary Scott <e@zzak.io>
- * lib/mkmf.rb: Add ruby/ruby.h, ruby/missing.h, ruby/intern.h,
- ruby/st.h and ruby/subst.h for ruby_headers in generated Makefile.
+ * gc.c: [DOC] Improve documentation for ObjectSpace.count_objects
+ with regards to `:TOTAL` key, with patch by @schneems [Fixes GH-871]
+ https://github.com/ruby/ruby/pull/871 [Bug #11067]
- * ext/-test-/old_thread_select/depend: Update dependencies.
+Mon Apr 13 22:44:07 2015 Tanaka Akira <akr@fsij.org>
- * ext/-test-/wait_for_single_fd/depend: Ditto.
+ * test/lib/envutil.rb (File.mkfifo): Defined using mkfifo command.
- * ext/bigdecimal/depend: Ditto.
+ * test/ruby/test_io.rb: Use File.mkfifo.
- * ext/curses/depend: Ditto.
+ * test/ruby/test_file_exhaustive.rb: Ditto.
- * ext/digest/bubblebabble/depend: Ditto.
+ * test/ruby/test_process.rb: Ditto.
- * ext/digest/depend: Ditto.
+Mon Apr 13 21:20:20 2015 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
- * ext/digest/md5/depend: Ditto.
+ * ext/openssl/lib/openssl/ssl.rb: stricter hostname verification
+ following RFC 6125. with the patch provided by Tony Arcieri and
+ Hiroshi Nakamura [ruby-core:61545] [Bug #9644]
+ * test/openssl/test_ssl.rb: add tests for above.
- * ext/digest/rmd160/depend: Ditto.
+Sun Apr 12 18:40:04 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
- * ext/digest/sha1/depend: Ditto.
+ * ext/json/json.gemspec: bump version to 1.8.2.
+ * ext/json/lib/json/version.rb: ditto.
- * ext/digest/sha2/depend: Ditto.
+Sun Apr 12 18:12:07 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
- * ext/dl/callback/depend: Ditto.
+ * ext/json/json.gemspec, lib/rdoc/rdoc.gemspec: added gemspec directly.
+ * defs/default_gems, tool/rbinstall.rb: removed default_gems definition.
+ it make simple installation for default gems.
- * ext/dl/depend: Ditto.
+Sun Apr 12 17:35:17 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
- * ext/etc/depend: Ditto.
+ * ext/json/*, test/json/*: Reverted r50231. Because it's not
+ working with cross-compile environment.
- * ext/nkf/depend: Ditto.
+Sun Apr 12 15:34:59 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/objspace/depend: Ditto.
+ * parse.y (arg): fix segfault by null caused by syntax error.
+ [ruby-core:68851] [Bug #10957]
- * ext/pty/depend: Ditto.
+Sun Apr 12 15:11:16 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
- * ext/readline/depend: Ditto.
+ * lib/rubygems/test_case.rb: use explicitly exception class and reverted
+ to require JSON library for rubygems tests with Ruby 2.2.0 or earlier.
- * ext/ripper/depend: Ditto.
+Sun Apr 12 15:10:18 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/sdbm/depend: Ditto.
+ * ext/io/wait/wait.c (io_wait_readable): simply returns that IO is
+ readable without blocking, but no longer returns EOF.
- * ext/socket/depend: Ditto.
+ * ext/io/wait/wait.c (io_ready_p, io_wait_readable): try polling
+ first and check FIONREAD optionally to see if EOF.
+ [ruby-core:36805] [Feature #4849]
- * ext/stringio/depend: Ditto.
+Sun Apr 12 14:53:23 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
- * ext/strscan/depend: Ditto.
+ * lib/rubygems/test_case.rb: fixed json load error for rubygems tests.
- * ext/syslog/depend: Ditto.
+Sun Apr 12 14:13:28 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
- * ext/-test-/num2int/depend: Removed.
+ * gc.c: Document require name for ObjectSpace methods.
+ [ci skip][fix GH-860] Patch by @schneems
- * ext/dbm/depend: Ditto.
+Sun Apr 12 13:54:05 2015 Tanaka Akira <akr@fsij.org>
- * ext/fcntl/depend: Ditto.
+ * test/ruby/test_io.rb: New test that open(fifo) doesn't block other
+ threads.
- * ext/gdbm/depend: Ditto.
+Sun Apr 12 13:52:18 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
- * ext/racc/cparse/depend: Ditto.
+ * ext/coverage/coverage.c: Remove extension from require argument.
+ [ci skip][fix GH-870] Patch by @yui-knk
-Sat Apr 13 00:15:54 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sun Apr 12 10:29:14 2015 Eric Wong <e@80x24.org>
- * ext/etc/etc.c (Init_etc): move Passwd and Group under Etc namespace
- as primary names.
+ * ext/openssl/ossl_ssl.c (ossl_ssl_connect_nonblock):
+ support `exception: false'
+ * (get_no_exception): move function location
+ * ext/socket/socket.c (sock_connect_nonblock):
+ support `exception: false'
+ * test/openssl/test_pair.rb (test_connect_accept_nonblock_no_exception):
+ test `exception: false' on connect,
+ rename from `test_accept_nonblock_no_exception'
+ * test/socket/test_nonblock.rb (test_connect_nonblock_no_exception):
+ new test
-Fri Apr 12 21:06:55 2013 Tanaka Akira <akr@fsij.org>
+Sun Apr 12 09:57:16 2015 Tanaka Akira <akr@fsij.org>
- * common.mk: pack.o depends on internal.h.
+ * test/ruby/test_file_exhaustive.rb: Test a block device on GNU/Linux.
-Fri Apr 12 20:59:24 2013 Tanaka Akira <akr@fsij.org>
+Sun Apr 12 09:24:03 2015 Tanaka Akira <akr@fsij.org>
- * bignum.c (ones): Use __builtin_popcountl if available.
+ * test/ruby/test_file_exhaustive.rb: Test a file not owned.
- * internal.h (GCC_VERSION_SINCE): Macro moved from pack.c.
+Sun Apr 12 09:05:44 2015 Tanaka Akira <akr@fsij.org>
- * pack.c: Include internal.h for GCC_VERSION_SINCE.
+ * ext/fiddle/depend: Fix "Wrong mix of special targets" error with
+ OpenBSD make.
-Fri Apr 12 18:29:42 2013 Tanaka Akira <akr@fsij.org>
+Sun Apr 12 09:04:37 2015 NAKAMURA Usaku <usa@ruby-lang.org>
- * common.mk: version.o depends on $(srcdir)/include/ruby/version.h
- instead of {$(VPATH)}version.h to avoid confusion by VPATH between
- top level version.h and include/ruby/version.h for build in-place.
- [ruby-dev:47249] [Bug #8256]
+ * test/ruby/test_file_exhaustive.rb: Windows doesn't support Unix file
+ modes.
-Fri Apr 12 15:21:24 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sun Apr 12 08:56:44 2015 Tanaka Akira <akr@fsij.org>
- * vm_insnhelper.c (vm_callee_setup_keyword_arg): non-symbol key is not
- a keyword argument, keep it as a positional argument.
+ * ext/-test-/file/fs.c: OpenBSD needs sys/param.h before sys/mount.h.
-Fri Apr 12 11:58:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Sun Apr 12 08:52:01 2015 Tanaka Akira <akr@fsij.org>
- * array.c: Document synonymous methods, by windwiny [GH-277]
- * bignum.c: ditto
- * complex.c: ditto
- * dir.c: ditto
- * encoding.c: ditto
- * enumerator.c: ditto
- * numeric.c: ditto
- * proc.c: ditto
- * re.c: ditto
- * string.c: ditto
+ * test/ruby/test_file_exhaustive.rb: Test suid, sgid and sticky file.
-Thu Apr 11 23:41:46 2013 Tanaka Akira <akr@fsij.org>
+Sat Apr 11 23:48:30 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
- * common.mk: Add dependencies for include/ruby.h
+ * template/fake.rb.in: Don't assign baseruby, Because it's affect to
+ Makefile of native gem like json on bundled gems.
- * tool/update-deps: Use "make -p all miniruby ruby golf" to extract
- dependencies in makefiles.
+Sat Apr 11 23:33:22 2015 Tanaka Akira <akr@fsij.org>
-Thu Apr 11 23:21:17 2013 Tanaka Akira <akr@fsij.org>
+ * file.c (rb_f_test): Consider nsec for "=", "<" and ">" for "test"
+ method.
- * tool/update-deps: Use "make -p all golf" to extract dependencies in
- makefiles.
+Sat Apr 11 23:26:05 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
-Thu Apr 11 21:02:19 2013 Tanaka Akira <akr@fsij.org>
+ * tool/rbinstall.rb: support destdir for native extension gem.
- * common.mk: Dependency updated.
+Sat Apr 11 21:02:06 2015 NAKAMURA Usaku <usa@ruby-lang.org>
- * tool/update-deps: Rewritten.
+ * test/ruby/test_file_exhaustive.rb
+ (TestFileExhaustive#test_stat_socket_p): r50226 accidentally missed
+ the guard for non-unix environments.
-Thu Apr 11 19:59:48 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Sat Apr 11 20:14:21 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
- * common.mk: partially revert r40183, which breaks building on
- other than source directory. (its commit log also says the same
- thing, but such failure is not reproducible on my environment
- and the commit breaks build on my environment)
+ * ext/json/*, test/json/*, defs/default_gems: Gemify JSON library.
+ [fix GH-867][Feature #11057]
+ * test/ruby/test_extlibs.rb: removed json gem from existence extensions.
+ * gems/bundled_gems: added json gem into bundled gem.
+ * lib/rdoc/rubygems_hook.rb: ignored no json environment.
+ * lib/rubygems/test_case.rb, test/rubygems/*: ditto.
+ * lib/rdoc/test_case.rb, test/rdoc/*: ditto.
-Thu Apr 11 16:10:01 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Sat Apr 11 15:56:58 2015 Tanaka Akira <akr@fsij.org>
- * ext/fiddle/closure.c (USE_FFI_CLOSURE_ALLOC): define 0 on
- Mac OS X and Linux [Bug #3371]
+ * test/ruby/test_file_exhaustive.rb: Create sample files lazily.
-Thu Apr 11 13:19:22 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+Sat Apr 11 14:03:47 2015 Tanaka Akira <akr@fsij.org>
- * test/drb/drbtest.rb (Drb{Core,Ary}#teardown): retry Process.kill
- if it fails with Errno::EPERM on Windows (workaround).
- [ruby-dev:47245] [Bug #8251]
+ * test/ruby/test_file_exhaustive.rb: Test character device using
+ /dev/null.
-Thu Apr 11 11:11:38 2013 Akinori MUSHA <knu@iDaemons.org>
+Sat Apr 11 10:59:58 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * dir.c: Fix a typo.
+ * lib/mkmf.rb (append_cppflags, append_cflags, append_ldflags):
+ utility methods to append compiler options.
-Thu Apr 11 10:39:34 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Sat Apr 11 08:22:24 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
- * ext/fiddle/closure.c (USE_FFI_CLOSURE_ALLOC): add missing case:
- RUBY_LIBFFI_MODVERSION is not defined (usually on Windows).
+ * lib/rdoc/text.rb: removed duplicated code.
-Thu Apr 11 09:27:04 2013 Konstantin Haase <me@rkh.im>
+Sat Apr 11 04:46:42 2015 Eric Wong <e@80x24.org>
- * dir.c (file_s_fnmatch): Document File::FNM_EXTGLOB flag.
+ * lib/net/protocol.rb (rbuf_fill): avoid exception with read_nonblock
+ [ruby-core:68787] [Feature #11044]
-Thu Apr 11 09:17:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Fri Apr 10 23:57:44 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * README: Fix typo by Benjamin Winkler [Fixes GH-281]
+ * dir.c (need_normalization): use getattrlist() if fgetattrlist()
+ is unavailable, on OSX 10.5. [ruby-core:68829] [Bug #11054]
-Thu Apr 11 06:15:51 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Fri Apr 10 22:29:21 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * regint.h: fix typo: _M_AMD86 -> _M_AMD64.
+ * lib/mkmf.rb (try_compile): pass the given werror flag to try_do
+ to check if stderr is empty.
- * siphash.c: ditto.
+ * lib/mkmf.rb (try_cflags, try_ldflags): default werror to true.
- * st.c: ditto.
+ * win32/Makefile.sub (WERRORFLAG): remove useless option. VC does
+ not make warnings of unknown command option an error.
-Thu Apr 11 06:09:57 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Fri Apr 10 19:34:24 2015 Tanaka Akira <akr@fsij.org>
- * ext/fiddle/extconf.rb: define RUBY_LIBFFI_MODVERSION macro.
+ * test/ruby/test_file_exhaustive.rb: Test socket.
- * ext/fiddle/closure.c (USE_FFI_CLOSURE_ALLOC): define 0 or 1
- with platform and libffi's version. [Bug #3371]
+Fri Apr 10 19:38:46 2015 Koichi Sasada <ko1@atdot.net>
-Thu Apr 11 05:30:43 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * test/objspace/test_objspace.rb: remove debug prints.
- * lib/mkmf.rb (pkg_config): Add optional argument "option".
- If it is given, it returns the result of
- `pkg-config --<option> <pkgname>`.
+Fri Apr 10 19:35:51 2015 Koichi Sasada <ko1@atdot.net>
-Thu Apr 11 03:33:05 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * ext/objspace/objspace.c: add ObjectSpace.count_imemo_objects method
+ to count imemo objects for each type.
- * ext/fiddle/closure.c (initialize): check mprotect's return value.
- If mprotect is failed because of PaX or something, its function call
- will cause SEGV.
- http://c5664.rubyci.org/~chkbuild/ruby-trunk/log/20130401T210301Z.diff.html.gz
+ * test/objspace/test_objspace.rb: add a test.
-Wed Apr 10 17:39:13 2013 Tanaka Akira <akr@fsij.org>
+ * NEWS: describe about this addition.
- * ext/bigdecimal/bigdecimal.c (VpCtoV): Initialize a local variable
- even when overflow.
+Fri Apr 10 19:34:24 2015 Tanaka Akira <akr@fsij.org>
-Wed Apr 10 12:32:37 2013 Tanaka Akira <akr@fsij.org>
+ * test/ruby/test_file_exhaustive.rb: Test anonymous pipe.
- * bignum.c (rb_ll2big): Don't overflow on signed integer negation.
+Fri Apr 10 19:31:56 2015 Tanaka Akira <akr@fsij.org>
- * ext/bigdecimal/bigdecimal.c (MUL_OVERFLOW_SIGNED_VALUE_P): New
- macro.
- (AddExponent): Don't overflow on signed integer multiplication.
- (VpCtoV): Don't overflow on signed integer arithmetic.
- (VpCtoV): Don't overflow on signed integer arithmetic.
+ * test/ruby/test_file_exhaustive.rb: Test named pipe.
-Wed Apr 10 06:32:12 2013 Tanaka Akira <akr@fsij.org>
+Fri Apr 10 19:10:34 2015 Koichi Sasada <ko1@atdot.net>
- * internal.h (MUL_OVERFLOW_INT_P): New macro.
+ * ext/objspace/objspace.c (setup_hash): unify common routine.
- * sprintf.c (GETNUM): Don't overflow on signed integer multiplication.
+Fri Apr 10 18:29:49 2015 Tanaka Akira <akr@fsij.org>
-Tue Apr 9 20:38:20 2013 Tanaka Akira <akr@fsij.org>
+ * process.c (rb_execarg_parent_start1): Handle EINTR.
- * internal.h (MUL_OVERFLOW_SIGNED_INTEGER_P): New macro.
- (MUL_OVERFLOW_FIXNUM_P): Ditto.
- (MUL_OVERFLOW_LONG_P): Ditto.
+Fri Apr 10 17:27:58 2015 Koichi Sasada <ko1@atdot.net>
- * array.c (rb_ary_product): Don't overflow on signed integer
- multiplication.
+ * vm.c (vm_exec): check other events when RETURN is thrown.
+ [Bug #10724]
- * numeric.c (fix_mul): Ditto.
- (int_pow): Ditto.
+ * test/ruby/test_settracefunc.rb: add a test.
- * rational.c (f_imul): Ditto.
+Fri Apr 10 11:44:09 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * insns.def (opt_mult): Ditto.
+ * ext/date/extconf.rb: check warnings.
- * thread.c (sleep_timeval): Don't overflow on signed integer addition.
+ * lib/mkmf.rb (try_cflags): pass options to try_compile.
- * bignum.c (rb_int2big): Don't overflow on signed integer negation.
- (rb_big2ulong): Ditto.
- (rb_big2long): Ditto.
- (rb_big2ull): Ditto.
- (rb_big2ll): Ditto.
+ * win32/Makefile.sub (WERRORFLAG): make unknown command line
+ options an error.
-Tue Apr 9 19:45:44 2013 Tanaka Akira <akr@fsij.org>
+Fri Apr 10 08:00:17 2015 NAKAMURA Usaku <usa@ruby-lang.org>
- * lib/open-uri.rb: Support multiple fields with same field
- name (like Set-Cookie).
- (OpenURI::Meta#metas): New accessor to obtain fields as a Hash from
- field name (string) to field values (array of strings).
- [ruby-core:37734] [Bug #4964] reported by ren li.
+ * test/ruby/test_process.rb: unfortunately, windows is not POSIX...
+ cygwin has mkfifo command, but it does not affect system-wide.
-Tue Apr 9 15:26:12 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Apr 10 02:18:53 2015 Tanaka Akira <akr@fsij.org>
- * compile.c (iseq_compile_each): append keyword hash to argument array
- to splat if needed. [ruby-core:54094] [Bug #8236]
+ * test/ruby/test_process.rb: Use mkfifo command instead of mknod
+ command to create a named pipe. mkfifo command is defined by POSIX.
-Tue Apr 9 10:02:39 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Apr 10 01:29:05 2015 Tanaka Akira <akr@fsij.org>
- * lib/mkmf.rb (timestamp_file): gather timestamp files in one
- directory from each extension directories, with considering
- target_prefix.
+ * process.c: Release GVL when opening a file in spawn() to avoid whole
+ process blocking when opening a named pipe.
+ (open_func): New function.
+ (rb_execarg_parent_start1): Extracted from rb_execarg_parent_start and
+ use rb_thread_call_without_gvl2 to release GVL when opening a file.
+ (rb_execarg_parent_start): Invoke rb_execarg_parent_start1 via
+ rb_protect and invoke rb_execarg_parent_end when error.
-Tue Apr 9 04:57:59 JST 2013 Charles Oliver Nutter <headius@headius.com>
+Thu Apr 9 22:19:19 2015 Tanaka Akira <akr@fsij.org>
- * error.c: Capture EAGAIN, EWOULDBLOCK, EINPROGRESS exceptions and
- export them for use in WaitReadable/Writable exceptions.
- * io.c: Create versions of EAGAIN, EWOULDBLOCK, EINPROGRESS that
- include WaitReadable and WaitWritable. Add rb_readwrite_sys_fail
- for nonblocking failures using those exceptions. Use that
- function in io_getpartial and io_write_nonblock instead of
- rb_mod_sys_fail
- * ext/openssl/ossl_ssl.c: Add new SSLError subclasses that include
- WaitReadable and WaitWritable. Use those classes for
- write_would_block and read_would_block instead of rb_mod_sys_fail.
- * ext/socket/ancdata.c: Use rb_readwrite_sys_fail instead of
- rb_mod_sys_fail in bsock_sendmsg_internal and
- bsock_recvmsg_internal.
- * ext/socket/init.c: Use rb_readwrite_sys_fail instead of
- rb_mod_sys_fail in rsock_s_recvfrom_nonblock and
- rsock_s_connect_nonblock.
- * ext/socket/socket.c: Use rb_readwrite_sys_fail instead of
- rb_mod_sys_fail in sock_connect_nonblock.
- * include/ruby/ruby.h: Export rb_readwrite_sys_fail for use instead
- of rb_mod_sys_fail. Introduce new constants RB_IO_WAIT_READABLE and
- RB_IO_WAIT_WRITABLE for first arg to rb_readwrite_sys_fail.
+ * process.c (redirect_open): Removed.
-Tue Apr 9 02:44:32 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Apr 9 21:38:20 2015 Tanaka Akira <akr@fsij.org>
- * ext/socket/extconf.rb: $defs needs -D or -U. nothing is added
- otherwize.
+ * internal.h (rb_execarg_parent_end): Declared.
- * ext/socket/extconf.rb: check struct in_addr6, which is defined in
- VC6 instead of in6_addr.
+ * process.c: "spawn" opens files in the parent process.
+ (check_exec_redirect): Add an placeholder for fd in parameters
+ for fd_open.
+ (check_exec_fds_1): Delete fd_open condition.
+ (check_exec_fds): Don't call check_exec_fds_1 with fd_open.
+ (rb_execarg_parent_start): Open files specified as "spawn" options
+ and add "dup2" options.
+ (rb_execarg_parent_end): New function to close opened fds.
+ (run_exec_open): Removed.
+ (rb_execarg_run_options): Don't call run_exec_open.
+ (rb_spawn_internal): Call rb_execarg_parent_end.
- * ext/socket/option.c (optname_to_sym): fix macro name.
+ * io.c (pipe_open): Call rb_execarg_parent_end.
- * ext/socket/constants.c (rsock_cmsg_type_arg): fix macro name.
+ * ext/pty/pty.c (establishShell): Call rb_execarg_parent_end.
-Mon Apr 8 23:57:21 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Apr 9 20:52:31 2015 Tanaka Akira <akr@fsij.org>
- * object.c (id_for_setter): extract common code from const, class
- variable, instance variable setters.
+ * internal.h (rb_execarg_parent_start): Renamed from rb_execarg_fixup.
-Mon Apr 8 23:55:53 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * process.c: Follows the above change.
- * ext/depend (ENCOBJS, TRANSOBJS): use explicit path to ruby.h for
- nmake.
+ * io.c: Ditto.
- * ext/depend (ENCOBJS, TRANSOBJS): fix header dependency, VPATH has
- $(srcdir)/include/ruby but not $(srcdir)/include, so cannot find out
- ruby/ruby.h. use ruby.h instead and ../ruby for include/ruby.h.
+ * ext/pty/pty.c: Ditto.
-Mon Apr 8 20:30:37 2013 Yuki Yugui Sonoda <yugui@google.com>
+Thu Apr 9 20:35:12 2015 Tanaka Akira <akr@fsij.org>
- * ext/depend (ENCOBJS, TRANSOBJS): Add missing dependencies.
+ * process.c (fd_clear_cloexec): Extracted from run_exec_dup2.
-Mon Apr 8 17:19:28 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Apr 9 09:26:47 2015 Eric Wong <e@80x24.org>
- * ext/win32ole/win32ole.c (fole_missing): should check actual argument
- count before accessing.
+ * ccan/list/list.h: sync with ccan upstream
+ [ccan commit c2fbfe5282ba264f3485586e7efa8a5967f2d386]
-Mon Apr 8 16:03:55 2013 Yuki Yugui Sonoda <yugui@google.com>
+Thu Apr 9 08:24:03 2015 Masahiro Tomita <tommy@tmtm.org>
- Fixes a build failure of ext/ripper/ripper.c on building out of place.
- * common.mk (id.h, id.c): Always generated in $(srcdir).
- (ext/ripper/ripper.c): Passes $(PATH_SEPARATOR) too to the sub make.
+ * ext/socket/raddrinfo.c (addrinfo_mload): fix memory leak of
+ addrinfo. [ruby-dev:48923] [Bug #11051]
-Mon Apr 8 12:05:02 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Wed Apr 8 17:45:02 2015 Shannon Skipper <shannonskipper@gmail.com>
- * object.c (rb_obj_ivar_set): call to_str for string only once.
- to_str was called from rb_is_const_name and rb_to_id before.
+ * version.c (Init_version): the version of the engine or
+ interpreter. [Fix GH-858]
- * object.c (rb_mod_const_set): ditto.
+Wed Apr 8 16:15:30 2015 Kenta Murata <mrkn@cookpad.com>
- * object.c (rb_mod_cvar_set): ditto.
+ * bigdecimal: conform to ruby's license. [ruby-core:68466] [Bug #10952]
-Sun Apr 7 13:56:16 2013 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+Wed Apr 8 14:57:06 2015 NAKAMURA Usaku <usa@ruby-lang.org>
- * test/ruby/test_require.rb (TestRequire#test_require_nonascii_path):
- RUBY_PLATFORM should escape as Regexp,
- because RUBY_PLATFORM may contain '.'.
+ * win32/win32.c (rb_w32_wreadlink): should treat junctions like as
+ symlinks.
-Sun Apr 7 10:44:01 2013 Tanaka Akira <akr@fsij.org>
+Wed Apr 8 14:03:47 2015 Koichi Sasada <ko1@atdot.net>
- * include/ruby/defines.h: Simplify the logic to include sys/select.h.
- This fixes a compilation error on Haiku (gcc2 and gcc4).
+ * test/ruby/test_symbol.rb: fix syntax error.
- * configure.in: Use shared linker as $(CC) for Haiku.
- This fixes a build error on Haiku (gcc2).
+Wed Apr 8 13:01:06 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun Apr 7 10:41:30 2013 Tanaka Akira <akr@fsij.org>
+ * hash.c (rb_any_hash): Symbols are compared by the identities
+ always. [ruby-core:68767] [Bug #11035]
- * lib/resolv.rb (MDNSOneShot#sender): Delete an unused variable.
+Tue Apr 7 10:22:51 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
-Sun Apr 7 03:24:36 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * internal.h: fix typo. Patch by @sferik [fix GH-865]
- * addr2line.c: use more generic type:
- * u_char -> unsigned char
- * u_short -> unsigned short
- * u_int -> unsigned int
- * u_long -> unsigned long
- * quad_t -> int64_t
- * u_quad_t -> uint64_t
+Mon Apr 6 22:52:35 2015 Tanaka Akira <akr@fsij.org>
- * addr2line.c (imax): inline is defined by configure.
+ * enum.c: Enumerable#chunk and Enumerable#slice_before no longer takes
+ the initial_state argument. [Feature #10958]
-Sun Apr 7 01:40:39 2013 Akinori MUSHA <knu@iDaemons.org>
+Mon Apr 6 16:09:58 2015 Koichi Sasada <ko1@atdot.net>
- * misc/ruby-electric.el (ruby-electric-hash): New electric
- function that expands a hash sign inside a string or regexp to
- "#{}".
+ * vm_args.c: protect value stack from calling other methods
+ during complex parameter setting process (splat, kw, and so on).
+ [Bug #11027]
- * misc/ruby-electric.el (ruby-electric-curlies): Do not insert
- spaces inside when the curly brace is a delimiter of %r, %w,
- etc.
+ * vm_core.h: remove rb_thread_t::mark_stack_len.
+ With this modification, we don't need to use th->mark_stack_len.
- * misc/ruby-electric.el (ruby-electric-curlies): Insert another
- space before a closing curly brace when
- ruby-electric-newline-before-closing-bracket is nil.
+ * test/ruby/test_keyword.rb: add a test.
-Sun Apr 7 01:01:26 2013 Tanaka Akira <akr@fsij.org>
+ * cont.c (cont_capture): catch up this fix.
- * strftime.c (rb_strftime_with_timespec): Test yday range.
- [ruby-core:44088] [Bug #6247] reported by Ruby Submit.
+ * vm.c (rb_thread_mark): ditto.
-Sat Apr 6 23:46:54 2013 Naohisa Goto <ngotogenome@gmail.com>
+Mon Apr 6 11:26:42 2015 NARUSE, Yui <naruse@ruby-lang.org>
- * configure.in (AC_CHECK_HEADERS): atomic.h for Solaris atomic_ops.
+ * tool/downloader.rb (http_options): prevent content auto decoding
+ because this is a downloader.
- * ruby_atomic.h: Skip using Solaris10 atomic_ops on Solaris 9 or
- earlier if atomic.h is not available. [ruby-dev:47229] [Bug #8228]
+Sun Apr 5 09:55:18 2015 NAKAMURA Usaku <usa@ruby-lang.org>
-Sat Apr 6 23:40:40 2013 Tanaka Akira <akr@fsij.org>
+ * doc/contributing.rdoc: update Maintainers list.
- * lib/resolv.rb: Support LOC resources.
- [ruby-core:23361] [Feature #1436] by JB Smith.
+Sun Apr 5 09:11:00 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
-Sat Apr 6 23:38:09 2013 Naohisa Goto <ngotogenome@gmail.com>
+ * tool/rbinstall.rb: fix bin script permission of bundled gems.
- * addr2line.c: quad_t and u_quad_t is not available on Solaris.
- __inline is not available with old compilers on Solaris.
- [ruby-dev:47229] [Bug #8227]
+Sun Apr 5 08:46:08 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
-Sat Apr 6 23:31:38 2013 Tanaka Akira <akr@fsij.org>
+ * tool/rbinstall.rb: support --program-suffix option.
- * lib/resolv.rb: Add one-shot multicast DNS support.
- [ruby-core:53387] [Feature #8089] by Eric Hodel.
+Sat Apr 4 21:31:18 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
-Sat Apr 6 22:12:01 2013 Tanaka Akira <akr@fsij.org>
+ * lib/rake/*: Gemify rake [fix GH-862][Feature #11025]
+ * test/rake/*: ditto.
+ * tool/rbinstall.rb: ditto.
- * lib/resolv.rb (Resolv::DNS.fetch_resource): New method to obtain
- full result.
- [ruby-dev:43587] [Feature #4788] proposed by Makoto Kishimoto.
+Sat Apr 4 11:30:24 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Apr 6 20:17:51 2013 Tanaka Akira <akr@fsij.org>
+ * string.c (rb_str_setbyte): check the argument first not to
+ discard shared string and code range unnecessarily until
+ actually changing the contents. pointed out by headius.
- * ext/socket/socket.c (rsock_sys_fail_raddrinfo): Renamed from
- rsock_sys_fail_addrinfo.
- (rsock_sys_fail_raddrinfo_or_sockaddr): Renamed from
- rsock_sys_fail_addrinfo_or_sockaddr.
+Sat Apr 4 08:16:43 2015 NARUSE, Yui <naruse@ruby-lang.org>
- * ext/socket/rubysocket.h: Follow the above change.
+ * lib/net/http.rb (edit_path): use path which is absolute ftp url
+ on using ftp_proxy.
-Sat Apr 6 19:24:59 2013 Tanaka Akira <akr@fsij.org>
+Fri Apr 3 11:43:17 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/socket/socket.c (rsock_sys_fail_sockaddr): Takes struct sockaddr
- and socklen_t instead of String object.
- (rsock_sys_fail_addrinfo_or_sockaddr): Follow the above change.
+ * vm_eval.c (vm_call0_cfunc): update invoker arguments.
- * ext/socket/rubysocket.h (rsock_sys_fail_sockaddr): Follow the above
- change.
+ * vm_insnhelper.c (vm_call_cfunc_latter): ditto.
-Sat Apr 6 14:28:23 2013 Tanaka Akira <akr@fsij.org>
+ * vm_insnhelper.c (rb_vm_call_cfunc_push_frame): ditto, and prefix
+ with rb_.
- * ext/socket/rubysocket.h (SockAddrStringValueWithAddrinfo): New macro.
- (rsock_sockaddr_string_value_with_addrinfo): New declaration.
- (rsock_addrinfo_inspect_sockaddr): Ditto.
- (rsock_sys_fail_addrinfo): Ditto.
- (rsock_sys_fail_sockaddr_or_addrinfo): Ditto.
+Thu Apr 2 16:26:59 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/socket/raddrinfo.c (rsock_addrinfo_inspect_sockaddr): Renamed
- from addrinfo_inspect_sockaddr and exported.
- (rsock_sockaddr_string_value_with_addrinfo): New function to obtain
- string and possibly addrinfo object.
+ * common.mk, tool/mkconfig.rb: check the running ruby version in
+ rbconfig.rb with the program version, as RUBY_VERSION has never
+ been affected by --with-ruby-version option.
+ [ruby-core:68639] [Bug #11002]
- * ext/socket/socket.c (rsock_sys_fail_sockaddr): Don't use
- rsock_sys_fail_host_port which is IP dependent. Invoke
- rsock_sys_fail_addrinfo.
- (rsock_sys_fail_addrinfo): New function using
- rsock_addrinfo_inspect_sockaddr.
- (rsock_sys_fail_addrinfo_or_sockaddr): New function.
- (sock_connect): Use SockAddrStringValueWithAddrinfo and
- rsock_sys_fail_addrinfo_or_sockaddr.
- (sock_connect_nonblock): Ditto.
- (sock_bind): Ditto.
+ * configure.in (LIBRUBY_DLDFLAGS): compatibility_version must be
+ valid version numbers, not an arbitrary string.
-Sat Apr 6 13:34:20 2013 Tanaka Akira <akr@fsij.org>
+Wed Apr 1 11:09:15 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/socket/socket.c (rsock_sys_fail_sockaddr): Delete 2nd argument.
+ * dir.c (push_glob): remove indirect links of arguments for
+ trampoline.
- * ext/socket/rubysocket.h (rsock_sys_fail_sockaddr): Follow above
- change.
+Wed Apr 1 09:59:12 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Apr 6 13:13:39 2013 Tanaka Akira <akr@fsij.org>
+ * lib/fileutils.rb (FileUtils#mv): show the exact target path in
+ the error message instead of the destination parent directory
+ name. patched by Joao Britto <jabcalves AT gmail.com> at
+ [ruby-core:68706]. [Bug #11021]
- * ext/socket/socket.c (rsock_sys_fail_path): Use rb_str_inspect only
- for String to avoid SEGV.
+Tue Mar 31 15:25:07 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
-Sat Apr 6 12:40:16 2013 Tanaka Akira <akr@fsij.org>
+ * doc/ChangeLog-0.06_to_0.52: added archived Changelog.
+ [ruby-list:50105]
+ * doc/ChangeLog-0.50_to_0.60: ditto.
+ * doc/ChangeLog-0.60_to_1.1: ditto.
- * ext/socket/rubysocket.h (rsock_sys_fail_host_port): Wrap by NORETURN.
- (rsock_sys_fail_path): Ditto.
- (rsock_sys_fail_sockaddr): Ditto.
+Mon Mar 30 22:02:55 2015 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-Sat Apr 6 11:49:35 2013 Tanaka Akira <akr@fsij.org>
+ * README.EXT.ja: add redirect [ruby-core:68631]
- * ext/socket/socket.c (rsock_sys_fail_path): Use rb_str_inspect if the
- path contains a NUL.
+Mon Mar 30 14:42:41 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Apr 6 11:39:19 2013 Tanaka Akira <akr@fsij.org>
+ * win32/win32.c (fileattr_to_unixmode, winnt_lstat): deal with
+ symbolic link than directory, and set executable bits.
- * ext/socket: Improve socket exception message to show socket address.
- [ruby-core:45617] [Feature #6583] proposed Eric Hodel.
+Mon Mar 30 11:27:54 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/socket/rubysocket.h (rsock_sys_fail_host_port): Declared.
- (rsock_sys_fail_path): Ditto.
- (rsock_sys_fail_sockaddr): Ditto.
+ * io.c (copy_stream_body): use the arguments without conversion if
+ having read, readpartial, and write methods, than conversion by
+ to_path method. [ruby-core:68676] [Bug #11015]
- * ext/socket/udpsocket.c (udp_connect): Use rsock_sys_fail_host_port.
- (udp_bind): Ditto.
- (udp_send): Ditto.
+Sun Mar 29 21:08:37 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
- * ext/socket/init.c (rsock_init_sock): Specify a string for rb_sys_fail
- argument.
- (make_fd_nonblock): Ditto.
- (rsock_s_accept): Ditto.
+ * gc.c (objspace_allrefs_destruct_i): fix a typo.
+ [Bug #11013]
- * ext/socket/ipsocket.c (init_inetsock_internal): Use
- rsock_sys_fail_host_port.
+Sun Mar 29 11:51:32 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/socket/socket.c (rsock_sys_fail_host_port): Defined.
- (rsock_sys_fail_path): Ditto.
- (rsock_sys_fail_sockaddr): Ditto.
- (setup_domain_and_type): Use rsock_sys_fail_sockaddr.
- (sock_connect_nonblock): Ditto.
- (sock_bind): Ditto.
- (sock_gethostname): Specify a string for rb_sys_fail argument.
- (socket_s_ip_address_list): Ditto.
+ * proc.c (proc_binding): replicate env from method object, and
+ allocate the local variable area for the iseq local table.
+ [ruby-core:68673] [Bug #11012]
- * ext/socket/basicsocket.c (bsock_shutdown): Specify a string for
- rb_sys_fail argument.
- (bsock_setsockopt): Use rsock_sys_fail_path.
- (bsock_getsockopt): Ditto.
- (bsock_getpeereid): Refine the argument for rb_sys_fail.
+Sat Mar 28 09:19:41 2015 NARUSE, Yui <naruse@ruby-lang.org>
- * ext/socket/unixsocket.c (rsock_init_unixsock): Use
- rsock_sys_fail_path.
- (unix_path): Ditto.
- (unix_send_io): Ditto.
- (unix_recv_io): Ditto.
- (unix_addr): Ditto.
- (unix_peeraddr): Ditto.
+ * ext/date/extconf.rb: try_cflags("-std=iso9899:1999") [Bug #10906]
+ ruby itself (including numeric.c) is built with strict compile
+ options including -std=iso9899:1999, but ext/date is not.
+ By the way -std=iso9899:1999 is not only a warning option but also
+ changes behavior like MACRO definitions for example INFINITY.
+ gcc on Solaris affect this.
-Sat Apr 6 11:23:18 2013 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+Fri Mar 27 16:34:16 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/ruby/test_require.rb (TestRequire#test_require_nonascii_path):
- fix load path for encoding to run the test as stand-alone.
+ * common.mk: revert using BOOTSTRAPRUBY for enc.mk, as
+ enc/depend uses CONFIG. [ruby-core:68647] [Bug #11004]
-Sat Apr 6 09:54:20 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Mar 26 10:05:13 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
- * pack.c (NATINT_LEN): fix definition order, must be after
- NATINT_PACK.
+ * test/test_observer.rb: add tests for Observable module.
+ [fix GH-859] Patch by @brightbits
-Sat Apr 6 03:11:07 2013 Aaron Patterson <aaron@tenderlovemaking.com>
+Thu Mar 26 06:35:10 2015 Eric Wong <e@80x24.org>
- * ext/psych/lib/psych/visitors/yaml_tree.rb: fix symbol keys in coder
- emission. Thanks @tjwallace
- * test/psych/test_coder.rb: test for change
+ * README.EXT: add redirect [ruby-core:68631]
-Sat Apr 6 02:54:08 2013 Aaron Patterson <aaron@tenderlovemaking.com>
+Wed Mar 25 16:46:49 2015 NARUSE, Yui <naruse@ruby-lang.org>
- * ext/psych/lib/psych/exception.rb: there should be only one exception
- base class. Fixes tenderlove/psych #125
- * ext/psych/lib/psych.rb: require the correct exception class
- * ext/psych/lib/psych/syntax_error.rb: ditto
- * ext/psych/lib/psych/visitors/to_ruby.rb: ditto
+ * ext/socket/extconf.rb: Solaris 11 has struct tcp_info.tcpi_ca_state,
+ but it is a dummy.
-Sat Apr 6 02:30:28 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/socket/option.c: Solaris 11 doesn't have u_intN_t.
- * parse.y (new_defined): remove all extra parentheses, and return
- "nil" for defined? with empty expression.
- [ruby-core:54024] [Bug #8224]
+ * ext/socket/option.c: Solaris 11 needs inspect_tcpi_msec.
-Sat Apr 6 02:06:04 2013 Aaron Patterson <aaron@tenderlovemaking.com>
+ * ext/socket/raddrinfo.c: Solaris 11 has AF_PACKET but doesn't have
+ related macros.
- * ext/psych/lib/psych/visitors/to_ruby.rb: correctly register
- self-referential strings. Fixes tenderlove/psych #135
+Wed Mar 25 17:03:08 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/psych/test_string.rb: appropriate test.
+ * ext/-test-/file/fs.c (get_fsname): try magic number only if
+ f_type is included. [ruby-dev:48913] [Bug #11000]
-Sat Apr 6 01:21:56 2013 Tanaka Akira <akr@fsij.org>
+Wed Mar 25 11:20:40 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/socket/init.c (cloexec_accept): Fix a compile error on
- Debian GNU/kFreeBSD. Consider HAVE_ACCEPT4 is defined
- but SOCK_CLOEXEC is not defined.
+ * benchmark/bm_hash_aref_flo.rb: make more realistic data.
+ [ruby-core:68632] [[Bug #10999]
-Sat Apr 6 00:19:30 2013 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+Wed Mar 25 10:39:06 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
- * load.c (features_index_add): use rb_str_subseq() to specify C string
- position properly to fix require non ascii path.
- [ruby-core:53733] [Bug #8165]
+ * .document: removed needless entries.
- * test/ruby/test_require.rb (TestRequire#test_require_nonascii_path):
- a test for the above.
+Wed Mar 25 08:07:28 2015 Eric Wong <e@80x24.org>
-Fri Apr 5 20:41:49 2013 Tanaka Akira <akr@fsij.org>
+ * doc/extension.rdoc: fix spelling of filename
+ * doc/extension.ja.rdoc: ditto.
- * include/ruby/defines.h (HAVE_TRUE_LONG_LONG): Defined to distinguish
- availability of long long and availability of 64bit integer type.
+Tue Mar 25 06:55:43 2015 Kazuki Tanaka <gogotanaka@ruby-lang.org>
- * pack.c: Use HAVE_TRUE_LONG_LONG to distinguish q! and Q! support.
+ * complex.c (k_inexact_p, k_exact_zero_p): use k_exact_zero_p macro
+ to remove k_inexact_p macro.
-Fri Apr 5 20:19:42 2013 Tanaka Akira <akr@fsij.org>
+ * complex.c (k_exact_one_p): remove unused macro k_exact_one_p.
- * addr2line.c: Include ruby/missing.h to fix compile error on Debian.
+Tue Mar 24 22:23:33 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
-Fri Apr 5 19:39:52 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * doc/extension.rdoc: move from toplevel document and added extname.
+ * doc/extension.ja.rdoc: ditto.
- * compile.c (iseq_compile_each): fix of defined? with empty
- expression. [ruby-core:53999] [Bug #8220]
+Tue Mar 24 22:06:58 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
-Fri Apr 5 13:22:59 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * doc/standard_library.rdoc: strip.
- * ext/curses/curses.c (Init_curses): fix implementation function,
- crmode should be same as cbreak. [ruby-core:54013] [Bug #8222]
+Tue Mar 24 22:06:27 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
-Fri Apr 5 12:06:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * doc/standard_library.rdoc: move Thread to Extensions.
- * ext/curses/hello.rb: Typo in Curses example by Drew Blas
- [Fixes GH-273]
+Tue Mar 24 21:59:10 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
-Thu Apr 4 23:45:13 2013 Tanaka Akira <akr@fsij.org>
+ * doc/contributing.rdoc: update Maintainers list.
- * lib/resolv.rb (bind_random_port): Rescue EACCES for SunOS.
- bind() on SunOS for port 2049 (nfs) and 4045 (lockd) causes
- EACCES with unprivileged process. cf. PRIV_SYS_NFS in privileges(5)
- [ruby-core:48064] [Bug #7183] reported by Frank Meier.
+Tue Mar 24 19:10:24 2015 Koichi Sasada <ko1@atdot.net>
-Thu Apr 4 23:24:45 2013 Tanaka Akira <akr@fsij.org>
+ * gc.c (gc_writebarrier_generational): fix messages for rb_bug().
+ Remove `rb_' prefix.
- * ext/socket/extconf.rb: Remove condition for bcc.
+ * gc.c (gc_writebarrier_incremental): ditto.
-Thu Apr 4 22:53:23 2013 Tanaka Akira <akr@fsij.org>
+Tue Mar 24 17:34:01 2015 Shugo Maeda <shugo@ruby-lang.org>
- * include/ruby/ruby.h (FIX2LONG): Parenthesize the macro body.
+ * README.ja.md: should be chunibyo.
-Thu Apr 4 22:32:32 2013 Tanaka Akira <akr@fsij.org>
+Tue Mar 24 17:30:12 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * time.c (time_strftime): Describe %L and %N truncates digits under
- the specified length.
- [ruby-core:52130] [Bug #7829]
+ * ext/-test-/file/fs.c (get_fsname): return filesystem name by
+ statfs/statvfs. [ruby-core:68624] [Bug #10998]
-Thu Apr 4 22:08:46 2013 Tanaka Akira <akr@fsij.org>
+Tue Mar 24 16:46:02 2015 NAKAMURA Usaku <usa@ruby-lang.org>
- * object.c (rb_mod_cvar_set): Reverted "avoid inadvertent
- symbol creation" to avoid SEGV by
- Class.new.class_variable_set(1, 2).
+ * tool/redmine-backporter.rb: now doesn't required spaces just after
+ `!`.
-Thu Apr 4 20:07:19 2013 Tanaka Akira <akr@fsij.org>
+Mon Mar 23 23:18:27 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/pathname/pathname.c (path_write): New method.
- (path_binwrite): Ditto.
- [ruby-core:49468] [Feature #7378]
+ * dir.c (dir_close): don't raise on double close for consistent to
+ IO#close. [Feature #10950]
-Thu Apr 4 16:51:29 2013 Yuki Yugui Sonoda <yugui@google.com>
+Mon Mar 23 21:22:07 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * thread_pthread.c: Fixes wrong scopes of #if USE_SLEEPY_TIMER_THREAD
- .. #endif sections. This fixes a build error on NativeClient.
+ * win32/file.c (rb_readlink): move from file.c for better buffer
+ allocation and the result encoding.
-Wed Apr 3 17:25:31 2013 Yuki Yugui Sonoda <yugui@google.com>
+ * win32/win32.c (wreadlink, rb_w32_ureadlink): implement readlink().
- * thread_pthread.c (ruby_init_stack): Avoid using uninitialized value.
- stackaddr and size are not set if get_stack() fails.
+Mon Mar 23 14:40:45 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Apr 4 16:55:08 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * win32/win32.c (winnt_stat): stat with following symbolic links.
- * struct.c (make_struct): avoid inadvertent symbol creation.
- (rb_struct_aref): ditto.
- (rb_struct_aset): ditto.
+ * win32/win32.c (winnt_lstat): rename old winnt_stat, which does
+ not follow symbolic links.
-Thu Apr 4 16:54:40 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Mar 23 01:44:35 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * object.c (rb_mod_const_set): avoid inadvertent symbol creation.
- (rb_obj_ivar_set): ditto.
- (rb_mod_cvar_set): ditto.
+ * marshal.c (r_symreal): register symbol names as strings first so
+ that r_symlink always returns valid names.
+ [ruby-core:68587] [Bug #10991]
-Thu Apr 4 15:46:48 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * marshal.c (r_ivar, r_object0): now need to intern symbol names.
- * enum.c (enum_inject): avoid inadvertent symbol creation.
+ * marshal.c (r_object0): compare with symbol names.
-Thu Apr 4 14:37:07 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sun Mar 22 22:07:40 2015 Kouhei Sutou <kou@cozmixng.org>
- * thread.c (rb_thread_aref): avoid inadvertent symbol creation.
- (rb_thread_variable_get): ditto.
- (rb_thread_key_p): ditto.
- (rb_thread_variable_p): ditto.
+ * doc/etc.rd.ja: Fix wrong coding for Emacs.
-Thu Apr 4 11:33:57 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Sun Mar 22 09:53:15 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/openssl/ossl_bn.c (ossl_bn_to_i): Use bn2hex to speed up.
- In general, binary to/from decimal needs extra cost.
+ * tool/make-snapshot (package): add default CONFIGURE name to
+ follow r50039.
-Thu Apr 4 07:24:18 2013 Tanaka Akira <akr@fsij.org>
+ * tool/make-snapshot (package): substitute configuration variables
+ in Makefile.in instead of passing by the command line, and make
+ temporary Makefile instead of a pipe.
- * ext/socket/extconf.rb: Specify arguments to test functions.
+Sun Mar 22 08:09:47 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Apr 4 03:25:09 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * common.mk (ext/ripper/ripper.c, ext/rbconfig/sizeof/sizes.c):
+ strip autogenerated dependencies which have invalid syntax in
+ other than nmake.
- * ext/openssl/ossl_bn.c (ossl_bn_initialize): fix can't create from bn.
+Sat Mar 21 15:01:26 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Apr 3 22:09:25 2013 Tanaka Akira <akr@fsij.org>
+ * ext/io/console/console.c (console_set_winsize): use handle for
+ writing. GetConsoleScreenBufferInfo seems failing on a handle
+ for reading.
- * ext/socket/extconf.rb: Test functions and libraries after headers.
+ * io.c: [DOC] update the example of IO#winsize to use $stdout
+ instead of $stdin, which does not work on Windows. a patch by
+ Jan Lelis <mail AT janlelis.de> at [ruby-core:68574].
+ [Bug #10986]
-Wed Apr 3 21:23:29 2013 Tanaka Akira <akr@fsij.org>
+Fri Mar 20 18:41:03 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * io.c (rb_io_seek_m): Accept :CUR, :END, :SET as "whence" argument.
- (interpret_seek_whence): New function.
- [ruby-dev:45818] [Feature #6643]
+ * proc.c (respond_to_missing_p): check if the receiver responds to
+ the given method by respond_to_missing?.
-Wed Apr 3 20:52:49 2013 Tanaka Akira <akr@fsij.org>
+ * proc.c (mnew_missing): create Method object for method_missing.
+ [ruby-core:68564] [Bug #10985]
- * process.c: Describe the behavior which Ruby invokes a commandline
- directly without shell if the commandline is simple enough.
- [ruby-core:50459] [Bug #7489]
+Fri Mar 20 17:43:18 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
-Wed Apr 3 20:27:37 2013 Tanaka Akira <akr@fsij.org>
+ * .travis.yml: enabled email notification.
- * ext/extmk.rb (extmake): Invoke Logging::log_close in a ensure
- clause.
+Fri Mar 20 17:39:52 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
-Wed Apr 3 18:53:58 2013 Tanaka Akira <akr@fsij.org>
+ * .travis.yml: removed Ruby 1.9.3 build on Travis CI
- * ext/extmk.rb (extmake): Use Logging.open to switch stdout and
- stderr. Delay Logging::log_close until the failure message is
- written. Write the failure message only if log file is opened.
+Fri Mar 20 12:38:36 2015 Koichi Sasada <ko1@atdot.net>
- * lib/mkmf.rb (Logging.log_opened?): New method.
+ * gc.c (obj_info): obj_info() can receive internal objects.
- [ruby-dev:47215] [Bug #8209]
+ * gc.c (check_rvalue_consistency): obj_info() returns const char *.
-Wed Apr 3 17:11:15 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Mar 20 12:14:37 2015 Koichi Sasada <ko1@atdot.net>
- * win32/win32.c (constat_apply): pass through unknown sequence which
- starts with ESC but is not followed by a bracket. [ruby-core:53879]
- [Bug #8201]
+ * gc.c (obj_info): show class name and T_DATA type_name.
-Wed Apr 3 16:35:32 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Mar 19 22:12:46 2015 Koichi Sasada <ko1@atdot.net>
- * bignum.c (rb_big_eq): hide intermediate Bignums not just freeing
- memory. [ruby-core:53893] [Bug #8204]
+ * gc.c (rb_copy_wb_protected_attribute): `dest' can be WB unprotected.
- * object.c (rb_obj_hide): hide an object by clearing klass.
+Thu Mar 19 21:25:25 2015 Koichi Sasada <ko1@atdot.net>
- * bignum.c (rb_big_eq): test as Fixnum if possible and get rid of zero
- length Bignum. [ruby-core:53893] [Bug #8204]
+ * gc.c (rb_copy_wb_protected_attribute): demote `dest' object.
-Tue Apr 2 23:56:03 2013 Tanaka Akira <akr@fsij.org>
+Thu Mar 19 16:18:00 2015 Koichi Sasada <ko1@atdot.net>
- * lib/securerandom.rb (SecureRandom.random_bytes): Use
- OpenSSL::Random.random_add instead of OpenSSL::Random.seed and
- specify 0.0 as the entropy.
- [ruby-core:47308] [Bug #6928]
+ * gc.c, internal.h: export rb_gc_verify_internal_consistency().
-Tue Apr 2 20:24:52 2013 Tanaka Akira <akr@fsij.org>
+Thu Mar 19 16:15:24 2015 Koichi Sasada <ko1@atdot.net>
- * pack.c: Support Q! and q! for long long.
- (natstr): Moved to toplevel. Add q and Q if there is long long type.
- (endstr): Moved to toplevel.
- (NATINT_PACK): Consider long long.
- (NATINT_LEN_Q): New macro.
- (pack_pack): Support Q! and q!.
- (pack_unpack): Ditto.
- [ruby-dev:43970] [Feature #3946]
+ * gc.c (obj_info): show allocation site if GC_DEBUG is not 0.
-Tue Apr 2 19:24:26 2013 Tanaka Akira <akr@fsij.org>
+Thu Mar 19 16:12:01 2015 Koichi Sasada <ko1@atdot.net>
- * ext/-test-/num2int/num2int.c: Define utility methods
- as module methods of Num2int.
+ * gc.c (newobj_of): fix RGENGC_OLD_NEWOBJ_CHECK logics.
+ * skip on incremental marking because not sure what happen :p
+ * rb_gc_writebarrier_remember() is enough to mark children.
- * test/-ext-/num2int/test_num2int.rb: Follow the above change.
+Thu Mar 19 16:08:42 2015 Koichi Sasada <ko1@atdot.net>
-Tue Apr 2 18:49:01 2013 Tanaka Akira <akr@fsij.org>
+ * gc.c (rb_copy_wb_protected_attribute): need demote for old objects.
- * lib/securerandom.rb: Don't use Array#to_s.
- [ruby-core:52058] [Bug #7811] fixed by zzak (Zachary Scott).
+Thu Mar 19 10:31:00 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Apr 2 17:38:20 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * random.c (fill_random_bytes): release the handle in the static
+ variable, not a local variable.
- * re.c (rb_reg_to_s): suppress duplicated charclass warning.
- Regexp#to_s suppress extra its whole regexp options by calling
- onig_new with its source, but it doesn't call rb_reg_preprocess.
- Therefore its Unicode escapes (\u{XXXX}) are given as is,
- and it may cause duplicated charclass warning for example
- "[\u{33}]" (3 is duplicated) or "[\u{a}\u{b}]" (u is duplicated).
- [ruby-core:53649] [Bug #8151]
+Thu Mar 19 06:30:35 2015 Koichi Sasada <ko1@atdot.net>
-Tue Apr 2 16:00:06 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * object.c (rb_obj_clone): do not touch age (FL_PROMOTED[01]) because
+ rb_obj_alloc() can return old object in debug.
- * vm_dump.c (rb_print_backtrace): separate to ease showing C backtrace.
+Thu Mar 19 06:29:28 2015 Koichi Sasada <ko1@atdot.net>
- * internal.h (rb_print_backtrace): ditto.
+ * test/objspace/test_objspace.rb: flag name was changed
+ (long_lived -> uncollectible).
-Tue Apr 2 15:22:09 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Thu Mar 19 05:30:13 2015 Koichi Sasada <ko1@atdot.net>
- * test/ruby/envutil.rb (assert_separately): stop_auto_run of
- Test::Unit::Runner to prevent auto runner use ARGV.
+ * iseq.c (iseq_mark): skip some marking if iseq->orig is available.
- * test/ruby/envutil.rb (assert_separately): add $: to separate process.
+ * iseq.c (rb_iseq_clone): need WB for iseq1->klass = iseq0->klass
+ (done in MEMCPY).
- * test/ruby/envutil.rb (assert_separately): fail if stderr is not
- empty and ignore_stderr is false.
+Thu Mar 19 04:55:53 2015 Koichi Sasada <ko1@atdot.net>
-Tue Apr 2 06:46:59 2013 Tanaka Akira <akr@fsij.org>
+ * internal.h (IMEMO_DEBUG): added.
- * ext/-test-/num2int/num2int.c: Rename utility methods
- to global functions to ease manual experiments.
+ * internal.h: remove unused FL_IMEMO_MARK_V[0-3].
- * test/-ext-/num2int/test_num2int.rb: Follow the above change.
+ * gc.c (rb_imemo_new_debug): added.
-Mon Apr 1 22:26:17 2013 Tanaka Akira <akr@fsij.org>
+ * gc.c (obj_info): show imemo type name.
- * ext/zlib/zlib.c (rb_gzfile_set_mtime): Use NUM2UINT.
- The old logic doesn't work well on LP64 platforms as:
- .. -2**63-1 => error,
- -2**63 .. -2**62-1 => success,
- -2**62 .. -2**31-1 => error,
- -2**31 .. 2**31-1 => success,
- 2**31 .. 2**62-1 => error,
- 2**62 .. 2**64-1 => success,
- 2**64 .. => error.
+Thu Mar 19 04:52:26 2015 Koichi Sasada <ko1@atdot.net>
-Mon Apr 1 22:08:02 2013 Benoit Daloze <eregontp@gmail.com>
+ * gc.c (RGENGC_OLD_NEWOBJ_CHECK): add check mechanism.
- * ext/zlib/zlib.c (Zlib::Inflate.new):
- Fix documentation syntax and naming errors.
- Based on patch by Robin Dupret. Fix GH-271.
+ If RGENGC_OLD_NEWOBJ_CHECK > 0, then create old objects
+ (not new objects) periodically.
-Mon Apr 1 21:22:31 2013 Tanaka Akira <akr@fsij.org>
+ Create one old objects per RGENGC_OLD_NEWOBJ_CHECK objects are
+ created.
- * test/-ext-/num2int/test_num2int.rb: Test small bignums.
+Thu Mar 19 04:46:36 2015 Koichi Sasada <ko1@atdot.net>
-Mon Apr 1 21:10:56 2013 Tanaka Akira <akr@fsij.org>
+ * enum.c (enum_sort_by): add WBs.
- * numeric.c (rb_num2ulong_internal): Don't cast a negative double value
- into unsigned long, which is undefined behavior.
- (rb_num2ull): Don't cast a value bigger than LLONG_MAX into
- long long, which is undefined behavior.
+Thu Mar 19 03:37:52 2015 Koichi Sasada <ko1@atdot.net>
-Mon Apr 1 20:57:57 2013 Tanaka Akira <akr@fsij.org>
+ * gc.c (check_rvalue_consistency): refactoring.
+ * not inline on RGENGC_CHECK_MODE > 0.
+ * check SPECIAL_CONST_P(obj) first.
+ * add a check that remembered_bit is only TRUE when old (age == 3).
- * ext/-test-/num2int/num2int.c: Return string for result, instead of
- printing.
+ * gc.c (RVALUE_DEMOTE): should clear RVALUE_REMEMBERED bit.
- * test/-ext-/num2int/test_num2int.rb: updated to follow above change.
+ remembered_bit should be TRUE only for old (age == 3) objects.
-Mon Apr 1 20:08:07 2013 Tanaka Akira <akr@fsij.org>
+ Actually there are no effect because demoted objects will be
+ uncollectible WB unprotected objects (marked at the beginning of
+ every minor GC).
- * numeric.c (rb_num2long): Don't use SIGNED_VALUE uselessly.
- (check_int): Ditto.
- (check_short): Ditto.
- (rb_num2fix): Ditto.
- (rb_num2ulong_internal): Add a cast.
+Thu Mar 19 02:52:48 2015 Koichi Sasada <ko1@atdot.net>
-Mon Apr 1 18:41:35 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * gc.c: rename terminologies.
+ * long_lived -> uncollectible:
+ because this bitmap does not mean "long lived objects in past",
+ but means "prohibit collection these objects until next major GC".
- * configure.in: skip autoconf 2.64 and 2.66, 2.67 seems short-lived
- but stick on it for Debian Squeeze.
+ Uncollectible objects consist of two types objects, one is old
+ objects (WB protected objects which age == 3) and another is
+ uncollectible WB unprotected objects which are referred from old
+ objects
-Mon Apr 1 14:22:52 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * remembered_wb_unprotected_objects ->
+ uncollectible_wb_unprotected_objects:
+ because uncollectible objects does not mean remembered objects.
- * configure.in: check clang version by predefined macro values.
- [Bug #8192]
+Wed Mar 18 17:21:12 2015 Koichi Sasada <ko1@atdot.net>
-Mon Apr 1 12:05:15 2013 Tanaka Akira <akr@fsij.org>
+ * gc.c (gc_writebarrier_generational): add an alternative write
+ barrier (WB) implementation.
+ When finding reference from [Old obj] to [New obj] by WB, current
+ implementation marks [Old obj] as remembered old objects and marks
+ children of [Old obj] at the beginning of marking.
- * numeric.c (check_uint): Take the 1st argument as unsigned long,
- instead of VALUE. Refine the validity test conditions.
- (check_ushort): Ditto.
+ Added (but disabled) code changes current behaviour. This fix promote
+ [New obj] to old and marks as a remembered old object. We can assume
+ "new objects referred from old objects are maybe long-lived old
+ objects".
-Mon Apr 1 07:15:03 2013 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
+ Disadvantage of added algorithm is we may promote unwilling
+ short-lived objects. For example, consider many new objects push and
+ pop to an old stack object. All of new objects (short-lived objects)
+ promote to old objects unexpectedly.
- * configure.in: use quadrigraph to put '[' or ']'. [Bug #8192]
+ To compare these behaviour, I add this new code (but disabled it).
-Mon Apr 1 04:16:41 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Wed Mar 18 17:14:39 2015 Koichi Sasada <ko1@atdot.net>
- * configure.in: kick old clang. [ruby-dev:47204] [Bug #8192]
+ * gc.c (RVALUE_PROMOTE_RAW): rename to RVALUE_OLD_LONG_LIVED_SET()
+ to make clear.
-Mon Apr 1 01:12:46 2013 Tanaka Akira <akr@fsij.org>
+Wed Mar 18 17:10:01 2015 Koichi Sasada <ko1@atdot.net>
- * include/ruby/ruby.h (FIX2ULONG): Make it consistent with NUM2ULONG.
+ * gc.c (check_rvalue_consistency): do not need to check is_sweeping().
- * ext/-test-/num2int/num2int.c: Add utility methods for FIX2XXX tests.
+Wed Mar 18 14:13:22 2015 Koichi Sasada <ko1@atdot.net>
- * test/-ext-/num2int/test_num2int.rb: Add tests for FIX2XXX.
+ * benchmark/bm_vm1_gc_wb_ary.rb: run GC to finish "marking" phase.
-Sun Mar 31 17:17:56 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * benchmark/bm_vm1_gc_wb_obj.rb: ditto.
- * proc.c (rb_mod_define_method): consider visibility in define_method.
- patch by mashiro <mail AT mashiro.org>. fix GH-268.
+ * benchmark/bm_vm1_gc_wb_ary_promoted.rb: add parameter
+ full_mark: false to invoke only minor GC.
-Sun Mar 31 15:40:30 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * benchmark/bm_vm1_gc_wb_obj_promoted.rb: ditto.
- * win32/configure.bat: try to fix option arguments split by commas and
- equals here. this batch file no longer run with old command.com.
+Wed Mar 18 12:07:36 2015 Koichi Sasada <ko1@atdot.net>
- * tool/mkconfig.rb: no hacks for cmd.exe.
+ * string.c: add a comment about RSTRING_FSTR.
-Sun Mar 31 13:47:04 2013 Tanaka Akira <akr@fsij.org>
+Wed Mar 18 12:01:53 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * numeric.c (rb_num2ulong_internal): New function similar to
- rb_num2ulong but integer wrap around flag is also returned.
- (rb_num2ulong): Use rb_num2ulong_internal.
- (rb_num2uint): Use rb_num2ulong_internal and the wrap around flag is
- used instead of negative_int_p(val).
- (rb_num2ushort): ditto.
+ * hash.c (rb_any_hash): use same hash values with Float#hash so
+ that -0.0 and +0.0 will be identical.
+ [ruby-core:68541] [Bug #10979]
-Sun Mar 31 06:27:17 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Mar 18 05:34:32 2015 Koichi Sasada <ko1@atdot.net>
- * class.c (HAVE_METACLASS_P): should check FL_SINGLETON flag before get
- instance variable to get rid of wrong warning about __attached__.
- [ruby-core:53839] [Bug #8188]
+ * string.c: introduce STR_FAKESTR to show string is FAKESTR or not.
-Sat Mar 30 14:11:28 2013 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+ * string.c (STR_SET_SHARED): ignore FAKESTR because only Ruby objects
+ can use write barrier.
- * bcc32: removed. agreed at
- http://bugs.ruby-lang.org/projects/ruby/wiki/DevelopersMeeting20130223Japan
+Tue Mar 17 18:59:16 2015 Koichi Sasada <ko1@atdot.net>
-Sat Mar 30 03:58:00 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * include/ruby/ruby.h: use rb_gc_writebrrier() simply.
+ For incremental GC, we need to get a pointer to the objspace.
+ We can share this pointer for the following WB process.
+ And considering icache hit ratio, process in the GC.
- * win32/file.c (code_page): use cp1252 instead of cp20127 as US-ASCII.
- fix [ruby-core:53079] [Bug #7996]
- reported and patched by mmeltner (Michael Meltner).
+ * gc.c (rb_gc_writebarrier): added.
-Sat Mar 30 03:49:21 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * gc.c (gc_writebarrier_generational, gc_writebarrier_incremental):
+ make them NOINLINE because inlining them into rb_gc_writebarrier()
+ makes a prologue code of rb_gc_writebarrier() longer (storing callee
+ save registers).
- * win32/win32.c (wrename): use MoveFileExW instead of MoveFileW,
- because the latter fails on cross device file move of some
- environments.
- fix [ruby-core:53492] [Bug #8109]
- reported by mitchellh (Mitchell Hashimoto).
+ This patch improve the performance of WB on micro-benchmarks.
-Fri Mar 29 22:09:46 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ name ruby 2.1 trunk modified
+ vm1_gc_wb_ary* 0.511 0.632 0.532
+ vm1_gc_wb_ary_promoted* 0.578 0.701 0.674
+ vm1_gc_wb_obj* 0.419 0.575 0.492
+ vm1_gc_wb_obj_promoted* 0.537 0.664 0.618
+ (sec)
- * thread.c (rb_mutex_synchronize_m): yield no block params. patch by
- splattael (Peter Suschlik) in [ruby-core:53773] [Bug #8097].
- fix GH-266.
+Tue Mar 17 18:51:43 2015 Koichi Sasada <ko1@atdot.net>
-Fri Mar 29 16:51:39 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * benchmark/bm_vm1_gc_wb_ary(_promoted).rb: separate fastpath and
+ slowpath for WB.
- * io.c (argf_next_argv): set init flag if succeeded to forward, after
- skipping.
+ Before this change bm_vm1_gc_wb_ary.rb tried to check the performance
+ for WB slowpath (making a reference from oldobj to newobj). However,
+ from Ruby 2.2, 3 GCs are needed to promote new objects because
+ only 3 age objects are promoted objects.
- * io.c (argf_block_call_i, argf_block_call): no more forwarding if
- forwarded after skipping. [ruby-list:49185]
+ To compare fastpath and slowpath, introduce new "promoted" version
+ benchmark.
- * io.c (argf_close): deal with init flag.
+ bm_vm1_gc_wb_ary.rb is for fastpath and
+ bm_vm1_gc_wb_ary_promoted.rb is for slowpath.
- * io.c (argf_block_call_i, argf_block_call): forward next file if
- skipped while iteration, to get rid of IOError. [ruby-list:49185]
+ * benchmark/bm_vm1_gc_wb_obj(_promoted).rb: ditto.
-Fri Mar 29 11:09:48 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Mar 17 17:23:11 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/mkmf.rb (configuration): not include all CFLAGS in CXXFLAGS, to
- use different set than C for C++. [ruby-core:45273] [Bug #6504]
+ * dir.c (glob_helper): distinguish not-yet-stated and DT_UNKNOWN
+ by readdir, and traverse recursively for the former. Linux
+ readdir returns DT_UNKNOWN on some filesystems, e.g., smbfs,
+ iso9660.
-Fri Mar 29 10:24:10 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Mar 16 17:43:21 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
- * include/ruby/io.h: undef POSIX compliant names on AIX, which are no
- longer needed. patch suggested by edelsohn (David Edelsohn) in
- [ruby-core:53815]. [Bug #8174]
+ * lib/webrick/server.rb: Fix regression bug in WEBrick's
+ :DoNotReverseLookup config option implementation.
+ [fix GH-731] Patch by @vais
+ * test/webrick/test_do_not_reverse_lookup.rb: ditto.
-Fri Mar 29 06:39:42 2013 Tanaka Akira <akr@fsij.org>
+Sat Mar 14 20:05:23 2015 Kazuki Tanaka <gogotanaka@ruby-lang.org>
- * numeric.c (rb_num2ull): Cast double to unsigned LONG_LONG via
- LONG_LONG instead of double to unsigned LONG_LONG directly.
- This is a challenge to fix a test_num2ull(TestNum2int)
- failure (NUM2ULL(-1.0) should be "18446744073709551615" but was "0")
- on Mac OS X with 32bit clang.
- http://a.mrkn.jp/~mrkn/chkbuild/mountain_lion/ruby-trunk-m32-o0/log/20130328T191100Z.diff.html.gz
+ * math.c (math_gamma): optimization for passed small integer.
-Fri Mar 29 00:54:54 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Mar 14 18:07:23 2015 Kazuki Tanaka <gogotanaka@ruby-lang.org>
- * lib/mkmf.rb (MAIN_DOES_NOTHING): ensure symbols for tests to be
- preserved. [ruby-core:53745] [Bug #8169]
+ * enum.c: [DOC] Fixes Enumerable#member? documentation
+ [fix GH-756][ci skip] Patch by @shamanime
-Thu Mar 28 23:11:25 2013 Tanaka Akira <akr@fsij.org>
+Sat Mar 14 12:23:53 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/resolv.rb: Test Windows platform by detecting LoadError when
- require 'win32/resolv' suggested by Nobuyoshi Nakada [ruby-core:53389].
- [ruby-core:53388] [Feature #8090] Reported by Charles Nutter.
+ * dir.c (glob_helper): use d_type to reduce lstat system calls.
-Thu Mar 28 23:10:10 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * win32/dir.h (struct direct): add d_type instead of d_isdir and
+ d_isrep. SYMLINKD is unreliable, since the target can be
+ replaced after a link was created.
- * include/ruby/io.h: rename SVR3,4 member names as POSIX compliant,
- to get rid of conflict on AIX. [ruby-core:53765] [Bug #8174]
+ * win32/win32.c (readdir_internal): set d_type.
-Thu Mar 28 18:22:21 2013 Tanaka Akira <akr@fsij.org>
+Sat Mar 14 02:14:50 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/-ext-/num2int/test_num2int.rb: extract
- assert_num2i_success_internal and assert_num2i_error_internal and
- provide assertion messages as "NUM2XXX(NNN)".
+ * parse.y (primary): empty parentheses at cmdarg can be null.
+ [ruby-core:68477] [Bug #10957]
-Thu Mar 28 07:05:25 2013 Tanaka Akira <akr@fsij.org>
+Fri Mar 13 15:04:36 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * include/ruby/intern.h: Delete redundant inclusions caused by
- AC_INCLUDES_DEFAULT in defines.h.
+ * ext/stringio/stringio.c (strio_close): don't raise on double
+ close for consistent to IO#close.
- * include/ruby/defines.h: Ditto.
+Fri Mar 13 15:03:20 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * include/ruby/ruby.h: Ditto.
+ * io.c (rb_io_close_read, rb_io_close_write): don't raise after
+ close same as IO#close.
- * include/ruby/st.h: Ditto.
+Fri Mar 13 12:29:07 2015 Tanaka Akira <akr@fsij.org>
-Thu Mar 28 06:51:31 2013 Tanaka Akira <akr@fsij.org>
+ * test/readline/test_readline.rb: Restore environment variables:
+ COLUMNS LINES
- * include/ruby/defines.h: Fix a compilation error on NetBSD,
- "type of formal parameter 1 is incomplete" for the rb_thread_wait_for
- invocation in rb_file_flock, by including header files as
- AC_INCLUDES_DEFAULT of autoconf.
+Fri Mar 13 11:37:46 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Mar 27 22:09:14 2013 Tanaka Akira <akr@fsij.org>
+ * ext/fiddle/extconf.rb: needs --enable-shared when linked to
+ libruby or fiddle.so. since --with-static-linked-ext does no
+ longer link extensions to ruby program with --enable-shared, the
+ only combination needs --enable-static is --disable-shared and
+ --with-static-linked-ext. [ruby-dev:48901] [Bug #10960]
- * numeric.c (LONG_MIN_MINUS_ONE_IS_LESS_THAN): New macro.
- (LLONG_MIN_MINUS_ONE_IS_LESS_THAN): Ditto.
- (rb_num2long): Use LONG_MIN_MINUS_ONE_IS_LESS_THAN.
- (rb_num2ulong): Ditto.
- (rb_num2ll): Use LLONG_MIN_MINUS_ONE_IS_LESS_THAN.
- (rb_num2ull): Ditto.
+Fri Mar 13 07:02:20 2015 Eric Wong <e@80x24.org>
- * test/-ext-/num2int/test_num2int.rb (assert_num2i_success): Test the
- value converted into a Float if Float can represent the value
- exactly.
- (assert_num2i_error): Ditto.
+ * ext/socket/init.c (rsock_s_accept_nonblock): use rb_hash_lookup2
+ * ext/openssl/ossl_ssl.c (get_no_exception): new function
+ (ossl_ssl_accept_nonblock): use get_no_exception
+ (ossl_ssl_read_internal): ditto
+ (ossl_ssl_write_nonblock): ditto
+ [ruby-core:68511]
-Wed Mar 27 20:59:47 2013 Tanaka Akira <akr@fsij.org>
+Fri Mar 13 07:01:38 2015 Eric Wong <e@80x24.org>
- * test/-ext-/num2int/test_num2int.rb (assert_num2i_success): New
- utility method.
- (assert_num2i_error): Ditto.
+ * ext/openssl/ossl_ssl.c: predefine wait_*able symbols
-Wed Mar 27 20:37:59 2013 Tanaka Akira <akr@fsij.org>
+Thu Mar 12 22:59:53 2015 Tanaka Akira <akr@fsij.org>
- * time.c (num_exact): Use to_r method only if to_int method is
- available.
- [ruby-core:53764] [Bug #8173] Reported by Hiro Asari.
+ * test/lib/leakchecker.rb: Check environment variables.
-Wed Mar 27 12:07:40 2013 Tanaka Akira <akr@fsij.org>
+Thu Mar 12 05:54:27 2015 Eric Wong <e@80x24.org>
- * test/-ext-/num2int/test_num2int.rb (test_num2ll): test LLONG_MIN,
- not LONG_MIN.
+ * ext/socket/init.c (rsock_s_accept_nonblock):
+ support exception: false
+ [ruby-core:66385] [Feature #10532]
+ * ext/socket/init.c (rsock_init_socket_init): define new symbols
+ * ext/socket/rubysocket.h: adjust prototype
+ * ext/socket/socket.c (sock_accept_nonblock): support exception: false
+ * ext/openssl/ossl_ssl.c (ossl_ssl_accept_nonblock): ditto
+ * ext/socket/socket.c (Init_socket): adjust accept_nonblock definition
+ * ext/openssl/ossl_ssl.c (Init_ossl_ssl): ditto
+ * ext/socket/tcpserver.c (rsock_init_tcpserver): ditto
+ * ext/socket/unixserver.c (rsock_init_unixserver): ditto
+ * ext/socket/tcpserver.c (tcp_accept_nonblock): adjust
+ rsock_s_accept_nonblock call
+ * ext/socket/unixserver.c (unix_accept_nonblock): ditto
+ * ext/openssl/ossl_ssl.c (ossl_start_ssl): support no_exception
+ * ext/openssl/ossl_ssl.c (ossl_ssl_connect): adjust ossl_start_ssl call
+ * ext/openssl/ossl_ssl.c (ossl_ssl_connect_nonblock): ditto
+ * ext/openssl/ossl_ssl.c (ossl_ssl_accept): ditto
+ * test/socket/test_nonblock.rb (test_accept_nonblock): test for
+ "exception :false"
+ * test/socket/test_tcp.rb (test_accept_nonblock): new test
+ * test/socket/test_unix.rb (test_accept_nonblock): ditto
+ * test/openssl/test_pair.rb (test_accept_nonblock_no_exception): ditto
-Wed Mar 27 12:02:45 2013 Tanaka Akira <akr@fsij.org>
+Thu Mar 12 10:53:06 2015 Koichi Sasada <ko1@atdot.net>
- * internal.h (TIMET_MAX_PLUS_ONE): definition simplified.
+ * internal.h, node.h: move a definition of `struct rb_global_entry'
+ and related functions from node.h to internal.h.
-Wed Mar 27 06:39:41 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * variable.c: remove unused include pragma.
- * lib/mkmf.rb (MAIN_DOES_NOTHING): force to refer symbols for tests
- to be preserved. [ruby-core:53745] [Bug #8169]
+ * common.mk: remove unused dependency.
-Wed Mar 27 05:15:37 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Mar 12 10:32:39 2015 Koichi Sasada <ko1@atdot.net>
- * configure.in (RUBY_REPLACE_TYPE): define SIGNEDNESS_OF_type same as
- check_signedness of mkmf.rb.
+ * common.mk: remove unused dependency.
- * internal.h (TIMET_MAX, TIMET_MIN, TIMET_MAX_PLUS_ONE): use
- SIGNEDNESS_OF_TIME_T.
+Thu Mar 12 08:20:14 2015 Koichi Sasada <ko1@atdot.net>
-Wed Mar 27 00:28:45 2013 Tanaka Akira <akr@fsij.org>
+ * load.c: removed unused header file "node.h".
- * internal.h (TIMET_MAX_PLUS_ONE): Defined.
+ * method.h: ditto.
- * thread.c (double2timeval): Saturate out-of-range values.
+ * symbol.c: ditto.
-Tue Mar 26 23:41:18 2013 Tanaka Akira <akr@fsij.org>
+Thu Mar 12 08:14:48 2015 Koichi Sasada <ko1@atdot.net>
- * internal.h: Define TIMET_MAX and TIMET_MIN here.
+ * gc.c: RGENGC_CHECK_MODE should be 0.
- * time.c: Remove TIMET_MAX and TIMET_MIN definitions.
+Thu Mar 12 07:44:17 2015 Koichi Sasada <ko1@atdot.net>
- * thread.c: Ditto.
+ * internal.h: use T_IMEMO to represent `struct MEMO' value.
+ memo->v1 and memo->v2 is WB protected values.
+ So use MEMO_V1/V2_SET() macros to set these values.
+ memo->u3 is ambiguous (sometimes a VALUE, sometimes an integer
+ value), so use gc_mark_maybe() in gc.c to mark it.
- * thread_pthread.c: Remove TIMET_MAX definition.
+ Rename NEW_MEMO() to MEMO_NEW().
- * thread_win32.c: Ditto.
+ Move MEMO_FOR and NEW_MEMO_FOR macros from node.h.
-Tue Mar 26 22:31:10 2013 Tanaka Akira <akr@fsij.org>
+ Export a rb_imemo_new() function for ext/ripper.
- * ext/socket/socket.c (sockaddr_len): return the shortest length for
- unknown socket address.
+ * node.h: remove NODE_MEMO.
-Tue Mar 26 22:14:46 2013 Tanaka Akira <akr@fsij.org>
+ * enum.c: catch up these change.
- * thread.c (double2timeval): convert the infinity to TIME_MAX to avoid
- SEGV by Thread.new {}.join(Float::INFINITY) on
- Debian GNU/Linux (amd64).
+ * enumerator.c: ditto.
-Mon Mar 25 07:09:20 2013 Eric Hodel <drbrain@segment7.net>
+ * load.c: ditto.
- * lib/rinda/tuplespace.rb: Only return tuple entry once on move,
- either through port or regular return, not both. This results in a
- 120% speedup when combined with #8125. Patch by Joel VanderWerf.
- [ruby-trunk - Feature #8119]
+ * ext/objspace/objspace.c (count_nodes): ditto.
-Mon Mar 25 06:59:01 2013 Eric Hodel <drbrain@segment7.net>
+ * gc.c (gc_mark_children): mark imemo_memo type.
- * test/rinda/test_rinda.rb: Skip IPv6 tests if no IPv6 addresses
- exist. Skip fork-dependent test if fork is not available.
- [ruby-trunk - Bug #8159]
+ * parse.y (new_args_gen): use T_IMEMO.
+ (I'm not sure it is working correctly...)
-Sun Mar 24 10:38:24 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+Wed Mar 11 22:36:34 2015 Koichi Sasada <ko1@atdot.net>
- * addr2line.c (putce): suppress unused return value warning.
+ * eval.c (frame_called_id): it should use vm_ifunc type.
-Mon Mar 25 02:01:03 2013 Narihiro Nakamura <authornari@gmail.com>
+ * eval.c (frame_func_id): ditto.
- * proc.c (bm_free): need to clean up the mark flag of a free and
- unlinked method entry. [Bug #8100] [ruby-core:53439]
+Wed Mar 11 22:27:05 2015 Koichi Sasada <ko1@atdot.net>
-Sun Mar 24 22:13:51 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * node.h: remove NODE_IFUNC, NEW_IFUNC.
- * string.c (rb_str_rpartition): revert r39903, and convert byte offset
- to char offset; the return value of rb_reg_search is byte offset,
- but other than it of rb_str_rpartition expects char offset.
- [Bug #8138] [ruby-dev:47183]
+ * internal.h: use T_IMEMO for IFUNC.
-Sun Mar 24 18:29:46 2013 Akinori MUSHA <knu@iDaemons.org>
+ rename `struct IFUNC' to `struct vm_ifunc' and move the definition
+ from vm_insnhelper.h. Add imemo_ifunc.
- * string.c (rb_str_rpartition): Fix String#rpartition(/re/)
- against a multibyte string. [Bug #8138] [ruby-dev:47183]
+ * gc.c (gc_mark_children): mark imemo_ifunc type T_IMEMO object.
-Sun Mar 24 13:42:24 2013 Narihiro Nakamura <authornari@gmail.com>
+ * compile.c: catch up these changes.
- * gc.c (GC_ENABLE_LAZY_SWEEP): new macro to switch lazy sweeping
- for debugging. [Feature #8024] [ruby-dev:47135]
+ * proc.c: ditto.
-Sun Mar 24 12:55:47 2013 Narihiro Nakamura <authornari@gmail.com>
+ * vm_core.h (RUBY_VM_IFUNC_P): ditto.
- * gc.c: We have no chance to expand the heap when lazy sweeping is
- restricted. So collecting is often invoked if there is not
- enough free space in the heap. Try to expand heap when this is
- the case.
+ * vm_eval.c (rb_iterate): ditto.
-Sun Mar 24 11:03:31 2013 Tanaka Akira <akr@fsij.org>
+ * vm_insnhelper.c: ditto.
- * test/ruby/test_require.rb: Remove temporally files in the tests.
+ * ext/objspace/objspace.c: ditto.
- * test/ruby/test_rubyoptions.rb: Ditto.
+Wed Mar 11 21:53:43 2015 Koichi Sasada <ko1@atdot.net>
- * test/logger/test_logger.rb: Ditto.
+ * internal.h, eval_intern.h: move CREF accessors.
- * test/psych/test_psych.rb: Ditto.
+ List IMEMO supported types in internal.h.
- * test/readline/test_readline.rb: Ditto.
+Wed Mar 11 21:45:36 2015 Koichi Sasada <ko1@atdot.net>
- * test/syslog/test_syslog_logger.rb: Ditto.
+ * vm_insnhelper.h: use T_IMEMO to create THROW_DATA.
- * test/webrick/test_httpauth.rb: Ditto.
+ Add THROW_DATA_NEW().
- * test/zlib/test_zlib.rb: Ditto.
+ * internal.h: move definition of `struct THROW_DATA'
+ from vm_insnhelper.h to internal.h.
-Sun Mar 24 05:36:29 2013 Eric Hodel <drbrain@segment7.net>
+ Rename `THROW_DATA' to `vm_throw_data'.
- * lib/rinda/ring.rb: Added documentation for multicast support.
+ * eval_intern.h (THROW_DATA_P): move to internal.h.
+ THROW_DATA is no longer T_NODE, so check T_IMEMO.
- * NEWS: Point to above documentation.
+ * gc.c (gc_mark_children): mark THROW_DATA.
-Sun Mar 24 05:32:39 2013 Eric Hodel <drbrain@segment7.net>
+ * vm.c: catch up these changes.
- * test/rinda/test_rinda.rb: Restore tests commented out while fixing
- test slowdown bug before r39895.
+ * vm_eval.c: ditto.
-Sun Mar 24 05:03:36 2013 Eric Hodel <drbrain@segment7.net>
+ * vm_insnhelper.c: ditto.
- * lib/rinda/ring.rb: Add multicast support to Rinda::RingFinger and
- Rinda::RingServer. [ruby-trunk - Bug #8073]
- * test/rinda/test_rinda.rb: Test for the above.
+Wed Mar 11 21:21:56 2015 Koichi Sasada <ko1@atdot.net>
- * NEWS: Update with Rinda multicast support
+ * vm_insnhelper.c: use T_IMEMO to create SVAR.
-Sun Mar 24 04:13:27 2013 Eric Hodel <drbrain@segment7.net>
+ * internal.h, vm_insnhelper.h: move definition `struct SVAR'
+ from vm_insnhelper.h to internal.h. And rename it to struct vm_svar.
- * test/rinda/test_rinda.rb: Fixed test failures in r39890 and r39891
- due to stopping DRb service.
+ new imemo_type imemo_svar is added.
-Sun Mar 24 03:34:02 2013 Eric Hodel <drbrain@segment7.net>
+ * gc.c (gc_mark_children): mark imemo_svar.
- * lib/rinda/rinda.rb: Fixed loss of tuple when remote is alive but the
- call stack was unwound. Patch by Joel VanderWerf.
- [ruby-trunk - Bug #8125]
- * test/rinda/test_rinda.rb: Test for the above.
+ * node.c (rb_gc_mark_node): remove useless marking.
-Sun Mar 24 02:14:53 2013 Tanaka Akira <akr@fsij.org>
+Wed Mar 11 19:35:46 2015 Koichi Sasada <ko1@atdot.net>
- * test/mkmf/test_have_macro.rb: remove temporally files in the tests.
+ * include/ruby/ruby.h: introduce new type T_IMEMO.
+ T_IMEMO is Internal Memo type, internal use only.
+ T_IMEMO has same purpose of NODE_MEMO.
-Sat Mar 23 23:50:04 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ To insert T_IMEMO, type numbers are modified a little.
- * addr2line.c (kprintf): added from FreeBSD libstand's printf.
- this is consided as async signal safe function.
+ * internal.h: define struct RIMemo. Each RIMemo objects
+ has imemo_type. We can observe it by the imemo_type() function.
- * addr2line.c (rb_dump_backtrace_with_lines): use kfprintf.
- [Bug #8144] [ruby-core:53632]
+ * gc.c (rb_imemo_new): added.
-Sat Mar 23 23:28:00 2013 Kenta Murata <mrkn@mrkn.jp>
+ * node.h: remove NODE_CREF and NEW_CREF().
- * ext/bigdecimal/bigdecimal.c (BigDecimal_divide): Use Qnil and NIL_P
- instead of (VALUE)0 as a return value.
+ * node.c (rb_gc_mark_node): ditto.
- * ext/bigdecimal/bigdecimal.c (BigDecimal_div): ditto.
+ * vm.c (vm_cref_new): use rb_imem_new().
- * ext/bigdecimal/bigdecimal.c (BigDecimal_divremain): ditto.
+ * vm_eval.c: ditto.
- * ext/bigdecimal/bigdecimal.c (BigDecimal_remainder): ditto.
+ * vm_insnhelper.c: use RIMemo objects for CREF.
-Sat Mar 23 17:39:49 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/objspace/objspace.c: support T_IMEMO.
- * vm_eval.c (check_funcall_respond_to): preserve passed_block, which
- is modified in vm_call0_body() via vm_call0(), and caused a bug of
- rb_check_funcall() by false negative result of rb_block_given_p().
- re-fix [ruby-core:53650] [Bug #8153].
- [ruby-core:53653] [Bug #8154]
+Wed Mar 11 17:03:20 2015 Koichi Sasada <ko1@atdot.net>
-Fri Mar 22 17:48:34 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * gc.c: fix memory leak by prepend method.
- * lib/forwardable.rb (Forwardable::FILE_REGEXP): create regexp object
- outside sources for eval, to reduce allocations in def_delegators
- wrappers. //o option does not make each regexps shared. patch by
- tmm1 (Aman Gupta) in [ruby-core:53620] [Bug #8143].
+ It is easy to reproduce with such script:
-Fri Mar 22 17:38:42 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ module M; def bar; end; end
+ loop{
+ Class.new do
+ def foo; end
+ prepend M
+ end
+ }
- * load.c (rb_feature_p), vm_core.h (rb_vm_struct): turn
- loaded_features_index into st_table. patches by tmm1 (Aman Gupta)
- in [ruby-core:53251] and [ruby-core:53274] [Bug #8048]
+ * gc.c (obj_free): free T_ICLASS::m_tbl if it is created by prepend.
+ To recognize it, check RICLASS_IS_ORIGIN flag.
-Fri Mar 22 10:29:00 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * gc.c (gc_mark_children): T_ICLASS objects only need to mark
+ T_ICLASS::m_tbl if RICLASS_IS_ORIGIN is set.
- * ext/bigdecimal/bigdecimal.c: Fix style.
+ * gc.c (obj_memsize_of): count T_ICLASS if RICLASS_IS_ORIGIN is set.
-Fri Mar 22 05:30:49 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * internal.h (RCLASS_SET_ORIGIN): add to set RCLASS_SET_ORIGIN.
- * parse.y (ambiguous_operator): refine warning message, since this
- warning is shown after literal too.
+ TODO: The word `origin' seems not good name. We need to invent
+ another good name.
-Fri Mar 22 04:51:14 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * class.c: use RCLASS_SET_ORIGIN().
- * vm_insnhelper.c (vm_callee_setup_keyword_arg): should check required
- keyword arguments even if rest hash is defined. [ruby-core:53608]
- [Bug #8139]
+ * class.c (class_alloc): zero clear rb_classext_t.
-Fri Mar 22 01:00:17 2013 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+Wed Mar 11 13:28:49 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * process.c (rb_execarg_addopt, run_exec_pgroup): use rb_pid_t
- instead of pid_t.
+ * configure.in: check also procstat_getvmmap, which is not
+ available on FreeBSD 9. [ruby-core:68468] [Bug #10954]
- * ext/pty/pty.c (raise_from_check, pty_check): ditto.
+ * vm_dump.c (procstat_vm): use kinfo_getvmmap instead if
+ procstat_getvmmap is not available.
-Fri Mar 22 00:04:15 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Wed Mar 11 09:15:21 2015 Koichi Sasada <ko1@atdot.net>
- * addr2line.c (rb_dump_backtrace_with_lines): output line at once.
+ * internal.h: define struct MEMO.
-Thu Mar 21 23:17:08 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * enum.c: use MEMO.
- * thread.c (ruby_kill): get rid of deadlock on signal 0.
- [ruby-dev:47182] [Bug #8137]
+ * enumerator.c: ditto.
-Thu Mar 21 22:39:46 2013 Naohisa Goto <ngotogenome@gmail.com>
+ * load.c: ditto.
- * marshal.c (marshal_dump, marshal_load): workaround for segv on
- Intel Solaris compiled with Oracle SolarisStudio 12.3.
- Partly revert r38174. [ruby-core:52042] [Bug #7805]
+ * node.h: return (struct MEMO *) pointer.
-Thu Mar 21 16:48:06 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Mar 11 06:26:21 2015 Koichi Sasada <ko1@atdot.net>
- * parse.y (simple_re_meta): escape all closing characters, not only
- round parenthesis. [ruby-core:53578] [Bug #8133]
+ * vm_insnhelper.h (THROW_DATA_STATE): return int, not VALUE.
-Thu Mar 21 13:50:46 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm_insnhelper.h (THROW_DATA_STATE_SET): accept int value.
- * vm_core.h (UNINITIALIZED_VAR): suppress warnings by clang 4.2.
- [ruby-core:51742] [Bug #7756]
+Wed Mar 11 05:06:46 2015 Koichi Sasada <ko1@atdot.net>
-Thu Mar 21 07:34:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * vm_eval.c (rb_catch_protect): use THROW_DATA_VAL().
- * ext/date/date_core.c: Typo in Date::MONTHNAMES by Matt Gauger
- [GH fixes #261]
+Wed Mar 11 04:56:04 2015 Koichi Sasada <ko1@atdot.net>
-Wed Mar 20 22:53:14 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm_insnhelper.h: define struct IFUNC.
- * lib/mkmf.rb (find_library): fix to format message.
- [ruby-core:53568] [Bug #8130]
+ * vm_eval.c (rb_iterate): use it.
-Wed Mar 20 22:52:52 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm_insnhelper.c (vm_yield_with_cfunc): ditto.
- * lib/mkmf.rb (install_dirs, with_destdir): prefix with DESTDIR
- directories to install only unless bundled extension libraries.
- [ruby-core:53502] [Bug #8115]
+Wed Mar 11 03:52:12 2015 Koichi Sasada <ko1@atdot.net>
-Wed Mar 20 17:47:53 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * eval_intern.h (THROW_DATA_P): use RB_TYPE_P() instead of
+ BUILTIN_TYPE().
- * test/win32ole/test_err_in_callback.rb (TestErrInCallBack#setup):
- allow using different root for source and build directories.
- this may fixes a minor problem of r39834.
+ * thread.c (thread_join): use THROW_DATA_P().
-Wed Mar 20 16:40:48 2013 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+Wed Mar 11 03:48:01 2015 Koichi Sasada <ko1@atdot.net>
- * test/ruby/test_signal.rb (test_hup_me): skip if HUP isn't supported.
- On Windows this test causes ArgumentError.
+ * proc.c: use RUBY_VM_IFUNC_P() to recognize IFUNC or not.
-Wed Mar 20 16:24:12 2013 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+ * vm.c: ditto.
- * test/rubygems/test_gem_installer.rb (test_install_extension_flat):
- use ruby in build directory in case ruby is not installed.
- [ruby-core:53265] [Bug #8058]
+ * vm_dump.c: ditto.
-Wed Mar 20 15:22:07 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * vm_insnhelper.c: ditto.
- * test/win32ole/test_err_in_callback.rb (TestErrInCallBack#setup): use
- relative path to get rid of "too long commandline" error.
+ * vm_core.h (RUBY_VM_IFUNC_P): use RB_TYPE_P() instead of
+ BUILTIN_TYPE().
-Wed Mar 20 04:27:42 2013 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
+Wed Mar 11 03:21:37 2015 Koichi Sasada <ko1@atdot.net>
- * test/rinda/test_rinda.rb: remove unused variables.
- patched by Vipul A M <vipulnsward@gmail.com>
+ * vm_insnhelper.h: define struct THROW_DATA to represent
+ throwing data. Also define accessor functions.
-Wed Mar 20 04:15:32 2013 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
+ * eval_intern.h: move related changes into vm_insnhelper.h.
+ Now these MACROs (functions) are only used in vm*.c.
- * ext/bigdecimal/bigdecimal.c: fixed typo.
- patched by Vipul A M <vipulnsward@gmail.com>
+ There is only THROW_DATA_P(err) to check this data type or not.
-Sat Mar 16 03:40:49 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * vm.c: catch up these changes.
- * test/ruby/test_signal.rb (test_hup_me): added a few comments.
+ * vm_eval.c: ditto.
-Sat Mar 16 03:39:38 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * vm_insnhelper.c: ditto.
- * thread.c (ruby_kill): added a few comments.
+Wed Mar 11 00:57:00 2015 Rei Odaira <Rei.Odaira@gmail.com>
-Sat Mar 16 03:36:56 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * test/rubygems/test_gem_security_trust_dir.rb: The return value of
+ File::Stat#mode is OS dependent. In AIX, 0200000 is set.
- * thread.c (ruby_kill): release GVL while waiting signal delivered.
+Tue Mar 10 20:03:41 2015 Tanaka Akira <akr@fsij.org>
-Tue Mar 19 19:50:48 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * lib/webrick/server.rb: Invoke setup_shutdown_pipe in start method
+ instead of listen method.
+ [ruby-core:68476] [Bug #10956] Reported by Shintaro Kojima.
- * ruby_kill (internal.h, thread.c): use rb_pid_t instead of pid_t.
- this fixes the build failure of mswin introduced at r39819.
+Tue Mar 10 17:27:27 2015 Koichi Sasada <ko1@atdot.net>
-Tue Mar 19 17:09:30 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * thread.c (thread_join): Fixnum (except TAG_FATAL) and
+ NODE should not be reached here.
- * string.c (rb_str_conv_enc_opts): convert with one converter, instead
- of re-creating converters for each buffer expansion.
+Mon Mar 9 21:42:10 2015 Koichi Sasada <ko1@atdot.net>
-Tue Mar 19 17:06:50 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm_insnhelper.c (ep_cref): rename to lep_cref() because it should be
+ local ep.
- * dir.c (glob_helper): compose HFS file names from UTF8-MAC.
- [ruby-core:48745] [Bug #7267]
+Mon Mar 9 16:34:36 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Mar 16 01:44:29 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * ext/stringio/stringio.c (strio_close): don't raise on double
+ close for consistent to IO#close.
- * internal.h: added a declaration of ruby_kill().
- * thread.c (ruby_kill): helper function of kill().
+Mon Mar 09 06:44:48 2015 Koichi Sasada <ko1@atdot.net>
- * signal.c (rb_f_kill): use ruby_kill() instead of kill().
- * signal.c (rb_f_kill): call rb_thread_execute_interrupts()
- to ensure that make SignalException if sent a signal
- to myself. [Bug #7951] [ruby-core:52864]
+ * vm_insnhelper.h: define struct SVAR for SVAR.
+ This data type is also same layout of NODE (NODE_IF).
- * vm_core.h (typedef struct rb_thread_struct): added
- th->interrupt_cond.
- * thread.c (rb_threadptr_interrupt_common): added to
- initialization of th->interrupt_cond.
- * thread.c (thread_create_core): ditto.
+ * vm_insnhelper.c: catch up this change.
- * test/ruby/test_signal.rb (TestSignal#test_hup_me): test for
- the above.
+Mon Mar 9 06:43:21 2015 Koichi Sasada <ko1@atdot.net>
-Sat Mar 16 00:42:39 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * vm_insnhelper.c (lep_svar_set): add WBs.
- * io.c (linux_iocparm_len): enable only exist _IOC_SIZE().
- Because musl libc doesn't have it. [Bug #8051] [ruby-core:53229]
+Mon Mar 9 06:19:06 2015 Koichi Sasada <ko1@atdot.net>
-Tue Mar 19 10:05:04 2013 Shota Fukumori <her@sorah.jp>
+ * internal.h: define rb_cref_t and change to use it.
- * ext/objspace/objspace.c: Fix typo in doc. Patch by Sho Hashimoto.
- [Bug #8116] [ruby-dev:47177]
+ 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.
-Tue Mar 19 02:13:00 2013 Kenta Murata <mrkn@mrkn.jp>
+Mon Mar 9 06:00:37 2015 Koichi Sasada <ko1@atdot.net>
- * configure.in: set ac_cv_prog_cxx if CXX is supplied.
+ * vm_insnhelper.h (COPY_CREF_OMOD): fix translation miss.
-Tue Mar 19 01:18:00 2013 Kenta Murata <mrkn@mrkn.jp>
+Mon Mar 9 04:47:58 2015 Koichi Sasada <ko1@atdot.net>
- * configure.in: Fix c++ compiler auto-selection not only for
- Darwin 11.x, but also the other versions of Darwin.
+ * 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)
-Tue Mar 19 00:26:22 2013 Narihiro Nakamura <authornari@gmail.com>
+ This is process to change CREF data type from NODE.
- * gc.c: Improve accuracy of objspace_live_num() and
- allocated/freed counters. patched by tmm1(Aman Gupta).
- [Bug #8092] [ruby-core:53392]
+Sun Mar 8 22:50:57 2015 Tanaka Akira <akr@fsij.org>
-Mon Mar 18 21:42:48 2013 Narihiro Nakamura <authornari@gmail.com>
+ * ext/zlib/zlib.c (rb_gzfile_close): Don't raise on double
+ close for consistent to IO#close.
- * gc.c: Avoid unnecessary heap growth. patched by tmm1(Aman Gupta).
- [Bug #8093] [ruby-core:53393]
+Sun Mar 8 16:57:35 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Mar 18 17:58:36 2013 Narihiro Nakamura <authornari@gmail.com>
+ * dir.c (glob_helper): match patterns against legacy short names
+ too, not only ordinary names. [ruby-core:67954] [Bug #10819]
- * gc.c: Fix unlimited memory growth with large values of
- RUBY_FREE_MIN. patched by tmm1(Aman Gupta).
- [Bug #8095] [ruby-core:53405]
+ * win32/dir.h (struct direct): add short name members.
-Mon Mar 18 14:46:19 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * win32/win32.c (opendir_internal, readdir_internal): ditto.
- * test/win32ole/test_err_in_callback.rb
- (TestErrInCallBack#test_err_in_callback): shouldn't create a file in
- the top of build directory.
+Sat Mar 7 09:36:05 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
-Mon Mar 18 13:29:52 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * array.c: document that first element is kept when using
+ Array#uniq and #uniq! [fix GH-845][ci skip]
+ Patch by @riffraff
- * vm_dump.c (backtrace): on darwin use custom backtrace() to trace
- beyond _sigtramp. darwin's backtrace can't trace beyond signal
- trampoline with sigaltstack.
+Sat Mar 7 09:28:02 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
- * configure.in: check execinfo.h on darwin.
+ * thread.c: Mutex#owned? is no longer experimental since 2.1.0
+ [fix GH-839][ci skip] Patch by @takiy33
-Mon Mar 18 11:03:23 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Sat Mar 7 09:18:42 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
- * vm_exec.h (END_INSN): revert r39517 because the segv seems fixed by
- r39806.
+ * tool/merger.rb: Added documentation to version method.
+ [fix GH-847][ci skip] Patch by @magikid
-Mon Mar 18 10:41:06 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Fri Mar 6 22:50:36 2015 Koichi Sasada <ko1@atdot.net>
- * vm_exec.c: Correct predefined macro name. This typo is introduced by
- r36534 and should be backported to ruby_2_0_0.
+ * class.c (rb_prepend_module): need a WB for klass -> origin.
-Mon Mar 18 03:18:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Fri Mar 6 20:18:38 2015 Koichi Sasada <ko1@atdot.net>
- * array.c: Typo in Array#delete by Timo Sand [GH fixes #258]
+ * fix namespace issue on singleton class expressions. [Bug #10943]
-Mon Mar 18 01:14:56 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * vm_core.h, method.h: remove rb_iseq_t::cref_stack. CREF is stored
+ to rb_method_definition_t::body.iseq_body.cref.
- * io.c (io_fillbuf): show fd number on failure to debug.
- http://c5632.rubyci.org/~chkbuild/ruby-trunk/log/20130316T050302Z.diff.html.gz
+ * vm_insnhelper.c: modify SVAR usage.
+ When calling ISEQ type method, push CREF information onto method
+ frame, SVAR located place. Before this fix, SVAR is simply nil.
+ After this patch, CREF (or NULL == Qfalse for not iseq methods)
+ is stored at the method invocation.
-Sun Mar 17 02:38:21 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ When SVAR is required, then put NODE_IF onto SVAR location,
+ and NDOE_IF::nd_reserved points CREF itself.
- * ext/date/date_core.c: include sys/time.h for avoiding implicit
- declaration of gettimeofday().
+ * vm.c (vm_cref_new, vm_cref_dump, vm_cref_new_toplevel): added.
-Sun Mar 17 00:55:31 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * vm_insnhelper.c (vm_push_frame): accept CREF.
- * include/ruby/missing.h: removed __linux__. it's unnecessary.
+ * method.h, vm_method.c (rb_add_method_iseq): added. This function
+ accepts iseq and CREF.
-Fri Mar 15 14:57:16 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * class.c (clone_method): use rb_add_method_iseq().
- * thread.c: disabled _FORTIFY_SOURCE for avoid to hit glibc bug.
- [Bug #8080] [ruby-core:53349]
- * test/ruby/test_io.rb (TestIO#test_io_select_with_many_files):
- test for the above.
+ * gc.c (mark_method_entry): mark method_entry::body.iseq_body.cref.
-Wed Mar 13 15:16:35 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * iseq.c: remove CREF related codes.
- * include/ruby/missing.h (__syscall): moved to...
- * io.c: here. because __syscall() is only used from io.c.
+ * insns.def (getinlinecache/setinlinecache): CREF should be cache key
+ because a different CREF has a different namespace.
- * include/ruby/missing.h: move "#include <sys/type.h>" to ....
- * include/ruby/intern.h: here. because it was introduced for
- fixing NFDBITS issue. [ruby-core:05179].
+ * node.c (rb_gc_mark_node): mark NODE_IF::nd_reserved for SVAR.
-Wed Mar 13 14:38:53 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * proc.c: catch up changes.
- * include/ruby/missing.h (struct timespec): include <sys/time.h>
+ * struct.c: ditto.
-Wed Mar 13 13:54:45 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * insns.def: ditto.
- * configure.in: check struct timeval exist or not.
- * include/ruby/missing.h (struct timeval): check HAVE_STRUCT_TIMEVAL
- properly. and don't include sys/time.h if struct timeval exist.
+ * vm_args.c (raise_argument_error): ditto.
- * file.c: include sys/time.h explicitly.
- * random.c: ditto.
- * thread_pthread.c: ditto.
- * time.c: ditto.
- * ext/date/date_strftime.c: ditto.
+ * vm_eval.c: ditto.
-Fri Mar 15 14:45:02 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * test/ruby/test_class.rb: add a test.
- * configure.in (_FORTIFY_SOURCE): added a few comments.
+Fri Mar 6 18:19:13 2015 Koichi Sasada <ko1@atdot.net>
-Fri Mar 15 14:17:55 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * test/webrick/test_filehandler.rb: on vboxsf (on VirtualBox
+ on Windows 7), file name and permissions are strange (can access
+ by short file name and so on).
- * thread_pthread.c (numberof): renamed from ARRAY_SIZE() because
- other all files use numberof().
+ Simply skip on such tests on such FS. To detect strange FS, this
+ patch use a part of code `File.executable?(__FILE__)`.
+ Please correct them if there are better ways.
-Say Mar 15 01:33:00 2013 Charles Oliver Nutter <headius@headius.com>
+Fri Mar 6 17:31:29 2015 Koichi Sasada <ko1@atdot.net>
- * test/ruby/test_lazy_enumerator.rb (TestLazyEnumerator#test_drop_while):
- Modify while condition to show dropping remains off after first false
- value. This change was made in 39711.
+ * test/ruby/test_beginendblock.rb: do not change directory.
-Fri Mar 15 23:06:18 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ Run system command in the directory mounted by vboxsf on Windows 7
+ and get warning like that "warning: Insecure world writable dir...".
- * time.c (GetTimeval): check if already initialized instance.
+Fri Mar 6 10:31:00 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * time.c (GetNewTimeval): check if newly created instance.
+ * vm_eval.c (vm_call_super): search next super class from the
+ original class, to get rid of infinite recursion with
+ prepending. a patch by Seiei Higa <hanachin AT gmail.com> at
+ [ruby-core:68434]. [ruby-core:68093] [Bug #10847]
- * time.c (time_init_0, time_init_1, time_init_copy, time_mload): must
- be newly created instance. [ruby-core:53436] [Bug #8099]
+Fri Mar 6 08:45:26 2015 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-Fri Mar 15 14:51:33 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * lib/matrix.rb: Add Vector#round. Patch by Jordan Stephens.
+ [Fixes GH-802]
- * file.c (rb_sys_fail_path_with_func): share same function, and path
- may be nil.
+Fri Mar 6 07:33:03 2015 Koichi Sasada <ko1@atdot.net>
-Fri Mar 15 08:24:51 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * gc.c (obj_info): show node name too.
- * io.c (rb_sys_fail_path): define & use rb_sys_fail_path0 like r39752
+Fri Mar 6 07:00:44 2015 Koichi Sasada <ko1@atdot.net>
-Fri Mar 15 04:08:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * internal.h: remove struct method_table_wrapper.
+ struct method_table_wrapper was introduced to avoid duplicate marking
+ for method tables.
- * proc.c: Typo in Proc.arity found by Jack Nagel [Bug #8094]
+ For example, `module M1; def foo; end; end` make one method table
+ (mtbl) contains a method `foo`. M1 (T_MODULE) points mtbl.
+ Classes C1 and C2 includes M1, then two T_ICLASS objects are created
+ and they points mtbl too. In this case, three objects (one T_MODULE
+ and two T_ICLASS objects) points same mtbl. On marking phase, these
+ three objects mark same mtbl. To avoid such duplication, struct
+ method_table_wrapper was introduced.
-Thu Mar 14 16:59:09 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ However, created two T_ICLASS objects have same or shorter lifetime
+ than M1 (T_MODULE) object. So that we only need to mark mtbl from M1,
+ not from T_ICLASS objects. This patch tries marking only from M1.
+ In other words, original module (M1) has responsibility to mark mtbl.
+ Because of no duplicate marking, we don't need method_table_wrapper
+ any more.
- * configure.in (rb_cv_function_name_string): macro for function name
- string predefined identifier, __func__ in C99, or __FUNCTION__ in
- gcc.
+ Note that one `Module#prepend` call creates two T_ICLASS objects.
+ One for referring to a prepending Module object, same as
+ `Module#include`. We don't need to care this T_ICLASS.
+ One for moving original mtbl from a prepending class. We need to
+ mark such mtbl from this T_ICLASS object. To mark the mtbl,
+ we need to use `RCLASS_ORIGIN(klass)` on marking from a prepended
+ class `klass`.
- * file.c (rb_sys_fail_path): use RUBY_FUNCTION_NAME_STRING.
+ * class.c: ditto.
-Thu Mar 14 14:12:34 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * eval.c (rb_using_refinement): ditto.
- * file.c (rb_sys_fail_path): use rb_sys_fail_path0 only on GCC.
- __func__ is C99 feature.
+ * gc.c: ditto.
-Thu Mar 14 12:59:59 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * include/ruby/ruby.h: define m_tbl directly. The definition of
+ struct RClass should be moved to (srcdir)/internal.h.
- * file.c (rb_sys_fail_path0): add to append the name of called function
- to ease debugging for example blow umask_spec failure.
- http://fbsd.rubyci.org/~chkbuild/ruby-trunk/log/20130309T010202Z.diff.html.gz
+ * method.h: remove decl of rb_free_m_tbl_wrapper().
- * file.c (rb_sys_fail_path): use rb_sys_fail_path0.
+ * object.c: use RCLASS_M_TBL() directly.
-Thu Mar 14 12:53:15 2013 Luis Lavena <luislavena@gmail.com>
+Fri Mar 6 02:50:12 2015 NAKAMURA Usaku <usa@ruby-lang.org>
- * win32/file.c (get_user_from_path): add internal function that retrieves
- username from supplied path (refactored).
- * win32/file.c (rb_file_expand_path_internal): refactor expansion of user
- home to use get_user_from_path and cover dir_string corner cases.
- [ruby-core:53168] [Bug #8034]
+ * dir.c (replace_real_basename): need to check the return value of
+ GLOB_REALLOC().
-Thu Mar 14 11:53:01 2013 Narihiro Nakamura <authornari@gmail.com>
+Fri Mar 6 02:26:03 2015 NAKAMURA Usaku <usa@ruby-lang.org>
- * NEWS: describe RUBY_HEAP_SLOTS_GROWTH_FACTOR.
+ * dir.c (replace_real_basename): shouldn't create Ruby object before
+ the object system is loaded.
+ [ruby-core:68430] [Bug #10941]
-Thu Mar 14 10:01:12 2013 Eric Hodel <drbrain@segment7.net>
+Wed Mar 5 16:58:43 2015 Kazuki Tanaka <gogotanaka@ruby-lang.org>
- * doc/globals.rdoc: $? is thread-local
+ * hash.c: [DOC] #delete method actually returns nil, if the key
+ is not found. [fix GH-844][ci skip] Patch by @ivdma
-Wed Mar 13 23:25:59 2013 Narihiro Nakamura <authornari@gmail.com>
+Wed Mar 5 12:22:23 2015 Kazuki Tanaka <gogotanaka@ruby-lang.org>
- * gc.c: allow to tune growth of heap by environment variable
- RUBY_HEAP_SLOTS_GROWTH_FACTOR. patched by tmm1(Aman Gupta).
- [Feature #8015] [ruby-core:53131]
+ * math.c: refactoring: remove unnecessary variable d0 to unify code
+ appearance.
-Wed Mar 13 19:43:46 2013 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+Thu Mar 5 11:50:54 2015 Shugo Maeda <shugo@ruby-lang.org>
- * doc/irb/irb.rd.ja: fix typo
+ * vm_eval.c (eval_string_with_cref): A binding should keep
+ refinements activation information and the refinements should be
+ activated in subsequent eval calls with the binding.
+ [ruby-core:67945] [Bug #10818]
- * ext/tk/MANUAL_tcltklib.eng: fix typos
+Thu Mar 5 11:16:55 2015 Shugo Maeda <shugo@ruby-lang.org>
- * ext/tk/sample/tktextframe.rb (Tk#component_delegates): fix typo
+ * test/ruby/test_refinement.rb: There is no need anymore to suppress
+ warnings.
-Wed Mar 13 15:13:04 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Mar 5 08:31:02 2015 Rei Odaira <Rei.Odaira@gmail.com>
- * class.c (rb_obj_singleton_methods): collect methods from the origin
- class. [ruby-core:53207] [Bug #8044]
+ * random.c (random_raw_seed): Avoid calling fill_random_bytes()
+ if the requested size is 0. AIX returns -1 for 0-byte read from
+ /dev/urandom, while other UNIX returns 0. With this change,
+ Random.raw_seed(0) consistently returns "" in any UNIX.
-Wed Mar 13 14:51:26 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Mar 4 12:43:32 2015 Kazuki Tanaka <gogotanaka@ruby-lang.org>
- * vm_method.c (rb_export_method): directly override the flag of method
- defined in prepending class too, not adding zsuper entry.
- [ruby-core:53106] [Bug #8005]
+ * test/ruby/test_math.rb (assert_float_and_int): Refactor test cases
+ by introducing assert_float_and_int. [misc #10810]
-Wed Mar 13 13:06:26 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Mar 4 11:52:30 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * configure.in (rm, shvar_to_cpp, unexpand_shvar): local is not
- available on old shells.
+ * symbol.c (Init_sym): make dsym_fstrs a hash compared by identity
+ as the keys are unique fstrings, to get rid of running hash and
+ compare methods and causing new object allocation during garbage
+ collection phase. [ruby-dev:48891] [Bug #10933]
- * configure.in (shvar_to_cpp): escape quotes for old shells.
- [Bug #7959] [Bug #8071]
+Wed Mar 4 10:16:57 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
-Wed Mar 13 11:11:07 2013 Shugo Maeda <shugo@ruby-lang.org>
+ * enum.c: Fix typo in slice_after's exception message.
+ [fix GH-842][ci skip] Patch by @jsyeo
- * object.c (Init_Object): remove Module#used, which has been
- introduced in Ruby 2.0 by mistake. [Bug #7916] [ruby-core:52719]
+Wed Mar 4 10:15:37 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
-Wed Mar 13 05:49:29 2013 Eric Hodel <drbrain@segment7.net>
+ * doc/syntax/methods.rdoc: add some missing spaces and
+ fix a grammatical error in method docs.
+ [fix GH-843][ci skip] Patch by @nikolas
- * lib/irb.rb: Fix typo
+Wed Mar 4 02:13:06 2015 NAKAMURA Usaku <usa@ruby-lang.org>
-Tue Mar 12 22:20:47 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * tool/redmine-backporter.rb (backport_command_string): pick up only
+ when the revision exists in trunk.
- * compile.c (iseq_set_arguments, iseq_compile_each): support required
- keyword arguments. [ruby-core:51454] [Feature #7701]
+Wed Mar 4 00:44:56 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * iseq.c (rb_iseq_parameters): ditto.
+ * thread.c (rb_thread_io_blocking_region): assigned variables
+ inside EXEC_TAG() should be volatile.
- * parse.y (f_kw, f_block_kw): ditto. this syntax is still
- experimental, the notation may change.
+ * thread.c (rb_thread_s_handle_interrupt): ditto.
- * vm_core.h (rb_iseq_struct): ditto.
+ * thread.c (exec_recursive): ditto.
- * vm_insnhelper.c (vm_callee_setup_keyword_arg): ditto.
+Wed Mar 4 00:29:18 2015 NAKAMURA Usaku <usa@ruby-lang.org>
-Tue Mar 12 17:02:53 2013 TAKANO Mitsuhiro <tak@no32.tk>
+ * tool/redmine-backporter.rb: now can specify shorten form of commands.
- * date_core.c: clearly specify operator precedence.
+Tue Mar 3 23:41:42 2015 NAKAMURA Usaku <usa@ruby-lang.org>
-Tue Mar 12 17:00:45 2013 TAKANO Mitsuhiro <tak@no32.tk>
+ * tool/redmine-backporter.rb (Readline.readline): drop untreated control
+ characters.
- * insns.def: fix condition.
+Tue Mar 3 22:25:24 2015 NAKAMURA Usaku <usa@ruby-lang.org>
-Tue Mar 12 16:48:19 2013 TAKANO Mitsuhiro <tak@no32.tk>
+ * test/lib/envutil.rb (EnvUtil.invoke_ruby): need to rescue because
+ Signal.signame may raise exception.
- * rational.c: fix dangling if, else-if and else.
+Tue Mar 3 16:57:39 2015 NAKAMURA Usaku <usa@ruby-lang.org>
-Tue Mar 12 06:27:59 2013 Eric Hodel <drbrain@segment7.net>
+ * tool/redmine-backporter.rb: use 'b' instead of 's' for showing
+ Backport options for merger.rb.
- * lib/rubygems/commands/setup_command.rb: Don't delete non-rubygems
- files when installing RubyGems.
- * test/rubygems/test_gem_commands_setup_command.rb: Test for the
- above.
+Tue Mar 3 16:55:23 2015 NAKAMURA Usaku <usa@ruby-lang.org>
- * lib/rubygems/ext/ext_conf_builder.rb: Use full path to siteconf.rb
- in case the extconf.rb changes directories (like memcached does).
+ * tool/redmine-backporter.rb: show selected ticket number at prompt.
- * lib/rubygems/package.rb: Remove double slash from path.
- * test/rubygems/test_gem_package.rb: Test for the above.
- * test/rubygems/test_gem_package_old.rb: ditto.
+Tue Mar 3 14:47:30 2015 Kazuki Tanaka <gogotanaka@ruby-lang.org>
- * lib/rubygems/source.rb: Revert automatic HTTPS upgrade
- * lib/rubygems/spec_fetcher.rb: ditto.
- * test/rubygems/test_gem_remote_fetcher.rb: ditto.
- * test/rubygems/test_gem_source.rb: ditto.
- * test/rubygems/test_gem_spec_fetcher.rb: ditto.
+ * math.c (num2dbl_with_to_f): direct casting from Rational to double.
+ [Feature #10909]
-Tue Mar 12 02:25:19 2013 Eric Hodel <drbrain@segment7.net>
+ * test/ruby/test_math.rb: add tests for the above change.
- * lib/net/smtp.rb: Added Net::SMTP#rset method to implement the SMTP
- RSET command. [ruby-trunk - Feature #5373]
- * NEWS: ditto.
- * test/net/smtp/test_smtp.rb: Test for the above.
+Tue Mar 3 07:52:20 2015 Rei Odaira <Rei.Odaira@gmail.com>
-Mon Mar 11 22:44:57 2013 Tanaka Akira <akr@fsij.org>
+ * test/ruby/test_symbol.rb: avoid a false positive in AIX.
- * lib/resolv-replace.rb (TCPSocket#initialize): resolve the 3rd
- argument only if non-nil value is given.
- [ruby-dev:47150] [ruby-trunk - Bug #8054] reported and analyzed by
- mrkn.
+Tue Mar 3 00:59:39 2015 Naohisa Goto <ngotogenome@gmail.com>
-Mon Mar 11 19:22:54 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * configure.in: set PRELOADENV in Solaris to avoid "wrong ELF class"
+ error. [Bug #10926] [ruby-dev:48888]
+ * configure.in: set LIBPATHENV for 32-bit compile in Solaris
+ in addition to 64-bit.
- * test/mkmf/base.rb: class name conflict.
+Mon Mar 2 15:36:10 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Mar 11 18:45:09 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * configure.in: do not check _setjmp unless _longjmp is available,
+ so that configure results will not be changed by cache.
- * enumerator.c (enumerator_with_index): try to convert given offset to
- integer. fix bug introduced in r39594.
+Mon Mar 2 14:44:56 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Mar 11 17:27:57 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * configure.in (RUBY_REPLACE_TYPE): restore unsigned type from
+ cached variable only if the target type is not available.
- * test/ruby/envutil.rb (EnvUtil.with_default_external): add for
- changing Encoding.default_external without warnings.
+Mon Mar 2 13:04:27 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/ruby/envutil.rb (EnvUtil.with_default_internal): ditto.
+ * signal.c (sig_signame): return nil if the argument is a valid
+ signal number.
- * test/ruby/test_io_m17n.rb: use above with_default_external.
+Mon Mar 2 12:05:04 2015 Naohisa Goto <ngotogenome@gmail.com>
-Mon Mar 11 16:57:00 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * test/net/ftp/test_ftp.rb (create_ftp_server): set SO_OOBINLINE
+ for receiving OOB data which is sent with MSG_OOB flag in
+ portable way. [Bug #10915] [ruby-dev:48885]
+ * test/net/ftp/test_ftp.rb (test_abort, test_status): use gets
+ for receiving OOB data in portable way.
- * io.c (extract_binmode): raise error even if binmode and textmode
- don't conflict. [Bug #5918] [ruby-core:42199]
+Mon Mar 2 11:43:07 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Mar 11 12:25:12 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * configure.in (RUBY_REPLACE_TYPE): restore unsigned type from
+ cached variable.
- * Merge Onigmo d4bad41e16e3eccd97ccce6f1f96712e557c4518.
- fix lookbehind assertion fails with /m mode enabled. [Bug #8023]
- fix \Z matches where it shouldn't. [Bug #8001]
+Mon Mar 2 06:01:41 2015 Eric Wong <e@80x24.org>
-Mon Mar 11 11:53:35 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/io/wait/wait.c (io_nread): wrap return value with INT2FIX
+ Thanks to Yura Sokolov <funny.falcon@gmail.com>
+ [ruby-core:68369] [Bug#10923]
+ * test/io/wait/test_io_wait.rb (test_nread_buffered):
+ fix broken test
- * lib/mkmf.rb (MakeMakefile#dir_config, MakeMakefile#_libdir_basename):
- defer use of instance variable until needed. [Bug #8074]
+Sun Mar 1 20:21:16 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Mar 7 10:42:28 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * configure.in (RUBY_REPLACE_TYPE): restore convertible type from
+ cached variable, so that configured results will be stable.
- * lib/thread.rb (Queue#clear): return self.
- Patch by Cubing Cube. Thank you! [Bug #7947] [ruby-dev:47098]
- * lib/thread.rb (Queue#push): ditto.
- * lib/thread.rb (SizedQueue#push): ditto.
- * test/thread/test_queue.rb: add tests for the above.
+Sun Mar 1 18:10:34 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Mar 7 10:40:49 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * configure.in (rb_cv_broken_memmem): check before adding the
+ result HAVE_MEMMEM macro to confdefs.h, so that configured
+ results will be stable.
- * tool/change_maker.rb (#diff2index): check Encoding::BINARY.
- BASERUBY may still be 1.8.x.
+Sun Mar 1 11:17:56 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Mar 7 08:47:42 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * gc.c (id2ref): prohibit from accessing internal objects.
+ [ruby-core:68348] [Bug #10918]
- * NEWS (Mutex#owned?): no longer experimental.
+Sun Mar 1 09:06:11 2015 Tanaka Akira <akr@fsij.org>
-Sun Mar 10 23:38:15 2013 Luis Lavena <luislavena@gmail.com>
+ * lib/time.rb (strptime): Support %s.%N.
+ [ruby-core:68301] [Bug #10904] Patch by Sadayuki Furuhashi.
- * win32/file.c (rb_file_expand_path_internal): Expand home directory when
- used as second parameter (dir_string). [ruby-core:53168] [Bug #8034]
- * test/ruby/test_file_exhaustive.rb: add test to verify.
+Sat Feb 28 17:18:39 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun Mar 10 23:27:05 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * enum.c (enum_each_slice, enum_each_cons): limit elements size by
+ the enumerator size. suggested by Hans Mackowiak <hanmac AT
+ gmx.de> at [ruby-core:68335]
- * lib/rubygems/ext/ext_conf_builder.rb (Gem::Ext::ExtConfBuilder.build):
- it is impossible to predict which file will be installed to where,
- by the arguments, so use intermediate destination directory always.
- [Bug #7698]
+Sat Feb 28 15:44:20 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun Mar 10 17:00:22 2013 Tadayoshi Funaba <tadf@dotrb.org>
+ * vm_dump.c (rb_vm_bugreport): get rid of making new strings
+ inside signal context.
- * complex.c: edited rdoc.
- * rational.c: ditto.
+ * variable.c (rb_tmp_class_path): defer making temporary class
+ path string.
-Sun Mar 10 15:02:39 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * variable.c (rb_search_class_path): search class path or return
+ Qnil or Qfalse if unnamed, not creating a temporary path.
- * process.c (setup_communication_pipe): remove unused function.
- it was unintentionally added r39683.
+Sat Feb 28 15:02:02 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Mar 6 00:30:40 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * variable.c (rb_tmp_class_path): preserve name encoding of an
+ anonymous instance of module/class subclass.
- * tool/gen_ruby_tapset.rb: add tapset generator.
+Sat Feb 28 08:24:30 2015 Rei Odaira <Rei.Odaira@gmail.com>
-Wed Mar 6 03:27:43 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * ext/pty/pty.c: AIX supports autopush.
+ Patch by Perry Smith [ruby-core:58539] [Bug #9144]
- * probes.d (symbol-create): change argument name `string' to
- `str'. `string' is a keyword for systemtap.
+Fri Feb 27 22:00:05 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
-Tue Mar 5 22:23:01 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * lib/rubygems: Update to RubyGems 2.4.6 and HEAD(800f2e6).
+ Fixed #1159, #1171, #1173 on rubygems/rubygems
+ * test/rubygems: ditto.
- * probes.d: added argument name
+Fri Feb 27 20:55:42 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
-Thu Mar 7 01:17:00 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * lib/rake: Update to rake (9237e74), typo fix and remove needless
+ private syntax.
+ * test/rake: ditto.
- * test/thread/test_queue.rb (TestQueue#test_thr_kill): reduce
- iterations from 2000 to 250. When running on uniprocessor
- systems, every th.kill needs TIME_QUANTUM_USEC time (i.e.
- 100msec on posix systems). Because, "r.read 1" is 3 steps
- operations that 1) release GVL 2) read 3) acquire gvl and
- (1) invoke context switch to main thread. and then, main
- thread's th.kill resume (1), but not (2). Thus read interrupt
- need TIME_QUANTUM_USEC. Then maximum iteration is 30sec/100msec
- = 300.
+Fri Feb 27 17:06:44 2015 Koichi Sasada <ko1@atdot.net>
-Thu Mar 7 00:14:51 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * vm_core.h: define vm_svar_index.
- * io.c (rb_update_max_fd): use ATOMIC_CAS because this function
- is used from timer thread too.
+ * vm_insnhelper.c, vm.c, compile.c: use vm_svar_index names.
-Wed Mar 6 23:30:21 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * iseq.h: remove DEFAULT_SPECIAL_VAR_COUNT.
+ use VM_SVAR_FLIPFLOP_START instead.
- * thread_pthread.c (ARRAY_SIZE): new.
- * thread_pthread.c (gvl_acquire_common): use low priority
- notification for avoiding timer thread interval confusion.
- If we use timer_thread_pipe[1], every gvl_yield() request
- one more gvl_yield(). It lead to thread starvation.
- [Bug #7999] [ruby-core:53095]
- * thread_pthread.c (rb_reserved_fd_p): adds timer_thread_pipe_low
- to reserved fds.
+Fri Feb 27 13:57:48 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Mar 6 22:36:19 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * io.c (setup_narg): wipe away expanded part of buffer to get rid
+ of revealing uncleaned data. reported by Dongkwan Kim <dkay AT
+ kaist.ac.kr>.
- * thread_pthread.c (rb_thread_wakeup_timer_thread_fd): add fd
- argument and remove hardcoded dependency of timer_thread_pipe[1].
- * thread_pthread.c (consume_communication_pipe): add fd argument.
- * thread_pthread.c (close_communication_pipe): ditto.
+Wed Feb 25 22:25:07 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
- * thread_pthread.c (timer_thread_sleep): adjust the above changes.
+ * spec/default.mspec: use default configuration file name.
+ https://github.com/ruby/rubyspec/commit/cc69f337b06362e5607ffa3e3ad40ef7494960cf
- * thread_pthread.c (setup_communication_pipe_internal): factor
- out pipe initialize logic.
+Wed Feb 25 22:21:56 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
-Wed Mar 6 22:56:14 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * spec/default.mspec: remove specific version number.
+ https://github.com/ruby/rubyspec/commit/7a909e925c1baa9c700bd44af9241aef6e596714
- * thread_pthread.c (ubf_select): add to small comments why we
- need to call rb_thread_wakeup_timer_thread().
+Wed Feb 25 22:04:04 2015 NAKAMURA Usaku <usa@ruby-lang.org>
-Wed Mar 6 21:42:24 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * ext/win32/Win32API.rb (initialize): accept both a string and an array
+ for the arguments of the imported function.
+ reported by Aaron Stone [ruby-core:68208] [Bug #10876] [Fixes GH-835]
- * thread_pthread.c (rb_thread_create_timer_thread): factor out
- creating communication pipe logic into separate function.
- * thread_pthread.c (setup_communication_pipe): new helper function.
- * thread_pthread.c (set_nonblock): moves a definition before
- setup_communication_pipe.
+Wed Feb 25 18:12:11 2015 Eric Wong <e@80x24.org>
-Sun Mar 3 02:42:29 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * signal.c (sighandler): preserve errno
+ Patch by Steven Stewart-Gallus <sstewartgallus00@mylangara.bc.ca>
+ [ruby-core:68172] [Bug #10866]
- * thread_pthread.c (consume_communication_pipe): retry when
- read returned CCP_READ_BUFF_SIZE.
+Wed Feb 25 15:59:35 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Mar 6 21:31:35 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * dir.c (push_pattern, push_glob): make globbed file names same
+ encoding to the given pattern.
- * thread_pthread.c (timer_thread_sleep): use poll() instead of
- select(). select doesn't work if timer_thread_pipe[0] is
- greater than FD_SETSIZE.
- * thread_pthread.c (USE_SLEEPY_TIMER_THREAD): add a dependency
- against poll.
+Wed Feb 25 15:27:16 2015 NARUSE, Yui <naruse@ruby-lang.org>
-Wed Mar 6 21:00:23 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * tool/merger.rb: support 2.1+ versioning scheme.
- * thread_pthread.c (USE_SLEEPY_TIMER_THREAD): use more accurate
- ifdef conditions.
+Tue Feb 25 08:49:12 2015 Kazuki Tanaka <gogotanaka@ruby-lang.org>
-Sun Mar 3 02:30:36 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * lib/cmath.rb (log): raise ArgumentError when more than 2 arguments
+ are passed. [ruby-core:66143] [Bug #10487]
- * thread_pthread.c (set_nonblock): new helper function for set
- O_NONBLOCK.
- * thread_pthread.c (rb_thread_create_timer_thread): set O_NONBLOCK
- to timer_thread_pipe[0] too.
+Tue Feb 25 02:15:17 2015 Kazuki Tanaka <gogotanaka@ruby-lang.org>
-Sun Mar 10 09:12:51 2013 Tadayoshi Funaba <tadf@dotrb.org>
+ * test/ruby/test_math.rb: Use assert_infinity instead of assert_equal(1.0/0, ...).
- * complex.c: described syntax of string form.
- * rational.c: ditto.
+ * test/ruby/test_math.rb: Add tests for overriding Integer#to_f.
+ [ruby-core:67919] [Misc #10809]
-Sat Mar 9 11:58:39 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Feb 24 22:58:48 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * marshal.c (w_extended): check for prepended object.
- [ruby-core:53206] [Bug #8043]
+ * complex.c (nucomp_mul): calculate as rotation in complex plane
+ if matrix calculation resulted in NaN.
-Sat Mar 9 08:36:58 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Feb 24 21:45:39 2015 Kazuki Tanaka <gogotanaka@ruby-lang.org>
- * load.c (features_index_add_single, rb_feature_p): store single index
- as Fixnum to reduce the number of arrays for the indexes. based on
- the patch by tmm1 (Aman Gupta) in [ruby-core:53216] [Bug #8048].
+ * test/ruby/test_math.rb(test_cbrt): Add an assertion for Math.cbrt(1.0/0)
+ and move #test_cbrt to more proper place.
-Sat Mar 9 00:25:57 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Feb 24 19:09:25 2015 Koichi Sasada <ko1@atdot.net>
- * marshal.c (r_object0): load prepended objects. treat the class of
- extended object in the included modules as prepended singleton
- class. [ruby-core:53202] [Bug #8041]
+ * vm_insnhelper.c (lep_svar_place, lep_svar_get): do not create
+ additional T_NODE object (svars holder) when only getting
+ svars.
-Fri Mar 8 19:44:00 2013 Akinori MUSHA <knu@iDaemons.org>
+Tue Feb 24 11:49:48 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * man/rake.1, man/ruby.1: Use the Pa macro to make URLs stand out.
+ * time.c (time_zone_name): should be US-ASCII only if all 7-bits,
+ otherwise locale encoding. [ruby-core:68230] [Bug #10887]
-Fri Mar 8 13:20:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Tue Feb 24 09:47:07 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/pathname/pathname.c (path_f_pathname): rdoc for Pathname()
+ * string.c (chompped_length): enable smart chomp for all non-dummy
+ encoding strings, not only default_rs.
+ [ruby-core:68258] [Bug #10893]
-Fri Mar 8 12:00:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Mon Feb 23 23:19:42 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * man/rake.1: Document ENVIRONMENT variables on RAKE(1) manpage
+ * tool/vcs.rb (IO.popen): support :chdir option.
-Fri Mar 8 10:44:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * tool/vcs.rb (VCS::GIT.get_revisions): use :chdir option instead
+ of -C option which is not supported by older git.
+ [ruby-dev:48880] [Bug #10890]
- * lib/webrick/httpproxy.rb: Fix typos in HTTPProxyServer [Bug #8013]
- Patch by Nobuhiro IMAI [ruby-core:53127]
+Mon Feb 23 15:26:39 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Mar 8 03:16:15 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
+ * string.c (rb_str_split_m): raise ArgumentError at broken string
+ not RegexpError, as Regexp is not involved in.
+ [ruby-core:68229] [Bug #10886]
- * class.c (rb_mod_ancestors): Include singleton_class in ancestors
- list [Feature #8035]
+Mon Feb 23 07:25:29 2015 Benoit Daloze <eregontp@gmail.com>
- * test/ruby/test_module.rb (class): test for above
+ * time.c: Zone encoding should be US-ASCII if all 7-bits. Fix r46907.
- * test/ruby/marshaltestlib.rb (module): adapt test
+ * test/ruby/test_time.rb, test/ruby/test_time_tz.rb: Update tests.
- * NEWS: list change
+Sun Feb 22 18:33:42 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
-Thu Mar 7 14:21:37 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * common.mk: use ruby organization for rubyspec.
- * compile.c (iseq_compile_each): pass keyword arguments to zsuper,
- with current values. [ruby-core:53114] [Bug #8008]
+Sun Feb 22 15:56:06 2015 Kazuki Tsujimoto <kazuki@callcc.net>
-Thu Mar 7 12:53:47 2013 Eric Hodel <drbrain@segment7.net>
+ * vm_insnhelper.c (rb_vm_rewrite_cref_stack): copy nd_refinements
+ of original crefs. It fixes segmentation fault when calling
+ refined method in duplicate module. [ruby-dev:48878] [Bug #10885]
- * lib/rubygems/commands/setup_command.rb: Install .pem files.
- * test/rubygems/test_gem_commands_setup_command.rb: Test for the
- above.
+ * vm_core.h, class.c: change accordingly.
- * lib/rubygems/spec_fetcher.rb: Test HTTPS upgrade with URI::HTTPS,
- not URI::HTTP. Fixes bug in automatic HTTPS upgrade.
- * test/rubygems/test_gem_spec_fetcher.rb: Test for the above.
+ * test/ruby/test_refinement.rb: add a test for above.
- * lib/rubygems.rb: Version 2.0.2
+Sun Feb 22 10:43:37 2015 Koichi Sasada <ko1@atdot.net>
- * lib/rubygems/test_utilities.rb: Ensure scheme and uri class match.
+ * gc.c (rb_objspace_call_finalizer): control GC execution during
+ force firnalizations at the end of interpreter process.
+ [Bug #10768]
-Thu Mar 7 10:39:04 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ 1) Prohibit incremental GC while running Ruby-level finalizers
+ to avoid any danger.
+ 2) Prohibit GC while invoking T_DATA/T_FILE data structure
+ because these operations break object relations consistency.
- * tool/rbinstall.rb (gem): Gem.ensure_gem_subdirectories now has mode
- option since r39607. refix of r38870.
+ This patch can introduce another memory consuming issue because
+ Ruby-level finalizers can run after (2), GC is disabled.
+ However, basically object consistency was broken at (2) as I
+ described above. So that running Ruby-level finalizers contains
+ danger originally. Because of this point, I need to suggest to
+ remove these 3 lines (invoking remaining finalizers). And add a
+ rule to add that finalizers should not add new finalizers, or
+ say there is no guarantee to invoke finalizers that added by
+ another finalizer.
-Wed Mar 6 13:14:28 2013 Eric Hodel <drbrain@segment7.net>
+Sun Feb 22 04:07:05 2015 Zachary Scott <e@zzak.io>
- * test/rubygems/test_gem_spec_fetcher.rb: Removed unused variable.
+ * ext/openssl/ossl_asn1.c: [DOC] RDoc formatting fixes for
+ ASN1::ObjectId with patch from @vbatts [Fixes GH-834]
-Wed Mar 6 08:10:15 2013 Eric Hodel <drbrain@segment7.net>
+ * ext/openssl/ossl_bn.c: ditto.
- * test/rubygems/test_require.rb: Fix tests when 'a.rb' exists.
- [ruby-trunk - Bug #7749]
+Sat Feb 21 19:51:49 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Mar 6 08:00:59 2013 Eric Hodel <drbrain@segment7.net>
+ * re.c (match_aref): RMatch::regexp is Qnil after matching by a
+ string since r45451. [ruby-core:68209] [Bug #10877]
- * lib/rubygems.rb: Allow specification of directory permissions.
- [ruby-trunk - Bug #7713]
- * test/rubygems/test_gem.rb: Test for the above.
+Sat Feb 21 16:18:42 2015 Stefan Schuler <mail@stefanschuessler.de>
-Wed Mar 6 07:40:21 2013 Eric Hodel <drbrain@segment7.net>
+ * compar.c (Init_Comparable): [DOC] Replace camelcase variable name.
+ [Fix GH-833]
- * lib/rubygems/commands/query_command.rb: Only fetch remote specs when
- showing details. [ruby-trunk - Bug #8019] RubyGems bug #487
- * lib/rubygems/remote_fetcher.rb: ditto.
- * lib/rubygems/security/policy.rb: ditto.
- * test/rubygems/test_gem_commands_query_command.rb: Test for the
- above.
+Fri Feb 20 17:27:12 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/rubygems/security.rb: Make OpenSSL optional for RubyGems.
- * lib/rubygems/commands/cert_command.rb: ditto.
+ * file.c (rb_file_identical_p): fix handle leak, ensure to close
+ the handle of the first argument.
- * lib/rubygems/config_file.rb: Display file with YAML error, not
- ~/.gemrc
+Fri Feb 20 17:19:23 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/rubygems/remote_fetcher.rb: Only create gem subdirectories when
- installing gems.
- * lib/rubygems/dependency_resolver.rb: ditto.
- * lib/rubygems/test_utilities.rb: ditto.
- * test/rubygems/test_gem_commands_fetch_command.rb: Test for the
- above.
+ * win32/win32.c (different_device_p): compare by volume serial
+ numbers, not by path names. [ruby-core:68162] [Bug #10865]
- * lib/rubygems/spec_fetcher.rb: Only try to upgrade
- http://rubygems.org to HTTPS
- * test/rubygems/test_gem_spec_fetcher.rb: Test for the above.
+Thu Feb 19 01:58:10 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/rubygems.rb: Update win_platform? check for JRuby compatibility.
+ * win32/file.c (rb_file_expand_path_internal): neither the drive
+ of base directory nor the current drive are involved in the
+ result if different than the drive of path.
+ [ruby-core:68130] [Bug #10858]
- * test/rubygems/test_gem_installer.rb: Update for Ruby 1.9.2
- compatibility
+Wed Feb 18 10:48:56 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Mar 6 01:19:28 2013 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+ * win32/win32.c (wrename): return EXDEV if moving a directory to
+ another drive, since MoveFileExW does not set proper error code.
+ [ruby-core:68162] [Bug #10865]
- * enumerator.c (enumerator_with_index, lazy_take): use INT2FIX(0)
- instead of INT2NUM(0).
+Wed Feb 18 03:13:52 2015 Aaron Patterson <aaron@tenderlovemaking.com>
- * ext/bigdecimal/bigdecimal.c (BigMath_s_exp): ditto.
+ * ext/psych/lib/psych.rb: bump psych version.
+ * ext/psych/psych.gemspec: ditto
+ * ext/psych/yaml/scanner.c: add latest libyaml change.
+ * test/psych/helper.rb: support newer minitest
+ * test/psych/test_to_yaml_properties.rb: ditto
- * ext/fiddle/function.c (function_call): ditto.
+Tue Feb 17 11:47:17 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/openssl/ossl_x509store.c (ossl_x509store_initialize): ditto.
+ * lib/resolv.rb (Resolv::DNS::Resource#==, #hash): elements
+ returned by Kernel#instance_variables are Symbols now.
+ [ruby-core:68128] [Bug #10857]
- * process.c (proc_getsid): ditto.
+Tue Feb 17 10:59:10 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
- * transcode.c (econv_finish): ditto.
+ * doc/syntax/calling_methods.rdoc: Fix documentation for "calling_methods"
+ Patch by @sos4nt [fix GH-830][ci skip]
-Tue Mar 5 21:36:43 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Feb 17 10:53:29 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * class.c (rb_prepend_module): check redefinition of built-in optimized
- methods. [ruby-dev:47124] [Bug #7983]
+ * win32/file.c (rb_file_expand_path_internal): do not make invalid
+ (or ADS) path if the path has a drive letter, the result also
+ should have be under it. [ruby-core:68130] [Bug #10858]
- * vm.c (rb_vm_check_redefinition_by_prepend): ditto.
+Tue Feb 17 10:47:20 2015 Iain Beeston <iain.beeston@gmail.com>
-Tue Mar 5 20:29:25 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * hash.c: Added docs to explain that #include? and #member? do not
+ check member equality
+ * lib/set.rb: ditto
- * proc.c (mnew): revert r39224. [ruby-core:53038] [Bug #7988]
+Mon Feb 16 20:58:49 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Mar 5 20:23:54 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * compile.c (compile_massign): optimization for special case,
+ assignments by aset or attrset.
+ http://kokizzu.blogspot.jp/2015/02/c-java-hhvm-ruby-nodejsrhinojscspidermo.html
+ http://www.atdot.net/~ko1/diary/201502.html#d16
- * include/ruby/intern.h (rb_check_arity): make a static inline
- function so it can be used as an expression and argc would be
- evaluated only once.
+Sun Feb 15 10:41:23 2015 Sho Hashimoto <sho-h@ruby-lang.org>
-Tue Mar 5 12:30:55 2013 Eric Hodel <drbrain@segment7.net>
+ * doc/standard_library.rdoc: [DOC] delete removed libraries.
+ [misc #10843] [ci skip]
- * lib/rubygems.rb: Bump version to 2.0.1 for upcoming bugfix release
+Sat Feb 14 12:20:01 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/rubygems/ext/ext_conf_builder.rb: Restore ruby 1.8 compatibility
- for [Bug #7698]
- * test/rubygems/test_gem_installer.rb: Ditto.
+ * random.c (rand_random_number): add a method to return a random
+ number like SecureRandom to Random::Formatter.
- * lib/rubygems/package.rb: Restore ruby 1.8 compatibility.
+ * lib/securerandom.rb (random_bytes): move to Random::Formatter,
+ the base method of the module.
- * test/rubygems/test_gem_dependency_installer.rb: Fix warnings
+Sat Feb 14 12:01:32 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Mar 5 12:24:23 2013 Eric Hodel <drbrain@segment7.net>
+ * random.c (random_raw_seed): extract platform dependent random
+ seed initialization function as a new method Random.raw_seed.
- * enumerator.c (enumerator_with_index): Restore handling of a nil memo
- from r39594.
+ * lib/securerandom.rb (SecureRandom): use Random.raw_seed.
-Tue Mar 5 10:40:22 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Feb 14 00:49:37 2015 Aaron Patterson <aaron@tenderlovemaking.com>
- * ext/objspace/objspace.c (count_nodes): count also newly added nodes,
- and fix key for unknown node. patch by tmm1 (Aman Gupta) in
- [ruby-core:53130] [Bug #8014]
+ * ext/coverage/coverage.c: Add Coverage.peek_result. Allows you to
+ capture coverage information without stopping the coverage tool.
+ [ruby-core:67940] [Feature #10816]
-Tue Mar 5 10:20:16 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/coverage/test_coverage.rb: test for change.
- * enumerator.c (enumerator_with_index_i): allow Bignum as offset, to
- get rid of conversion exception and integer overflow.
- [ruby-dev:47131] [Bug #8010]
+Fri Feb 13 21:52:05 2015 Yusuke Endoh <mame@tsg.ne.jp>
- * numeric.c (rb_int_succ, rb_int_pred): shortcut optimization for
- Bignum.
+ * string.c (str_discard): does not free for STR_NOFREE string.
+ [Bug #10853][ruby-core:68110]
-Tue Mar 5 10:02:48 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * bootstraptest/test_string.rb: test for above.
- * lib/rubygems/ext/ext_conf_builder.rb (Gem::Ext::ExtConfBuilder.build):
- clear DESTDIR so RUBYARCHDIR and RUBYLIBDIR are not be overridden.
- [Bug #7698]
+Fri Feb 13 21:16:00 2015 Yusuke Endoh <mame@tsg.ne.jp>
-Mon Mar 4 15:33:40 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * lib/base64.rb: make urlsafe mode user-friendly.
- * lib/rubygems/ext/ext_conf_builder.rb (Gem::Ext::ExtConfBuilder.build):
- fix for unusual cases again. install to a temporary directory once
- and move installed files to the destination directory, if it is same
- as the current directory. [Bug #7698]
+ * lib/base64.rb (Base64.urlsafe_encode64): a new option "padding" to
+ suppress the padding character ("=").
-Mon Mar 4 14:13:36 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * lib/base64.rb (Base64.urlsafe_decode64): now it accepts not only
+ correctly-padded input but also unpadded input.
+ [Feature #10740][ruby-core:67570]
- * Makefile.in (miniruby, ruby): move MAINLIBC because linker arguments
- must appear after object files with newer versions of gcc. patch by
- tmm1 (Aman Gupta) in [ruby-core:53121] [Bug #8009]
+ * test/base64/test_base64.rb: Test for above
-Mon Mar 4 10:23:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Fri Feb 13 14:19:06 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
- * encoding.c: Typo in Encoding overview by Tom Wardrop [GH fixes #255]
+ * ext/json: merge upstream from flori/json
+ change usage of TypedData. [Feature #10739][ruby-core:67564]
-Sun Mar 3 12:35:08 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Feb 12 18:34:01 2015 multisnow <infinity.blick.winkel@gmail.com>
- * lib/mkmf.rb (MakeMakefile#libpath_env): set runtime library path for
- the case rpath is disabled.
+ * ext/openssl/extconf.rb: check RAND_edg to support libressl.
-Sun Mar 3 12:17:47 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/openssl/ossl_rand.c (ossl_rand_egd): define only if RAND_edg
+ is available. [Fix GH-829]
- * lib/rubygems/ext/ext_conf_builder.rb
- (Gem::Ext::ExtConfBuilder.hack_for_obsolete_style_gems): remove
- circular dependencies in install-so too. [ruby-core:52882]
- [Bug #7698]
+Thu Feb 12 10:46:14 2015 Eric Hodel <drbrain@segment7.net>
-Sun Mar 3 07:33:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * proc.c (proc_call): Improve Proc#call documentation. Patch by
+ Hsing-Hui Hsu. [fix GH-761]
- * ext/socket/tcpserver.c: Grammar for TCPServer.new from r39554
+Thu Feb 12 04:33:02 2015 Benoit Daloze <eregontp@gmail.com>
-Sun Mar 3 01:17:20 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * compar.c (cmp_equal): no more error hiding for Comparable#==.
+ It now behaves as other Comparable methods. See #7688.
- * lib/rubygems/ext/ext_conf_builder.rb
- (Gem::Ext::ExtConfBuilder.hack_for_obsolete_style_gems): remove
- circular dependencies for old style gems which locate extconf.rb on
- the toplevel. [ruby-core:53059] [ruby-trunk - Bug #7698]
+ * test/ruby/test_comparable.rb: update related test.
- * lib/rubygems/ext/ext_conf_builder.rb (Gem::Ext::ExtConfBuilder.build):
- use RUBYOPT instead of -r option, and revert some tests. [Bug #7698]
+Thu Feb 12 03:28:05 2015 Eric Wong <e@80x24.org>
- * lib/rubygems/ext/ext_conf_builder.rb (Gem::Ext::ExtConfBuilder.build):
- revert use of temporary directory for build, to work some buggy
- extconf.rb which cannot build outside the source directory.
- [ruby-core:53056] [Bug #7698]
+ * lib/set.rb (initialize): internal hash defaults to false
-Sun Mar 3 00:04:20 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * lib/set.rb (include?): use Hash#[] for optimized dispatch.
+ Patch by Ismael Abreu <ismaelga@gmail.com>
+ [ruby-core:67664] [Misc #10754]
- * enc/depend (CPPFLAGS), lib/mkmf.rb (MakeMakefile#create_makefile):
- define RUBY_EXPORT for static-linked-ext mswin. [Bug #7960]
+Wed Feb 11 11:09:52 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Mar 2 22:49:47 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/digest/digest_conf.rb (digest_conf): check for CommonDigest.
- * win32/Makefile.sub (ENCOBJS, EXTOBJS, config.h): definitions for
- static-linked-ext. [Bug #7960]
+ * ext/digest/*/*cc.h: for Apple CommonCrypto/CommonDigest.h.
-Sat Mar 2 17:34:19 2013 Tanaka Akira <akr@fsij.org>
+ * ext/digest/digest.h (DEFINE_FINISH_FUNC_FROM_FINAL): macro for
+ finish functions, by inverting arguments order.
- * lib/webrick/utils.rb: use Socket.tcp_server_sockets to create server
- sockets.
- fix [Bug #7100] https://bugs.ruby-lang.org/issues/7100
- reported by sho-h (Sho Hashimoto).
+ * ext/digest/digest_conf.rb (digest_conf): extract common
+ configurations.
-Sat Mar 2 02:45:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Wed Feb 11 11:01:33 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * array.c: typo in comment patch by Nami-Doc [Github fixes #253]
+ * ext/json/generator/generator.c (generate_json): get rid of
+ unnecessary recursive calls which can cause infinite recursion.
+ T_STRING may not have rb_cString.
-Sat Mar 2 01:33:17 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Wed Feb 11 07:53:35 2015 Masaki Suketa <masaki.suketa@nifty.ne.jp>
- * Merge Onigmo 0fe387da2fee089254f6b04990541c731a26757f
- v5.13.3 [Bug#7972] [Bug#7974]
+ * test/win32ole/test_word.rb: use skip method to skip test.
-Fri Mar 1 11:09:06 2013 Eric Hodel <drbrain@segment7.net>
+Tue Feb 10 11:38:28 2015 Shugo Maeda <shugo@ruby-lang.org>
- * lib/fileutils.rb: Revert r34669 which altered the way
- metaprogramming in FileUtils occurred. [ruby-trunk - Bug #7958]
+ * vm_insnhelper.c (vm_call_method): stop method search when a method
+ is not found in a refinement, to support undef in refinements.
+ [ruby-core:66741] [Bug #10578]
- * test/fileutils/visibility_tests.rb: Refactored tests of FileUtils
- options modules to expose bug found in #7958
- * test/fileutils/test_dryrun.rb: ditto.
- * test/fileutils/test_nowrite.rb: ditto.
- * test/fileutils/test_verbose.rb: ditto.
+Tue Feb 10 11:19:11 2015 Shugo Maeda <shugo@ruby-lang.org>
-Fri Mar 1 09:18:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * lib/net/ftp.rb (chdir, delete, gettextfile, mdtm, mkdir, nlst,
+ putbinaryfile, puttextfile, rename, rmdir, size): support
+ Pathname. Patch by Joe Rafaniello. [fix GH-828]
- * lib/psych.rb: specify in rdoc what object is returned in parser
- By Adam Stankiewicz [Github tenderlove/psych#133]
+Mon Feb 9 16:36:12 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Mar 1 07:21:41 2013 Eric Hodel <drbrain@segment7.net>
+ * tool/make-snapshot (package): get rid of loading unbundled and
+ unexpected libraries. [ruby-core:67977] [Bug #10822]
- * lib/rubygems/ext/builder.rb: Fix incompatibilities when installing
- extensions. Patch by Nobu.
- [ruby-trunk - Bug #7698] [ruby-trunk - Bug #7971]
- * lib/rubygems/ext/ext_conf_builder.rb: ditto.
- * lib/rubygems/installer.rb: ditto.
- * test/rubygems/test_gem_ext_ext_conf_builder.rb: Test for the above.
- * test/rubygems/test_gem_installer.rb: ditto.
+Sun Feb 8 20:09:37 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
- * lib/rubygems/commands/sources_command.rb: Prefer HTTPS over HTTP.
- * lib/rubygems/defaults.rb: ditto
- * lib/rubygems/dependency_resolver.rb: Ditto.
- * lib/rubygems/source.rb: ditto.
- * lib/rubygems/spec_fetcher.rb: ditto.
- * lib/rubygems/specification.rb: ditto.
- * lib/rubygems/test_utilities.rb: ditto.
- * test/rubygems/test_gem.rb: Test for the above.
- * test/rubygems/test_gem_commands_sources_command.rb: ditto.
- * test/rubygems/test_gem_dependency_resolver_api_set.rb: ditto.
- * test/rubygems/test_gem_remote_fetcher.rb: ditto.
- * test/rubygems/test_gem_source.rb: ditto.
- * test/rubygems/test_gem_spec_fetcher.rb: ditto.
+ * lib/net/http/header.rb: pass header names as symbols.
+ Patch by @DamirSvrtan [fix GH-805]
+ * test/net/http/test_httpheader.rb: added test.
-Fri Mar 1 03:25:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Sun Feb 8 13:04:25 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/psych/lib/psych.rb: rdoc for Psych overview by Adam Stankiewicz
- [Github tenderlove/psych#134]
+ * ext/socket/getaddrinfo.c (get_addr): reject too long hostname to
+ get rid of GHOST vulnerability on very old platforms.
-Thu Feb 28 22:57:48 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/socket/raddrinfo.c (make_hostent_internal): ditto, paranoic
+ check for the canonical name.
- * compile.c (iseq_compile_each): remove redundant trace(line)
- instruction. for example, at the following script
- def m()
- p:xyzzy
- 1
- 2
- end
- compiler ignores `1' because there is no effect. However,
- `trace(line)' instruction remains in bytecode.
- This modification removes such redundant trace(line) instruction.
+Sun Feb 8 12:48:38 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/ruby/test_iseq.rb: add a test.
+ * ext/win32/lib/win32/registry.rb (Win32::Registry::API): use wide
+ versions of RegDeleteValue and RegDeleteKey.
+ [ruby-core:67958] [Bug #10820]
-Thu Feb 28 22:23:27 2013 Tanaka Akira <akr@fsij.org>
+Sat Feb 7 22:13:08 2015 Masaki Suketa <masaki.suketa@nifty.ne.jp>
- * ext/socket/raddrinfo.c (inspect_sockaddr): don't show that Unix
- domain socket filename is bigger than sizeof(sun_path).
- This limit is not rigid on some platforms such as Darwin and SunOS.
+ * test/win32ole/test_win32ole_record.rb: remove test using .NET
+ Framework 3.5 because it is not included in Windows 8/8.1.
-Thu Feb 28 21:33:01 2013 WATANABE Hirofumi <eban@ruby-lang.org>
+Sat Feb 7 19:25:25 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * configure.in(AC_DISABLE_OPTION_CHECKING): avoid warning "WARNING:
- Unrecognized options: --with-PACKAGE".
+ * dir.c (has_magic): always get long path name on Windows even if
+ no tilde is there. [ruby-core:68011] [Bug #10819]
-Thu Feb 28 20:22:04 2013 Koichi Sasada <ko1@atdot.net>
+ * dir.c (replace_real_basename): FindFirstFile ignore redirection
+ character, check if exists before call it. cf. [Bug #8597]
- * iseq.c (iseq_data_to_ary): fix condition.
- r34303 introduces a bug to avoid all line information from
- a result of ISeq#to_a. This is a regression problem from 2.0.0p0.
+Sat Feb 7 13:30:11 2015 Masaki Suketa <masaki.suketa@nifty.ne.jp>
- * test/ruby/test_iseq.rb: add a test of lines after ISeq#to_a.
+ * test/win32ole/test_win32ole_record.rb
+ (test_ole_instance_variable_get): correct VT_RECORD type and
+ instance variables.
-Thu Feb 28 08:20:33 2013 Eric Hodel <drbrain@segment7.net>
+Fri Feb 6 17:47:05 2015 Aaron Patterson <aaron@tenderlovemaking.com>
- * lib/rubygems/available_set.rb: Undent for style
+ * ext/psych/lib/psych/visitors/yaml_tree.rb: register nodes when
+ dumping objects with custom coders. [ruby-core:66215] [Bug #10496]
- * lib/rubygems/dependency_installer.rb: Pick latest prerelease gem to
- install. Fixes RubyGems bug #468.
- * test/rubygems/test_gem_dependency_installer.rb: Test for the above.
+ * test/psych/test_coder.rb: test for fix
- * lib/rubygems/dependency_installer.rb: Don't display "Done installing
- documentation" if documentation will not be installed.
- * lib/rubygems/rdoc.rb: ditto
+Fri Feb 6 16:58:31 2015 Aaron Patterson <aaron@tenderlovemaking.com>
- * lib/rubygems/dependency_list.rb: Use Array#concat for Ruby 1.x
- performance.
+ * ext/psych/lib/psych/visitors/to_ruby.rb: fix support for regular
+ expressions with newlines. tenderlove/psych#222
- * lib/rubygems/installer.rb: Use formatted program name when comparing
- executables. RubyGems pull request #471
- * test/rubygems/test_gem_installer.rb: Test for the above.
+ * test/psych/test_yaml.rb: test for change.
- * lib/rubygems/package.rb: Use more explicit feature check to work
- around JRuby bug #552
+Fri Feb 6 10:31:50 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/rubygems/ssl_certs/GeoTrust_Global_CA.pem: Added GeoTrust root
- certificate.
+ * vm_core.h (rb_call_info_kw_arg_struct): make keywords a symbols
+ list to get rid of inadvertent creation by variable keyword
+ arguments. [ruby-core:68031] [Bug #10831]
- * test/rubygems/test_gem_source_list.rb: Use "example" instead of real
- hostname
+Thu Feb 5 22:42:34 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
-Thu Feb 28 05:57:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * lib/rubygems: Update to RubyGems HEAD(5c3b6f3).
+ Fixed #1156, #1142, #1115, #1142, #1139 on rubygems/rubygems
+ * test/rubygems: ditto.
- * thread.c: rdoc formatting for Thread, ThreadGroup, and ThreadError
+Thu Feb 5 13:41:01 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Feb 28 02:42:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * vm_eval.c (send_internal), vm_insnhelper.c (vm_call_opt_send):
+ convert String method name into a Symbol, as method_missing
+ method expects its first argument to be a Symbol. [Bug #10828]
- * vm.c: Typo in overview for example of Thread#status returning false
- Reported by Lee Jarvis
+ * vm_insnhelper.c (ci_missing_reason): return the reason of method
+ missing in call info.
-Wed Feb 27 22:54:27 2013 Tanaka Akira <akr@fsij.org>
+ * vm_insnhelper.c (vm_call_opt_send): re-apply r49500 with the
+ proper missing reason. [Bug #10828]
- * ext/socket/rubysocket.h (union_sockaddr): make it longer for SunOS
- and Darwin.
+Thu Feb 5 10:31:46 2015 Shugo Maeda <shugo@ruby-lang.org>
-Wed Feb 27 21:14:34 2013 Kouhei Sutou <kou@cozmixng.org>
+ * class.c (rb_obj_singleton_methods): should use RTEST() to convert
+ VALUE to int.
- * lib/rexml/security.rb (REXML::Security): create.
- * lib/rexml/rexml.rb: move entity_expansion_limit and
- entity_expansion_text_limit accessors to ...
- * lib/rexml/security.rb: ... here.
- * lib/rexml/document.rb: use REXML::Security.
- * lib/rexml/text.rb: use REXML::Security.
- * test/rexml/test_document.rb: use REXML::Security.
+Thu Feb 5 03:59:33 2015 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-Wed Feb 27 19:53:32 2013 Benoit Daloze <eregontp@gmail.com>
+ * vm_insnhelper.c: Fix symbol leak with +send+ [Bug #10828]
- * vm.c (Thread): fix typos in overview
+Wed Feb 4 20:26:54 2015 Masaki Suketa <masaki.suketa@nifty.ne.jp>
-Wed Feb 27 13:21:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * ext/win32ole/win32ole.c (Init_win32ole): should not use atexit to
+ free allocated hash table to avoid error on Cygwin.
- * vm.c (Thread): Typo in overview, swap setting and getting
+Wed Feb 4 15:34:25 2015 Shugo Maeda <shugo@ruby-lang.org>
-Wed Feb 27 13:02:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * class.c (method_entry_i, class_instance_method_list,
+ rb_obj_singleton_methods): should not include methods of
+ superclasses if recur is false. [ruby-dev:48854] [Bug #10826]
- * vm.c (Thread): Documentation overview of Thread class
+Wed Feb 4 16:32:40 2015 Matt Hoyle <matt@deployable.co>
-Wed Feb 27 12:57:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * ext/bigdecimal/bigdecimal.c (VpSetPTR): fix a typo, 'expoennt'
+ to 'exponent'. [ruby-core:67980] [Bug #10823] [Fix GH-825]
- * thread.c (rb_thread_wakeup): rdoc formatting
+Wed Feb 4 15:55:38 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Feb 27 12:53:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * ext/sdbm/_sdbm.c: include ruby/ruby.h for PRIdPTRDIFF when a
+ macro `DEBUG` is defined. based on the patch by Owen Rodley in
+ [ruby-core:67987]. [Bug #10825]
- * thread.c (rb_thread_group): rdoc formatting
+Wed Feb 4 11:12:43 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Feb 27 12:33:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * Makefile.in (probes.stamp): rebuild dtrace dependent objects
+ only when `dtrace -G` modifies its input files.
- * lib/ostruct.rb: Typo in OpenStruct overview [Github Fixes #251]
- Patch by Chun-wei Kuo
+Tue Feb 3 19:27:16 2015 Naohisa Goto <ngotogenome@gmail.com>
-Wed Feb 27 12:13:32 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * common.mk (ruby-glommed.o): dependency on $(OBJ) should be written
+ in common.mk (in which OBJ is defined) because of Makefile include
+ and parse order. This partly reverts r49419.
+ [ruby-dev:48849] [Bug #10808]
- * vm_exec.h (END_INSN): llvm-gcc may optimize out reg_cfp and cause
- Stack/cfp consistency error when the instruction doesn't use reg_cfp.
- Usually instructions use PUSH() but for example trace doesn't.
- This hack cause speed down but you shouldn't use llvm-gcc, use clang.
- [Bug #7938]
+ * Makefile.in (ruby-glommed.o): ditto.
-Wed Feb 27 10:23:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * Makefile.in (ruby-glommed.o): remove excess $(DTRACE_OBJ) because
+ it is included in $(OBJS) since r49451.
- * thread.c (thread_raise_m): rdoc formatting
+ * Makefile.in (probes.o): should depend on $(DTRACE_DEPENDENT_OBJS)
-Tue Feb 26 23:32:44 2013 Kouhei Sutou <kou@cozmixng.org>
+Tue Feb 3 17:15:45 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/rexml/document.rb: move entity_expansion_limit accessor to ...
- * lib/rexml/rexml.rb: ... here for consistency.
- * lib/rexml/document.rb (REXML::Document.entity_expansion_limit):
- deprecated.
- * lib/rexml/document.rb (REXML::Document.entity_expansion_limit=):
- deprecated.
+ * lib/mkmf.rb (try_cppflags, try_cflags, try_ldflags): get rid of
+ interference by modifying global variables in have_devel? method.
+ [ruby-core:67962] [Bug #10821]
-Tue Feb 26 23:26:13 2013 Kouhei Sutou <kou@cozmixng.org>
+Tue Feb 3 15:23:58 2015 Shugo Maeda <shugo@ruby-lang.org>
- * lib/rexml/document.rb: move entity_expansion_text_limit accessor to ...
- * lib/rexml/rexml.rb: ... here to make rexml/text independent from
- REXML::Document. It causes circular require.
- * lib/rexml/document.rb (REXML::Document.entity_expansion_text_limit):
- deprecated.
- * lib/rexml/document.rb (REXML::Document.entity_expansion_text_limit=):
- deprecated.
- * lib/rexml/text.rb: add missing require "rexml/rexml" for
- REXML.entity_expansion_text_limit.
- Reported by Robert Ulejczyk. Thanks!!! [ruby-core:52895] [Bug #7961]
+ * vm_method.c (remove_method): When remove refined
+ method, raise a NameError if the method is not
+ defined in refined class.
-Tue Feb 26 15:12:11 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ But if the method is defined in refined class,
+ it should keep refined method and remove original
+ method.
- * tool/mkconfig.rb: reconstruct comma separated list values. a
- command line to Windows batch file is split not only by spaces
- and equal signs but also by commas and semicolons.
+ Patch by Seiei Higa. [ruby-core:67722] [Bug #10765]
-Tue Feb 26 15:04:19 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Feb 3 14:04:47 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * configure.in (unexpand_shvar): get rid of non-portable shell
- behavior on OpenBSD, so no extra quotes. [Bug #7959]
+ * dir.c (glob_helper): obtain real name with FindFirstFile API
+ instead of matching all entries, on Windows.
+ [ruby-core:67954] [Bug #10819]
-Tue Feb 26 10:24:49 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Feb 3 12:26:35 2015 Katsuhiko Nishimra <ktns.87@gmail.com>
- * parse.y (IS_LABEL_POSSIBLE): allow labels for keyword arguments just
- after method definition without a parenthesis. [ruby-core:52820]
- [Bug #7942]
+ * lib/mkmf.rb (configuration): set the default cxxflags, which is
+ referred from the default CXXFLAGS, for extension libraries.
+ [Fix GH-823]
-Tue Feb 26 04:50:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Tue Feb 3 05:52:00 2015 Aman Gupta <ruby@tmm1.net>
- * error.c: clarify reason for sleep in SignalException example
+ * gc.c (rb_objspace_free): cause rb_bug if lazy sweep is in progress
+ during rb_objspace_free. Adds extra protection for r46340.
+ Patch by Vicent Marti. [Bug #10768] [ruby-core:67734]
+ * gc.c (rb_objspace_call_finalizer): Ensure GC is completed after
+ finalizers have run. We already call gc_rest() before invoking
+ finalizers, but finalizer can allocate new objects and start new GC
+ cycle, so we call gc_rest() again after finalizers are complete.
-Tue Feb 26 03:47:00 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+Mon Feb 2 10:51:34 2015 Ari Pollak <ajp@aripollak.com>
- * error.c: clarify a document of SignalException. Process.kill()
- doesn't have any guarantee when signal will be delivered.
- [Bug #7951] [ruby-core:52864]
+ * doc/security.rdoc (Symbols): update about Symbol GC. Symbols
+ explicitly converted from Strings now can be collected, but
+ reflection/metaprogramming still can cause memory flooding.
+ [Fix GH-725]
-Mon Feb 25 23:51:04 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sun Feb 1 13:46:52 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * include/ruby/version.h: bump RUBY_API_VERSION same as RUBY_VERSION.
+ * tool/rbinstall.rb (bin-comm): drop batch file installation.
+ Windows 95 support has not been supported already.
+ [Feature #10806]
-Mon Feb 25 21:03:34 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Sat Jan 31 12:06:23 2015 Scott Francis <scott.francis@shopify.com>
- * string.c (str_byte_substr): don't set coderange if it's not known.
- [Bug #7954] [ruby-dev:47108]
+ * thread_pthread.c (reserve_stack): fix intermittent SIGBUS on
+ Linux, by reserving the stack virtual address space at process
+ start up so that it will not clash with the heap space.
+ [Fix GH-822]
-Mon Feb 25 16:47:02 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Jan 30 17:28:29 2015 Kazuki Tanaka <gogotanaka@ruby-lang.org>
- * common.mk (realclean-local): miniprelude.c is made by srcs, so it
- should not removed by distclean but by realclean. [Bug #6807]
+ * math.c (num2dbl_with_to_f): make faster when Bignum passed by
+ direct conversion using rb_big2dbl(). [Feature #10800]
-Mon Feb 25 16:30:30 2013 Eric Hodel <drbrain@segment7.net>
+Thu Jan 29 23:30:00 2015 Kenta Murata <mrkn@mrkn.jp>
- * lib/rubygems/config_file.rb: Lazily load .gem/credentials to only
- check permissions when necessary. RubyGems bug #465
- * test/rubygems/test_gem_config_file.rb: Test for the above.
+ * ext/bigdecimal/bigdecimal.c (rb_rational_num): add fallback function
+ for rubies lower than 2.2.0.
- * test/rubygems/test_gem_commands_push_command.rb: Remove duplicated
- test.
+ * ext/bigdecimal/bigdecimal.c (rb_rational_den): ditto.
-Mon Feb 25 15:47:18 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/bigdecimal/extconf.rb: check the existences of struct RRational,
+ rb_rational_num, and rb_rational_den.
- * enc/depend (ARFLAGS): VisualC++ linker does not allow spaces between
- output option and the output file name. [Bug #7950]
+ * ext/bigdecimal/bigdecimal.bundle: bump version.
- * enc/depend (RANLIB): set default command to do nothing, or make the
- entire line a label on Windows.
+Thu Jan 29 20:28:25 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
-Mon Feb 25 14:41:07 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * tool/make-snapshot: removed md5 digest with package information
- * lib/mkmf.rb (MakeMakefile#init_mkmf): default libdirname to libdir.
+Thu Jan 29 10:41:52 2015 Kazuki Tanaka <gogotanaka@ruby-lang.org>
- * tool/rbinstall.rb: ditto.
+ * math.c (Get_Double): direct casting from Fixnum to double.
+ [Feature #10785]
-Mon Feb 25 13:12:39 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Jan 29 02:34:27 2015 Aaron Patterson <aaron@tenderlovemaking.com>
- * configure.in (setup): find Setup file from target_os 1. by
- suffix (e.g. Setup.nacl, Setup.atheos), 2. by "platform"
- option (e.g. Setup.nt, Setup.emx), and 3. default Setup. And
- Setup.dj had been removed.
+ * ext/psych/lib/psych/visitors/to_ruby.rb: fix parsing hashes with
+ instance variables when it is referenced multiple times.
+ * ext/psych/lib/psych.rb: bump version
+ * ext/psych/psych.gemspec: bump version
+ * test/psych/test_hash.rb: test for fix
-Mon Feb 25 12:48:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Thu Jan 29 02:06:09 2015 Eric Wong <e@80x24.org>
- * thread.c: Document Thread::new, clean up ::fork and mention calling
- super if subclassing Thread
+ * thread.c (struct join_arg): restructure and make smaller
+ (thread_join_sleep): avoid timeofday() call if forever
+ (thread_join): pass join_arg.delay directly
+ (rb_thread_inspect_msg): remove, inline into rb_thread_inspect
+ (rb_thread_inspect): reduce branching and string creation
+ * thread_pthread.c (native_set_thread_name): create string directly
+ to avoid reparsing. [Misc #10723]
-Mon Feb 25 12:38:50 2013 Tanaka Akira <akr@fsij.org>
+Wed Jan 28 21:32:24 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
- * ext/socket/extconf.rb: don't test ss_family and ss_len member of
- struct sockaddr_storage. They are not used now except SunOS
- specific code.
+ * thread.c: Improve documentation for Thread#value
+ [Bug #10694][ruby-core:67324][ci skip]
-Mon Feb 25 11:03:38 2013 Akinori MUSHA <knu@iDaemons.org>
+Tue Jan 27 16:04:19 2015 NAKAMURA Usaku <usa@ruby-lang.org>
- * configure.in (unexpand_shvar): Use the numeric comparison
- operator instead of '==' which is a ksh extension. [Bug #7941]
+ * tool/redmine-backporter.rb: added `!` command.
-Mon Feb 25 02:37:56 2013 Tanaka Akira <akr@fsij.org>
+Tue Jan 27 15:58:23 2015 NAKAMURA Usaku <usa@ruby-lang.org>
- * ext/socket: define and use union_sockaddr instead of struct
- sockaddr_storage for less casts.
+ * tool/redmine-backporter.rb: added history feature for platforms which
+ lack readline.
- * ext/socket/rubysocket.h (union_sockaddr): defined.
+Mon Jan 26 22:09:35 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
- * ext/socket/socket.c (sock_accept): use union_sockaddr.
- (sock_accept_nonblock): ditto.
- (sock_sysaccept): ditto.
- (sock_s_getnameinfo): ditto.
+ * .gitignore: ignored temporary file with git.
- * ext/socket/basicsocket.c (bsock_getsockname): ditto.
- (bsock_getpeername): ditto.
- (bsock_local_address): ditto.
- (bsock_remote_address): ditto.
+Mon Jan 26 18:06:03 2015 Akinori MUSHA <knu@iDaemons.org>
- * ext/socket/ancdata.c (bsock_recvmsg_internal): ditto.
+ * misc/ruby-electric.el: Import version 2.2.2 from
+ https://github.com/knu/ruby-electric.el.
- * ext/socket/init.c (recvfrom_arg): ditto.
- (recvfrom_blocking): ditto.
- (rsock_s_recvfrom): ditto.
- (rsock_s_recvfrom_nonblock): ditto.
- (rsock_getfamily): ditto.
+Mon Jan 26 11:37:49 2015 Dave Stevens <dave@crowdlab.com>
- * ext/socket/raddrinfo.c (rb_addrinfo_t): ditto.
- (ai_get_afamily): ditto.
- (inspect_sockaddr): ditto.
- (addrinfo_mdump): ditto.
- (addrinfo_mload): ditto.
- (addrinfo_getnameinfo): ditto.
- (addrinfo_ip_port): ditto.
- (extract_in_addr): ditto.
- (addrinfo_ipv6_to_ipv4): ditto.
- (addrinfo_unix_path): ditto.
+ * string.c (str_make_independent_expand): terminate String when
+ moved from heap to embedded. [Fix GH-821].
- * ext/socket/tcpserver.c (tcp_accept): ditto.
- (tcp_accept_nonblock): ditto.
- (tcp_sysaccept): ditto.
+Sun Jan 25 12:04:12 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/socket/ipsocket.c (ip_addr): ditto.
- (ip_peeraddr): ditto.
- (ip_s_getaddress): ditto.
+ * array.c (flatten): no need to call to_ary method on elements
+ beyond the given level. [ruby-core:67637] [Bug #10748]
-Sun Feb 24 21:15:05 2013 Tadayoshi Funaba <tadf@dotrb.org>
+Sun Jan 25 00:42:24 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/date/date_core.c: [ruby-core:52303]
+ * ext/fiddle/win32/libffi.mk.tmpl: assemble without directory prefix.
+ workaround of a bug of VC12 ml, by unak at [ruby-core:67792].
+ [ruby-core:67789] [Bug #10780]
-Sun Feb 24 15:33:46 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Jan 24 19:56:25 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * random.c (rb_random_ulong_limited): limit is inclusive, but generic
- rand method should return a number less than it, so increase for the
- difference. [ruby-core:52779] [Bug #7935]
+ * dln_find.c (dln_find_1): search regular files only. based on
+ the patch by Alex Coomans in [ruby-core:67766]. [Bug #10776]
-Sun Feb 24 15:32:36 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Jan 23 23:57:05 2015 Misumi Rize <r@ayase-e.li>
- * random.c (rb_random_ulong_limited): limit is inclusive, but generic
- rand method should return a number less than it, so increase for the
- difference. [ruby-core:52779] [Bug #7935]
+ * vm_insnhelper.c (vm_throw_start): search the target to break
+ from a block with nested rescue, from the nested blocks.
+ [ruby-core:67765] [Bug #10775] [Fix GH-820]
-Sun Feb 24 15:14:43 2013 Eric Hodel <drbrain@segment7.net>
+Fri Jan 23 20:00:59 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/net/http.rb: Removed duplicate Accept-Encoding in Net::HTTP#get.
- [ruby-trunk - Bug #7924]
- * test/net/http/test_http.rb: Test for the above.
+ * marshal.c (w_object, marshal_dump): use identity tables for
+ arbitrary VALUE keys, because of performance of FLONUM.
+ [Bug #10761]
-Wed Feb 20 14:28:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * marshal.c (obj_alloc_by_klass, marshal_load): ditto.
- * thread.c: Document ThreadGroup::Default
+Fri Jan 23 17:12:33 2015 Eric Wong <e@80x24.org>
-Wed Feb 20 14:23:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * benchmark/bm_marshal_dump_flo.rb: new benchmark for [Bug #10761]
- * thread.c: Grammar for #backtrace_locations and ::handle_interrupt
+Thu Jan 22 18:03:19 2015 NAKAMURA Usaku <usa@ruby-lang.org>
-Sun Feb 24 13:35:57 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * tool/redmine-backporter.rb (find_svn_log): use double quotes instead
+ of single quotes because cmd.exe doesn't handle them.
- * vm_insnhelper.c (vm_call_method): block level control frame does not
- have method entry, so obtain the method entry from method top-level
- control frame to be compared with refined method entry.
- [ruby-core:52750] [Bug #7925]
+ * tool/redmine-backporter.rb (done): the 2nd element of matched data
+ is the offset of the end of matched string, not length.
-Wed Feb 20 13:23:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Thu Jan 22 16:45:24 2015 Eric Wong <e@80x24.org>
- * object.c: Document methods receiving string and convert to symbol
- Patch by Stefan Rusterholz
- * vm_eval.c: ditto
- * vm_method.c: ditto
+ * st.c (st_numhash): mix float value for flonum
+ * hash.c (rb_any_hash): ditto
+ * benchmark/bm_hash_aref_flo.rb: new benchmark
+ * benchmark/bm_hash_ident_flo.rb: ditto
+ [Bug #10761]
-Wed Feb 20 07:20:56 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+Wed Jan 21 22:33:51 2015 Akinori MUSHA <knu@iDaemons.org>
- * signal.c (sigsegv): suppress unused result warning. Because
- write(2) is marked __warn_unused_result__ on Linux glibc.
+ * misc/ruby-electric.el: Import version 2.2.1 from
+ https://github.com/knu/ruby-electric.el. Improve compatibility
+ with and optimize for Emacs 24.4.
-Sun Feb 24 07:50:53 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Jan 21 09:40:52 2015 Zachary Scott <e@zzak.io>
- * compile.c (iseq_set_arguments): no keyword check if any keyword rest
- argument exists, even unnamed. [ruby-core:52744] [Bug #7922]
+ * file.c: Document other cases of missing birthtime on OS with patch
+ provided by @sho-h similar to GH-817. [ci skip] [DOC]
-Sat Feb 23 16:51:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Wed Jan 21 09:09:19 2015 Tanaka Akira <akr@fsij.org>
- * thread.c: Documentation for Thread#backtrace_locations
+ * NEWS: References to tickets added.
+ [ruby-core:67701] [Bug #10760] Suggested by Zachary Scott.
-Sat Feb 23 16:05:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Tue Jan 20 22:59:54 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
- * vm.c: Typo in ObjectSpace::WeakMap overview
+ * tool/vcs.rb: fix the exception given remote-url of svn.
-Sat Feb 23 16:00:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Tue Jan 20 12:58:33 2015 NAKAMURA Usaku <usa@ruby-lang.org>
- * thread.c: Improved rdoc for ::handle_interrupt, ::pending_interrupt?
- and #pending_interrupt?
+ * tool/redmine-backporter.rb: now can change the page of `ls`.
-Sat Feb 23 12:26:43 2013 Akinori MUSHA <knu@iDaemons.org>
+Tue Jan 20 12:28:37 2015 NAKAMURA Usaku <usa@ruby-lang.org>
- * misc/ruby-electric.el (ruby-electric-curlies)
- (ruby-electric-matching-char, ruby-electric-bar): Avoid electric
- insertion when there is a prefix argument.
+ * tool/redmine-backporter.rb (readline): fallback to normal gets on
+ Windows because IO.console.getch is not always do as expected.
- * misc/ruby-electric.el (ruby-electric-insert)
- (ruby-electric-cua-replace-region-p)
- (ruby-electric-cua-replace-region): Avoid electric insertion and
- fall back when cua-mode is enabled and a region is active.
+Tue Jan 20 11:31:07 2015 NAKAMURA Usaku <usa@ruby-lang.org>
-Sat Feb 23 12:35:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * tool/redmine-backporter.rb: update usage.
- * array.c: Document #<=> return values and formatting
- * bignum.c: ditto
- * file.c: ditto
- * object.c: ditto
- * numeric.c: ditto
- * rational.c: ditto
- * string.c: ditto
- * time.c: ditto
+Tue Jan 20 11:23:47 2015 NARUSE, Yui <naruse@ruby-lang.org>
-Sat Feb 23 10:50:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * tool/redmine-backporter.rb (mygets): to support Backspace
+ implement gets by itself.
- * array.c (rb_ary_diff, rb_ary_and, rb_ary_or): Document return order
- [RubySpec #7803]
+Tue Jan 20 02:54:11 2015 Zachary Scott <e@zzak.io>
-Sat Feb 23 10:17:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * file.c: NotImplementedError is raised if birthtime is unavailable.
+ Patch by @y-yagi san and [Fixes GH-817] [ci skip] [DOC]
- * object.c (rb_obj_comp): Documenting Object#<=> return values
- Patch by Stefan Rusterholz
+ * ext/pathname/pathname.c: ditto.
-Sat Feb 23 09:48:41 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Jan 19 22:08:26 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * dir.c (file_s_fnmatch, fnmatch_brace): encoding-incompatible pattern
- and string do not match, instead of exception. [ruby-dev:47069]
- [Bug #7911]
+ * class.c (include_modules_at): allow to prepend each module up to
+ once for each classe. [EXPERIMENTAL]
-Sat Feb 23 08:57:46 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
+Sun Jan 18 18:32:20 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
- * doc/NEWS-*: Update NEWS from their respective branches
+ * math.c (math_atan2): revive documentation before r49220.
+ http://d.hatena.ne.jp/nagachika/20150112/ruby_trunk_changes_49213_49226
-Sat Feb 23 08:14:43 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
+Sun Jan 18 15:57:32 2015 Seiei Higa <hanachin@gmail.com>
- * NEWS: many additions for Ruby 2.0.0
+ * vm_method.c (check_definition): Module#public_method_defined?,
+ Module#private_method_defined?, Module#protected_method_defined?
+ should not use refinements. [ruby-core:67656] [Bug #10753]
- * object.c: Add doc for Module.prepended
+Sun Jan 18 15:50:39 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Feb 23 07:52:53 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm_dump.c (rb_vm_bugreport): check by configured result instead
+ of system name for old FreeBSD. based on a patch by Steve Wills
+ at [ruby-core:67655]. [Bug #10752]
- * template/ruby.pc.in: reorder library flags which may refer library
- names. [Bug #7913]
+Sun Jan 18 12:56:49 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Feb 22 23:46:20 2013 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
+ * Makefile.in (VPATH, NEWLINE_C), common.mk (common-srcs): make
+ and use newline.c under enc/trans directory, not toplevel. no
+ longer search enc directory implicitly.
- * lib/rexml/document.rb (REXML::Document.entity_expansion_text_limit):
- fix a typo in comment in r39384.
+ * configure.in, enc/Makefile.in (BUILTIN_ENCS, BUILTIN_TRANSES):
+ prefix respective directory names to builtin encodings and
+ transcoder source names.
-Fri Feb 22 18:31:46 2013 Aaron Patterson <aaron@tenderlovemaking.com>
+Sun Jan 18 11:49:46 2015 Masaki Suketa <masaki.suketa@nifty.ne.jp>
- * lib/rexml/document.rb (REXML::Document.entity_expansion_text_limit):
- new attribute to read/write entity expansion text limit. the default
- limit is 10Kb.
+ * ext/win32ole/win32ole.c (ole_invoke): avoid SEGV when VT_RECORD
+ variable is passed by reference. [ruby-dev:48803] [Bug #10697]
- * lib/rexml/text.rb (REXML::Text.unnormalize): check above attribute.
+Sat Jan 17 23:59:15 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Feb 22 17:36:23 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * ext/psych/lib/psych/visitors/yaml_tree.rb (visit_String):
+ anchors like `\Z` are not valid inside character class. use
+ negative-lookahead instead.
+ Fixes: https://github.com/tenderlove/psych/issues/221
- * test/test_rbconfig.rb (TestRbConfig): fix r39372.
- It must see RbConfig::CONFIG instead of CONFIG.
+Sat Jan 17 23:42:27 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Feb 22 14:55:41 2013 Naohisa Goto <ngotogenome@gmail.com>
+ * configure.in: get rid of pattern substitution, which is not
+ supported by ash, and ash on NetBSD parses whole source first
+ and fails to start. [ruby-dev:48823] [Bug #10750]
- * signal.c (ruby_abort): fix typo in r39354 [Bug #5014]
+Fri Jan 16 18:42:58 2015 NARUSE, Yui <naruse@ruby-lang.org>
-Fri Feb 22 12:46:41 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * tool/redmine-backporter.rb: support adding related revisions
+ to issues.
- * random.c (rb_random_ulong_limited): fix error message for negative
- value. [ruby-dev:47061] [Bug #7903]
+Fri Jan 16 17:20:33 2015 Koichi Sasada <ko1@atdot.net>
-Fri Feb 22 11:36:45 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ vm.c, vm_core.h: constify VM_CF_LEP, VM_CF_PREV_EP, VM_CF_BLOCK_PTR
+ and rb_vm_control_frame_block_ptr.
- * test/test_rbconfig.rb (TestRbConfig): skip user defined values by
- configuration options. [Bug #7902]
+Fri Jan 16 15:41:21 2015 Aaron Patterson <aaron@tenderlovemaking.com>
-Fri Feb 22 11:33:42 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/psych/lib/psych.rb: bump version
- * lib/mkmf.rb (MakeMakefile#init_mkmf): adjust default library path
- for multiarch. [Bug #7874]
+ * ext/psych/psych.gemspec: ditto
-Fri Feb 22 11:10:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Fri Jan 16 15:37:49 2015 Aaron Patterson <aaron@tenderlovemaking.com>
- * enum.c (Enumerable#chunk: Improved examples, grammar, and formatting
- Patch by Dan Bernier and Rich Bruchal of newhaven.rb
- [Github documenting-ruby/ruby#8]
+ * ext/psych/lib/psych/visitors/yaml_tree.rb: only dump hash
+ subclasses. Thanks Joe Eli McIlvain <joe.eli.mac@gmail.com>
-Fri Feb 22 11:00:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * test/psych/test_hash.rb: test for change
- * numeric.c: Examples and formatting for Numeric and Float
- Based on a patch by Zach Morek and Oren K of newhaven.rb
- [Github documenting-ruby/ruby#5]
+Fri Jan 16 15:35:21 2015 Aaron Patterson <aaron@tenderlovemaking.com>
-Fri Feb 22 07:04:41 2013 Eric Hodel <drbrain@segment7.net>
+ * ext/psych/lib/psych.rb: bump version
- * lib/rubygems/installer.rb (build_extensions): Create extension
- install destination before building extension. Patch by Kenta Murata.
- [ruby-trunk - Bug #7897]
- * test/rubygems/test_gem_installer.rb: Test for the above.
+ * ext/psych/lib/psych/visitors/yaml_tree.rb: fix line width wrapping
+ for long strings. Thanks Jakub Jirutka <jakub@jirutka.cz>
-Fri Feb 22 06:30:57 2013 Eric Hodel <drbrain@segment7.net>
+ * test/psych/test_string.rb: test for change
- * doc/globals.rdoc: Document what setting $DEBUG does.
+Fri Jan 16 11:44:44 2015 Kazuki Tsujimoto <kazuki@callcc.net>
- * doc/globals.rdoc: Added pointer to $-d for full documentation.
+ * eval_intern.h, vm.c, vm_eval.c, vm_insnhelper.c:
+ change throw mechanism (not save target ep, but save target cfp).
+ It fixes `unexpected break' bug that occurs when
+ TracePoint#binding is called.
+ [ruby-dev:48797] [Bug #10689]
-Fri Feb 22 06:27:07 2013 Eric Hodel <drbrain@segment7.net>
+ * test/ruby/test_settracefunc.rb: add a test.
- * doc/globals.rdoc: Document what setting $VERBOSE does. [Bug #7899]
+Thu Jan 15 23:55:15 2015 Tanaka Akira <akr@fsij.org>
- * doc/globals.rdoc: Added pointer to $-w and $-v for full
- documentation.
+ * io.c (rb_io_close_m): Don't raise when the IO object is closed.
+ [ruby-core:67444] [Feature #10718]
-Fri Feb 22 02:33:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Thu Jan 15 21:34:57 2015 Seiei Higa <hanachin@gmail.com>
- * lib/abbrev.rb: Add words parameter to Abbrev::abbrev
- Patch by Devin Weaver [Github documenting-ruby/ruby#7]
+ * proc.c (rb_obj_singleton_method): Kernel#singleton_method should
+ not use refinements, as well as Kernel#method.
+ [ruby-core:67603] [Bug #10744]
-Thu Feb 21 17:28:14 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Thu Jan 15 10:45:04 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * tool/merger.rb: add interaction when only ChangeLog is modified.
+ * array.c (rb_ary_select_bang, ary_reject_bang): linear
+ performance. [ruby-core:67418] [Feature #10714]
-Thu Feb 21 16:34:46 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Jan 14 18:06:06 2015 Martin Duerst <duerst@it.aoyama.ac.jp>
- * signal.c (check_stack_overflow): extract duplicated code and get rid
- of declaration-after-statement. [Bug #5014]
+ * lib/uri/mailto.rb: raising URI::InvalidComponentError instead
+ of failing with undefined method `split' for nil:NilClass for
+ mailto: URIs without opaque part. [Bug #10738]
+ * test/uri/testuri.rb: Test for above
-Thu Feb 21 14:14:13 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+Wed Jan 14 16:45:24 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * signal.c (sigsegv): avoid to use async signal unsafe functions
- when nested sigsegv is happen.
- [Bug #5014] [ruby-dev:44082]
+ * tool/downloader.rb (RubyGems.download): verify downloaded gem
+ packages. LowSecurity to allow untrusted certificates now.
-Thu Feb 21 13:47:59 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+Wed Jan 14 15:43:48 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * file.c (rb_group_member): added an error check. SUS says,
- getgroups(small_value) may return EINVAL.
+ * ext/readline/readline.c (readline_s_refresh_line): initialize
+ before rl_refresh_line(), as some function make the internal
+ state non-clean but rl_refresh_line() does not re-initialize it.
+ [ruby-core:43957] [Bug #6232]
-Thu Feb 21 13:37:07 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+Tue Jan 13 21:59:24 2015 Michal Papis <mpapis@gmail.com>
- * process.c (RB_MAX_GROUPS): moved to
- * internal.h (RB_MAX_GROUPS): here.
+ * tool/rbinstall.rb (gem): fix changing permissions of installed
+ bundled gems. [Fix GH-812]
- * file.c (rb_group_member): use RB_MAX_GROUPS instead of
- RUBY_GROUP_MAX. They are the same.
+Tue Jan 13 21:57:12 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Feb 21 13:15:40 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * common.mk (distclean-local): remove autom4te.cache generated by
+ autoconf.
- * file.c (access_internal): removed.
- * file.c (rb_file_readable_real): use access() instead of
- access_internal().
- * file.c (rb_file_writable_real): ditto.
- * file.c (rb_file_executable_real): ditto.
+ * common.mk (realclean-local): remove id sources and dummy header
+ for dtrace. [ruby-core:67562] [Bug #10737]
-Thu Feb 21 13:04:59 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+Tue Jan 13 21:08:22 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
- * file.c (eaccess): use access() when not using setuid nor setgid.
- This is minor optimization.
+ * ext/json, test/json: merge JSON HEAD(259dee6)
+ separate implementation of Typed_Data macro.
+ https://github.com/flori/json/compare/v1.8.1...v1.8.2
-Thu Feb 21 12:56:19 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+Tue Jan 13 14:16:35 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * file.c (rb_group_member): get rid of NGROUPS dependency.
- [Bug #7886] [ruby-core:52537]
+ * test/net/http/test_http.rb: get rid of accessing DNS actually
+ for some servers returning wrong results.
+ [ruby-core:67454] [Bug #10721]
-Thu Feb 21 12:45:03 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Jan 12 23:21:57 2015 NAKAMURA Usaku <usa@ruby-lang.org>
- * ruby.c (ruby_init_loadpath_safe): try two levels upper for stripping
- libdir name. [Bug #7874]
+ * gems/bundled_gems: update test-unit to 3.0.9.
- * configure.in (libdir_basename): expand with multiarch in configure,
- not to defer the expansion till ruby.pc.in and mkmf.rb. [Bug #7874]
+Mon Jan 12 18:35:44 2015 Eric Wong <e@80x24.org>
- * configure.in (libdir_basename): also -rpath and -install_name flags
- are affected when libruby directory changes. [Bug #7874]
+ * numeric.c (bit_coerce): use original value for error message
+ [ruby-core:67405] [Bug #10711]
+ * test/ruby/test_numeric.rb (test_coerce): check error message
-Wed Feb 20 19:27:02 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Jan 12 18:01:24 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * include/ruby/ruby.h (HAVE_RB_SCAN_ARGS_OPTIONAL_HASH): for
- rb_scan_args() optional hash feature. [Bug #7861]
+ * lib/rdoc/text.rb (expand_tabs): get rid of infinite loop with
+ CR. should check if substitution occurred too.
+ [ruby-dev:48813] [Bug #10732]
-Wed Feb 20 18:02:26 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Jan 12 16:45:46 2015 Seiei Higa <hanachin@gmail.com>
- * configure.in (target_os): do not strip -gnu suffix on Linux if
- --target is given explicitly. [Bug #7874]
+ * vm_method.c (rb_alias): raise a NameError when creating alias to
+ a refined method if the original method of the refined method is
+ not defined. [ruby-core:67523] [Bug #10731]
- * configure.in (libdirname): adjust library path name which libruby
- files will be installed. [Bug #7874]
+Mon Jan 12 13:53:17 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
- * tool/rbinstall.rb (libdir): ditto.
+ * math.c (math_atan2): improve documentation.
+ [Feature #10323][ruby-core:65400][ci skip]
-Wed Feb 20 13:37:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Mon Jan 12 13:50:49 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
- * ext/pty/pty.c: Documentation for the PTY module
+ * ext/bigdecimal/bigdecimal.c: fixes documentation like labeled lists,
+ code examples etc. [ruby-core:66730][Bug #10576][ci skip]
-Wed Feb 20 12:18:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Mon Jan 12 13:36:44 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
- * object.c: Document Data class [Bug #7890] [ruby-core:52549]
- Patch by Matthew Mongeau
+ * lib/optparse.rb: improvements for OptionParser documentation.
+ [misc #10608][ruby-core:66901][ci skip]
-Wed Feb 20 11:50:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Mon Jan 12 13:33:52 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
- * lib/mutex_m.rb: Add rdoc for Mutex_m module
+ * array.c (rb_ary_each): documented return value.
+ [misc #10469][ruby-core:66063]
-Wed Feb 20 09:34:43 2013 Eric Hodel <drbrain@segment7.net>
+Sun Jan 11 15:11:38 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/rubygems/commands/update_command.rb: Create the installer after
- options are processed. [ruby-trunk - Bug #7779]
- * test/rubygems/test_gem_commands_update_command.rb: Test for the
- above.
+ * test/webrick/test_utils.rb (test_create_listeners): use
+ dynamically chosen port number, not hardcoded port number.
+ [ruby-core:67508]
-Wed Feb 20 07:51:19 2013 Eric Hodel <drbrain@segment7.net>
+Sat Jan 10 12:57:12 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
- * lib/rubygems/installer.rb: Use gsub instead of gsub! to avoid
- altering @bin_dir. Fixes tests on windows. [ruby-trunk - Bug #7885]
+ * ext/zlib/zlib.c: fix document of method signatures.
+ [Bug #10668][ruby-core:67186][ci skip]
-Tue Feb 19 20:50:00 2013 Kenta MURATA <mrkn@mrkn.jp>
+Sat Jan 10 12:32:44 2015 NAKAMURA Usaku <usa@ruby-lang.org>
- * ext/bigdecimal/bigdecimal.gemspec: bump to 1.2.0.
- [ruby-core:51777] [Bug #7761]
+ * eval_error.c (error_print): pos and len parameters of rb_str_substr()
+ are counted by characters, not bytes. use rb_str_subseq() instead.
+ [Bug #10727] [ruby-core:67473]
-Tue Feb 19 13:07:25 2013 Akinori MUSHA <knu@iDaemons.org>
+Sat Jan 10 10:58:55 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
- * ext/syslog/syslog.c (Init_syslog): Define inspect as a singleton
- method and remove it as an instance method. [Bug #6502]
+ * complex.c: removed commented-out code.
-Tue Feb 19 12:30:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Sat Jan 10 10:57:19 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
- * object.c: rdoc formatting for Kernel#Array()
- * array.c: Add rdoc for Array() method to Creating Arrays section
+ * rational.c: removed commented-out code.
+ [Feature #10376][ruby-core:65643]
-Tue Feb 19 10:35:52 2013 Eric Hodel <drbrain@segment7.net>
+Sat Jan 10 10:12:15 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/openssl/ossl.c (class OpenSSL): Use only inner parenthesis in
- create_extension examples.
+ * array.c (rb_ary_select_bang): keep the array consistent by
+ removing unselected values soon. [ruby-dev:48805] [Bug #10722]
-Tue Feb 19 10:27:12 2013 Eric Hodel <drbrain@segment7.net>
+Fri Jan 9 23:20:04 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
- * ext/openssl/ossl.c (class OpenSSL): Fixed ExtensionFactory example.
- Patch by Richard Bradley. [ruby-trunk - Bug #7551]
+ * lib/rubygems: Update to RubyGems HEAD(e53c54a).
+ * test/rubygems: ditto.
-Tue Feb 19 08:32:11 2013 Koichi Sasada <ko1@atdot.net>
+Fri Jan 9 11:13:01 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * vm_eval.c (vm_call0_body): check interrupts after method dispatch
- from C methods. [Bug #7878]
+ * parse.y (assocs, assoc): eliminate splatting empty literal
+ hashes. [ruby-core:67446] [Bug #10719]
-Tue Feb 19 08:14:40 2013 Eric Hodel <drbrain@segment7.net>
+ * compile.c (compile_array_): support splatted hash in hash type.
- * lib/rubygems/installer.rb: Fixed placement of executables with
- --user-install. [ruby-trunk - Bug #7779]
- * test/rubygems/test_gem_installer.rb: Test for above.
+Fri Jan 9 10:57:09 2015 Vit Ondruch <vondruch@redhat.com>
-Tue Feb 19 06:04:06 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * configure.in (RUBY_SETJMP_TYPE): Remove superfluous semicolon
+ which causes a syntax error with autoconf 2.63.
+ [ruby-core:67429] [Bug #10716]
- * vm_dump: FreeBSD ports' libexecinfo's backtrace(3) can't trace
- beyond signal trampoline, and as described in r38342 it can't
- trace on -O because it see stack frame pointers.
- libunwind unw_backtrace see dwarf information in the binary
- and it works with -O (without frame pointers).
+Fri Jan 9 07:23:32 2015 Aaron Patterson <aaron@tenderlovemaking.com>
- * configure.in: remove r38342's hack and check libunwind.
+ * ext/psych/lib/psych/visitors/yaml_tree.rb: correctly quote non-ascii
+ letters. Thanks @jirutka for the patch.
-Tue Feb 19 04:26:29 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * test/psych/test_string.rb: test for change
- * configure.in: check whether backtrace(3) works well or not.
+Fri Jan 9 07:13:55 2015 Aaron Patterson <aaron@tenderlovemaking.com>
- * vm_dump.c: set HAVE_BACKTRACE 0 if BROKEN_BACKTRACE.
+ * ext/psych/lib/psych/visitors/to_ruby.rb: call `allocate` on hash
+ subclasses. Fixes github.com/tenderlove/psych/issues/196
-Mon Feb 18 16:30:18 2013 Akinori MUSHA <knu@iDaemons.org>
+ * test/psych/test_hash.rb: test for change
- * lib/ipaddr.rb (IPAddr#in6_addr): Fix a typo with the closing
- parenthesis.
+Fri Jan 9 06:58:43 2015 Aaron Patterson <aaron@tenderlovemaking.com>
-Mon Feb 18 12:32:24 2013 Akinori MUSHA <knu@iDaemons.org>
+ * ext/psych/lib/psych/visitors/to_ruby.rb: revive hashes with ivars
- * lib/ipaddr.rb (IPAddr#in6_addr): Fix the parser so that it can
- recognize IPv6 addresses with only one edge 16-bit piece
- compressed, like [::2:3:4:5:6:7:8] or [1:2:3:4:5:6:7::].
- [Bug #7477]
+ * ext/psych/lib/psych/visitors/yaml_tree.rb: dump hashes with ivars.
+ Fixes github.com/psych/issues/43
-Mon Feb 18 10:09:54 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/psych/test_hash.rb: test for change
- * configure.in (unexpand_shvar): regularize a shell variable by
- unexpanding shell variables in it.
+Thu Jan 8 17:05:00 2015 Seiei Higa <hanachin@gmail.com>
-Sun Feb 17 20:55:44 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm_method.c (rb_method_entry): if no super class, no original
+ method entry. [ruby-core:67389] [Bug #10707]
- * compar.c (rb_invcmp): compare by inversed comparison, with preventing
- from infinite recursion. [ruby-core:52305] [Bug #7870]
+Thu Jan 8 16:31:43 2015 Seiei Higa <hanachin@gmail.com>
- * string.c (rb_str_cmp_m), time.c (time_cmp): get rid of infinite
- recursion.
+ * vm_method.c (rb_export_method): bail out if the original method
+ is undefined when the method is refined.
+ [ruby-core:67387] [Bug #10706]
-Sun Feb 17 17:23:22 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Jan 8 12:53:44 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/mkmf.rb: remove extra topdir in VPATH, which was in
- win32/Makefile.sub for some reason and moved from there.
- [ruby-dev:46998] [Bug #7864]
+ * dir.c (glob_helper): match in case-folding only if the directory
+ resides on a case-insensitive file system, on OSX.
+ [ruby-core:67364] [Bug #10700]
-Sun Feb 17 01:19:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Thu Jan 8 11:39:18 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
- * ext/psych/lib/psych/y.rb: Document Kernel#y by Adam Stankiewicz
- [Github tenderlove/psych#127]
+ * .travis.yml: Remove redundant configuration option.
+ [fix GH-809] Patch by @gxworld
-Sun Feb 17 00:52:14 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Thu Jan 8 07:17:14 2015 Eric Wong <e@80x24.org>
- * tool/mkconfig.rb: remove prefix from rubyarchdir.
- r39267 expands variables, it changes expansion timing,
- breaks RbConfig::CONFIG["includedir"] and building
- extension libraries with installed ruby.
+ * lib/resolv.rb: consider ENETUNREACH as ResolvTimeout
+ [ruby-core:67411] [Bug #10712]
-Sat Feb 16 20:51:17 2013 Kazuki Tsujimoto <kazuki@callcc.net>
+Thu Jan 8 00:13:52 2015 Tanaka Akira <akr@fsij.org>
- * vm.c (ENV_IN_HEAP_P): fix off-by-one error.
+ * lib/open3.rb: Open3 properly passes non-keyword hash args to spawn.
+ Fixed by Josh Cheek. [Fix GH-808]
+ Related to [ruby-core:67347] [Bug #10699]
-Sat Feb 16 20:47:16 2013 Akinori MUSHA <knu@iDaemons.org>
+Wed Jan 7 19:19:26 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * configure.in (LIBRUBY_DLDFLAGS): Fix a bug where --with-opt-dir
- options given were not reflected to LIBRUBY_DLDFLAGS on many
- platforms including Linux and other GNU-based systems, NetBSD,
- AIX and BeOS.
+ * dir.c (dir_initialize): workaround of opendir failure at symlink
+ directories on Windows via CIFS.
-Sat Feb 16 20:43:20 2013 Tanaka Akira <akr@fsij.org>
+Wed Jan 7 18:52:50 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/socket/ancdata.c (rsock_recvmsg): ignore truncated part of
- socket address returned from recvmsg().
+ * dir.c (need_normalization): not only HFS+, CIFS (SMB) is also
+ decomposed. [Bug #10704]
- * ext/socket/init.c (recvfrom_blocking): ignore truncated part of
- socket address returned from recvfrom().
- (rsock_s_recvfrom_nonblock): ditto.
+ * dir.c (NORMALIZE_UTF8PATH): Unicode decomposition seems to
+ perform in an upper layer than file systems on OSX, as all path
+ names are always decomposed regardless of file system types.
-Sat Feb 16 20:05:26 2013 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
+Tue Jan 6 21:41:04 2015 Tanaka Akira <akr@fsij.org>
- * test/ruby/test_thread.rb: fixed typo
- patched by Hiroki Matsue via https://github.com/ruby/ruby/pull/248
+ * time.c (timelocalw): Set tm_isdst field -1 if vtm->isdst is
+ VTM_ISDST_INITVAL. This bug is introduced at packing struct
+ vtm (r45155).
+ [ruby-core:67345] [Bug #10698] Reported by Boris Ruf.
-Sat Feb 16 16:08:35 2013 Koichi Sasada <ko1@atdot.net>
+Tue Jan 6 03:10:54 2015 Koichi Sasada <ko1@atdot.net>
- * vm.c (rb_thread_mark): mark a working Proc of bmethod
- (a method defined by define_method) even if the method was removed.
- We could not trace working Proc object which represents the body
- of bmethod if the method was removed (alias/undef/overridden).
- Simply, it was mark miss.
- This patch by Kazuki Tsujimoto. [Bug #7825]
+ * test/fiddle/test_handle.rb: fix syntax.
- NOTE: We can brush up this marking because we do not need to mark
- `me' on each living control frame. We need to mark `me's
- only if `me' was free'ed. This is future work after Ruby 2.0.0.
+Tue Jan 6 00:16:10 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/ruby/test_method.rb: add a test.
+ * test/fiddle/test_handle.rb (test_NEXT): use -test-/dln/empty
+ which is always a shared object and is not used by others.
+ [ruby-dev:48629] [Bug #10384]
-Sat Feb 16 15:45:56 2013 Koichi Sasada <ko1@atdot.net>
+Mon Jan 5 14:58:01 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
- * proc.c (rb_binding_new_with_cfp): create binding object even if
- the frame is IFUNC. But return a ruby-level binding to keep
- compatibility.
- This patch fix degradation introduced from r39067.
- [Bug #7774] [ruby-dev:46960]
+ * test/ruby/test_io.rb: added timeout for AIX environment.
+ [ruby-core:62983][Bug #9917]
- * test/ruby/test_settracefunc.rb: add a test.
+Sun Jan 4 22:33:33 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Feb 16 13:40:13 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/lib/test/unit.rb (ExcludesOption): add "excludes" support
+ to test suite, for alternative implementations and platforms.
+ [Feature #10682]
- * configure.in (shvar_to_cpp): do not substitute exec_prefix itself
- with RUBY_EXEC_PREFIX, which cause recursive definition.
- [ruby-core:52296] [Bug #7860]
+Sun Jan 4 22:32:42 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Feb 16 13:13:04 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/lib/test/unit.rb (Test::Unit): reorder modules and merge
+ each modules.
- * ext/io/console/io-console.gemspec: bump to 0.4.2. now explicitly
- requires ruby 1.9.3 or later. [Bug #7847]
+ * test/lib/test/unit.rb (Test::Unit): split the large class into
+ each modules.
- * ext/io/console/console.c (console_dev): compatibility with ruby 1.8.
+Sun Jan 4 21:32:52 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/io/console/console.c (rawmode_opt, console_dev): compatibility
- with ruby 1.9. [ruby-core:52220] [Bug #7847]
+ * parse.y (f_label): return tLABEL value as it is.
+ [ruby-core:67315] [Bug #10693]
-Sat Feb 16 12:45:50 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sun Jan 4 14:02:37 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * configure.in: unexpand arch sitearch and exec_prefix values, so
- directly specified bindir, libdir, rubyprefix, etc can be properly
- substituted. [ruby-core:52296] [Bug #7860]
+ * test/lib/test/unit/parallel.rb (run): expand the file name to be
+ loaded, so that relative paths work in parallel mode.
-Sat Feb 16 12:15:20 2013 Aaron Patterson <aaron@tenderlovemaking.com>
+Sun Jan 4 13:36:56 2015 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * parse.y: add dtrace probe for symbol create.
+ * test/test_tempfile.rb: use assert_file for more descriptive message.
+ following r49131.
- * probes.d: ditto
+Sun Jan 4 13:05:09 2015 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-Sat Feb 16 09:27:37 2013 Tanaka Akira <akr@fsij.org>
+ * string.c: improve docs for String#<=>. [ruby-core:65399][Feature #10322]
+ Patch by gogo tanaka.
- * ext/socket/extconf.rb: don't test sys/feature_tests.h which is not
- used now.
- It was included in r7901 as "bug of gcc 3.0 on Solaris 8 ?".
+Sun Jan 4 12:42:24 2015 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-Sat Feb 16 09:24:37 2013 Tanaka Akira <akr@fsij.org>
+ * array.c: improve docs for Array#reject. [ruby-core:65324][misc #10307]
+ Patched by Nebu Pookins.
- * ext/socket/extconf.rb: reorder header tests to consider inclusion
- order in rubysocket.h.
+Sun Jan 4 12:24:11 2015 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-Sat Feb 16 08:42:58 2013 Tanaka Akira <akr@fsij.org>
+ * string.c: improve docs for String#strip and variations.
+ [ruby-core:66081][Bug #10476]
- * configure.in, ext/socket/extconf.rb: test netinet/in_systm.h in
- ext/socket/extconf.rb instead of configure.in.
+Sun Jan 4 09:21:04 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
- Originally, netinet/in_systm.h is included for NextStep, OpenStep,
- and Rhapsody. [ruby-core:1596]
+ * lib/drb/drb.rb: removed unused argument. Patch by @vipulnsward
+ [fix GH-515]
-Sat Feb 16 07:55:40 2013 Tanaka Akira <akr@fsij.org>
+Sun Jan 4 09:18:31 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
- * configure.in: don't test xti.h here.
+ * lib/tempfile.rb: provide default basename parameter.
+ [fix GH-523] Patch by @dissolved
+ * test/test_tempfile.rb: ditto.
- * ext/socket/extconf.rb: test xti.h here.
+Sun Jan 4 00:43:41 2015 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- Originally, xti.h is included for IRIX [ruby-core:14447].
+ * README.ja.md: add guidance of mailing list and bugs.r-l.o.
-Sat Feb 16 07:16:49 2013 Tanaka Akira <akr@fsij.org>
+Sat Jan 3 23:56:28 2015 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * ext/socket/extconf.rb: test struct sockaddr_un and its member,
- sun_len.
+ * hash.c: fix docs for Hash#invert. [ruby-core:66917] [Bug #10612]
- * ext/socket/sockport.h (INIT_SOCKADDR_UN): new macro defined.
+Sat Jan 3 19:52:12 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/socket/socket.c (sock_s_pack_sockaddr_un): use INIT_SOCKADDR_UN.
+ * include/ruby/intern.h (rb_str_new_literal): define on all
+ platforms, not only gcc.
- * ext/socket/unixsocket.c (rsock_init_unixsock): ditto.
+Sat Jan 3 18:53:28 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/socket/raddrinfo.c (init_unix_addrinfo): ditto.
- (addrinfo_mload): ditto.
+ * ext/fiddle/lib/fiddle/cparser.rb (parse_ctype): limit split word
+ number as the rest are not used.
-Sat Feb 16 07:05:59 2013 Tanaka Akira <akr@fsij.org>
+Sat Jan 3 18:19:50 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
- * ext/socket/sockport.h (INIT_SOCKADDR_IN): don't need family
- argument. it is always AF_INET.
+ * ext/fiddle/lib/fiddle/cparser.rb: r49110 broke Fiddle::Import with
+ type_alias.
+ * test/fiddle/test_cparser.rb: added type_alias test for parse_ctype
+ and parse_struct_signature.
- * ext/socket/raddrinfo.c (make_inetaddr): follow INIT_SOCKADDR_IN
- change.
- (addrinfo_ipv6_to_ipv4): ditto.
+Sat Jan 3 11:50:16 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
-Sat Feb 16 04:21:07 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * ext/openssl/ossl.h: avoid to build failure of Windows environment.
+ * ext/openssl/ossl_ssl_session.c: ditto.
- * ext/socket/extconf.rb: workaround for mswin/mingw build problem.
- sendmsg emulation in win32/win32.c is not enough.
+Sat Jan 3 11:27:46 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
-Sat Feb 16 00:19:20 2013 Tanaka Akira <akr@fsij.org>
+ * array.c: Improve performance of Array#shift. use shared instead of
+ MEMMOVE if with arguments. Patch by @ksss [fix GH-537]
+ * test/ruby/test_array.rb: ditto.
+ * benchmark/bm_array_shift.rb: Added benchmark of GH-537 issue.
- * ext/socket/extconf.rb: use all all tested available headers for
- have_func.
+Sat Jan 3 10:38:52 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
-Fri Feb 15 22:21:37 2013 Akinori MUSHA <knu@iDaemons.org>
+ * lib/net/http.rb: More descriptive error message when net/http fails
+ to connect to a server. Patch by @xaviershay [fix GH-700]
+ * test/net/http/test_http.rb: ditto.
- * configure.in: Fix a bug introduced in r38342 that the cflagspat
- substitution is messed up by the way CFLAGS and optflags are
- modified, which affected FreeBSD and NetBSD/amd64 when
- configured to use libexecinfo. This bug resulted in CFLAGS and
- CXXFLAGS in RbConfig::CONFIG having warnflags expanded in them,
- forcing third-party C/C++ extensions to follow what warnflags
- demands, like ANSI/ISO-C90 conformance. ref [Bug #7101]
+Sat Jan 3 10:14:51 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
-Fri Feb 15 20:29:11 2013 Tanaka Akira <akr@fsij.org>
+ * ext/openssl/ossl.h: Make `SSL_SESSION_cmp` use `CRYPTO_memcmp`
+ [fix GH-591] Patch by @PiPeep
+ * ext/openssl/ossl_ssl_session.c: ditto.
- * ext/socket/sockport.h (SET_SIN_LEN): defined for strict-aliasing
- rule.
- (INIT_SOCKADDR_IN): ditto.
+Sat Jan 3 09:54:32 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
- * ext/socket/raddrinfo.c (make_inetaddr): use INIT_SOCKADDR_IN.
- (addrinfo_ipv6_to_ipv4): ditto.
+ * ext/fiddle/lib/fiddle/cparser.rb: Support for Fiddle::CParser
+ to handle rich signatures including parameter names and function
+ pointer types. Patch by @theryan [fix GH-590]
+ * test/fiddle/test_cparser.rb: ditto.
-Fri Feb 15 18:24:48 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Jan 3 09:01:43 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
- * lib/mkmf.rb (MakeMakefile#try_run): bail out explicitly if cross
- compiling, because it cannot work of course.
+ * NEWS: added compatibility entry of r49101.
-Fri Feb 15 12:34:58 2013 Tanaka Akira <akr@fsij.org>
+Fri Jan 2 21:06:59 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
- * ext/socket/extconf.rb: test struct sockaddr_storage directly.
+ * lib/net/http.rb (Net::HTTP#send_request): there is no response body
+ with HEAD request. Patch by @rodrigosaito [fix GH-520]
- * ext/socket/rubysocket.h: use HAVE_TYPE_STRUCT_SOCKADDR_STORAGE.
+Fri Jan 2 21:04:36 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
-Fri Feb 15 12:26:13 2013 Tanaka Akira <akr@fsij.org>
+ * test/net/http/test_http.rb (_test_send_request__HEAD): Added
+ failing test for send_request with HEAD method.
- * ext/socket/getaddrinfo.c (GET_AI): don't cast 1st argument for
- INIT_SOCKADDR.
+Fri Jan 2 18:41:20 2015 Tanaka Akira <akr@fsij.org>
-Fri Feb 15 08:12:11 2013 Tanaka Akira <akr@fsij.org>
+ * eval.c (ruby_init): Print ruby_setup() error only in debug mode.
+ Unsuppressable error message is not a good idea.
+ Note that the message is printed sometimes with following
+ code (highly timing dependent, though):
+ pid = spawn("ruby -e ''"); Process.kill(:TERM, pid)
- * ext/socket/sockport.h (SET_SS_LEN): removed.
- (SET_SIN_LEN): removed.
- (INIT_SOCKADDR): new macro.
+Fri Jan 2 16:18:44 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
- * ext/socket/ancdata.c (extract_ipv6_pktinfo): use INIT_SOCKADDR.
+ * test/ruby/test_module.rb: Refactor invalid testcase.
+ [fix GH-472][ruby-core:59035][Bug #9240]
- * ext/socket/raddrinfo.c (make_inetaddr): use INIT_SOCKADDR.
- (addrinfo_ipv6_to_ipv4): ditto.
+Fri Jan 2 15:53:00 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
- * ext/socket/getaddrinfo.c (GET_AI): use INIT_SOCKADDR.
+ * lib/webrick/utils.rb: removed unused argument variable.
+ [fix GH-356] Patch by @vipulnsward
+ * lib/webrick/server.rb: ditto.
+ * lib/webrick/ssl.rb: ditto.
+ * test/webrick/test_utils.rb: added test for WEBrick::Utils#create_listeners.
-Fri Feb 15 07:49:27 2013 Eric Hodel <drbrain@segment7.net>
+Fri Jan 2 15:35:53 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
- * lib/rdoc.rb: Update to release version of 4.0.0
+ * lib/securerandom.rb: improve syntax and grammar of documentation.
+ [fix GH-796][ci skip] Patch by @Erol
- * lib/rubygems.rb: Update to release version of 2.0.0
+Fri Jan 2 15:10:01 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
-Fri Feb 15 07:07:27 2013 Tanaka Akira <akr@fsij.org>
+ * test/openssl/test_ssl_session.rb (OpenSSL#test_ctx_client_session_cb):
+ fix test failure with OpenSSL disabled SSLv3 protocol.
+ [ruby-core:63772] [Bug #10046]
- * ext/socket/sockport.h (SA_LEN): removed because unused now.
- (SS_LEN): ditto.
- (SIN_LEN): ditto.
+Fri Jan 2 09:08:31 2015 Tanaka Akira <akr@fsij.org>
-Thu Feb 14 10:45:31 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * lib/resolv.rb (Resolv::DNS::Label::Str#==): Check class equality.
+ (Resolv::DNS::Name#initialize): Normalize labels as
+ Resolv::DNS::Label::Str objects.
- * test/ruby/test_process.rb (test_setsid): Added a workaround for
- MacOS X. Patch by nagachika. [Bug #7826] [ruby-core:52126]
+Thu Jan 1 21:41:49 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
-Fri Feb 15 00:15:31 2013 Tanaka Akira <akr@fsij.org>
+ * doc/regexp.rdoc: fix regexp docs for whitespace character.
+ [ruby-dev:48765] [Bug #10624]
- * ext/socket/sockport.h (VALIDATE_SOCKLEN): new macro to validate
- sa_len member of 4.4BSD socket address.
+Thu Jan 1 17:50:52 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/socket/getnameinfo.c (getnameinfo): use VALIDATE_SOCKLEN,
- instead of SA_LEN.
+ * test/ruby/test_rubyoptions.rb: try locale encoding name.
+ [ruby-core:67109] [Bug #10643]
- * ext/socket/socket.c (sock_s_getnameinfo): use VALIDATE_SOCKLEN
- instead of SS_LEN.
+Thu Jan 1 11:07:12 2015 Eric Wong <e@80x24.org>
-Thu Feb 14 22:25:54 2013 Tanaka Akira <akr@fsij.org>
+ * symbol.c (rb_gc_free_dsymbol): delete from global fstr hash
+ * test/ruby/test_symbol.rb (test_symbol_fstr_leak): test for bug
+ [ruby-core:67268] [Bug #10686]
- * ext/socket/socket.c (sockaddr_len): extracted from sockaddr_obj.
- (sockaddr_obj): add an argument to length of socket address.
- (socket_s_ip_address_list): call sockaddr_obj with actual socket
- address length if given, use sockaddr_len otherwise.
+Thu Jan 1 09:14:21 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Feb 14 20:11:23 2013 Tanaka Akira <akr@fsij.org>
+ * vm_args.c (keyword_hash_p): fix non-symbol keys hash.
+ rb_extract_keywords() returns 0 not Qnil when no symbol keys is
+ included. [ruby-core:67264] [Bug #10685]
- * ext/socket: always operate length of socket address companion with
- socket address.
+Wed Dec 31 17:48:43 2014 Tanaka Akira <akr@fsij.org>
- * ext/socket/rubysocket.h (rsock_make_ipaddr): add an argument for
- socket address length.
- (rsock_ipaddr): ditto.
+ * lib/resolv.rb (Resolv::DNS::Label::Str#initialize): Set encoding
+ ASCII-8BIT before downcase. case insensitivity of DNS labels doesn't
+ apply non-ASCII characters. [RFC 4343]
- * ext/socket/ipsocket.c (ip_addr): pass length to rsock_ipaddr.
- (ip_peeraddr): ditto.
- (ip_s_getaddress): pass length to rsock_make_ipaddr.
+Wed Dec 31 16:48:44 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/socket/socket.c (make_addrinfo): pass length to rsock_ipaddr.
- (sock_s_getnameinfo): pass actual address length to rb_getnameinfo.
- (sock_s_unpack_sockaddr_in): pass length to rsock_make_ipaddr.
+ * parse.y (gettable_gen): disable warnings of possible reference
+ to a local variable defined in a past scope.
+ [ruby-core:67162] [Bug #10661]
- * ext/socket/init.c (rsock_s_recvfrom): pass length to rsock_ipaddr.
- (rsock_s_recvfrom_nonblock): ditto.
+Wed Dec 31 13:43:48 2014 Tanaka Akira <akr@fsij.org>
- * ext/socket/tcpsocket.c (tcp_sockaddr): pass length to
- rsock_make_ipaddr.
+ * lib/resolv.rb (Resolv::DNS::Name#==): Compare an array of Label:Str
+ objects. Label#Str#== is case-insensitive.
- * ext/socket/raddrinfo.c (make_ipaddr0): add an argument for socket
- address length. pass the length to rb_getnameinfo.
- (rsock_ipaddr): ditto.
- (rsock_make_ipaddr): add an argument for socket address length.
- pass the length to make_ipaddr0.
- (make_inetaddr): pass length to make_ipaddr0.
- a local variable renamed.
- (host_str): a local variable renamed.
- (port_str): ditto.
+Tue Dec 30 16:16:12 2014 Ben Miller <bmiller@rackspace.com>
-Thu Feb 14 14:31:43 2013 Eric Hodel <drbrain@segment7.net>
+ * lib/resolv.rb (Resolv::DNS::Name#==): DNS is case-insensitive, so the
+ comparison should be case-insensitive as well.
+ [ruby-core:66498] [Bug #10550]
- * lib/net/http.rb: Removed OpenSSL dependency from Net::HTTP.
+Tue Dec 30 16:03:45 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/net/http/test_http.rb: Remove Zlib dependency from tests.
- * test/net/http/test_http_request.rb: ditto.
+ * lib/resolv.rb (Resolv::DNS::Name): names with different dots
+ should be different.
-Thu Feb 14 11:08:15 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Dec 30 13:16:56 2014 Martin Duerst <bernhard+git@lsmod.de>
- * class.c (include_modules_at): detect cyclic prepend with original
- method table. [ruby-core:52205] [Bug #7841]
+ * lib/uri/common.rb: Initialize HTML5ASCIIINCOMPAT to empty Array
+ to avoid error during bootstrap when encodings are not yet defined.
+ [Bug #10678]
-Thu Feb 14 10:30:41 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Dec 30 09:29:26 2014 Bernhard M. Wiedemann <bernhard+git@lsmod.de>
- * vm_method.c: call method_removed hook on called class, not on
- prepending iclass. [ruby-core:52207] [Bug #7843]
+ * ext/dbm/dbm.c (Init_dbm): [DOC] as UNIX permissions are octal
+ numbers, needs to be prefixed by 0. [Fix GH-800]
-Thu Feb 14 10:05:57 2013 Eric Hodel <drbrain@segment7.net>
+Tue Dec 30 08:57:39 2014 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
- * lib/net/http: Do not handle Content-Encoding when the user sets
- Accept-Encoding. This allows users to handle Content-Encoding for
- themselves. This restores backwards-compatibility with Ruby 1.x.
- [ruby-trunk - Bug #7831]
- * lib/net/http/generic_request.rb: ditto.
- * lib/net/http/response.rb: ditto
- * test/net/http/test_http.rb: Test for the above.
- * test/net/http/test_http_request.rb: ditto.
- * test/net/http/test_httpresponse.rb: ditto.
+ * lib/unicode_normalize.rb: typo fix. [ci skip]
+ [ruby-dev:48794][misc #10675]
-Thu Feb 14 08:18:47 2013 Tanaka Akira <akr@fsij.org>
+Mon Dec 29 19:38:01 2014 Yukihiro Matsumoto <matz@ruby-lang.org>
- * ext/socket/extconf.rb: don't define HAVE_SA_LEN and HAVE_SA_LEN.
- use HAVE_STRUCT_SOCKADDR_SA_LEN and HAVE_STRUCT_SOCKADDR_IN_SIN_LEN
- instead.
+ * version.h (RUBY_VERSION): 2.3.0 development has started.
-Wed Feb 13 20:59:48 2013 Tanaka Akira <akr@fsij.org>
+Mon Dec 29 18:58:46 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/socket/extconf.rb: don't define socklen_t here, just test.
+ * re.c (unescape_nonascii): append escape sequence as-is not
+ unescaped character, to get rid of unexpected meta-character.
+ [ruby-core:67193] [Bug #10670]
- * ext/socket/rubysocket.h: define socklen_t if not available.
+Mon Dec 29 14:27:33 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Feb 13 18:37:50 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * doc/syntax/literals.rdoc (Symbols): now Symbols created by
+ interpolation can be garbage collected. patch by Yihang Ho in
+ [ruby-core:67194]. [Bug #10671]
- * proc.c (mnew): skip prepending modules and return the method bound
- on the given class. [ruby-core:52160] [Bug #7836]
+Mon Dec 29 11:18:17 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Feb 13 18:11:59 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * thread.c (rb_thread_variable_get): fix dynamic symbol keys.
+ rb_check_id() returns non-zero only for static symbols, whereas
+ thread local variable keys can be dynamic symbols.
+ [ruby-core:67185] [Bug #10667]
- * proc.c (method_original_name): new methods Method#original_name and
- UnboundMethod#original_name. [ruby-core:52048] [Bug #7806]
- [EXPERIMENTAL]
+Mon Dec 29 10:37:27 2014 Thiago Lewin <thiago_lewin@yahoo.com.br>
- * proc.c (method_inspect): show the given name primarily, and
- original_id if aliased. [ruby-core:52048] [Bug #7806]
+ * io.c (rb_f_select): [DOC] workaround for YARD doc. [Fix GH-799]
-Wed Feb 13 17:56:39 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * process.c (proc_detach): [DOC] fix missing closing parenthesis.
+ [Fix GH-799]
- * configure.in (warnflags): disable -Werror by default unless
- development. [ruby-core:52131] [Bug #7830]
+Mon Dec 29 07:27:23 2014 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
-Wed Feb 13 06:05:52 2013 Eric Hodel <drbrain@segment7.net>
+ * ext/json, test/json: merge JSON HEAD(17fe8e7)
+ https://github.com/flori/json/compare/v1.8.1...17fe8e7
- * lib/rubygems.rb: Return BINARY strings from Gem.gzip and Gem.gunzip.
- Fixes intermittent test failures. RubyGems issue #450 by Jeremey
- Kemper.
- * test/rubygems/test_gem.rb: Test for the above.
+Sun Dec 28 23:49:37 2014 Michal Papis <mpapis@gmail.com>
-Wed Feb 13 05:49:21 2013 Tanaka Akira <akr@fsij.org>
+ * rbinstall.rb: fix target location for installing bundled gems.
+ install to the prepared directory instead of default Gem.dir,
+ not to be affected GEM_HOME environment variable. [Fix GH-798]
- * ext/socket/extconf.rb: test functions just after struct members.
+Sun Dec 28 18:19:28 2014 Eric Wong <e@80x24.org>
-Tue Feb 12 12:02:35 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * test/-ext-/iseq_load/test_iseq_load.rb
+ (test_next_in_block_in_block): test using ISeq#eval
+ (test_break_ensure): ditto
+ [ruby-core:66988]
- * ext/json: merge JSON 1.7.7.
- This includes security fix. [CVE-2013-0269]
- https://github.com/flori/json/commit/d0a62f3ced7560daba2ad546d83f0479a5ae2cf2
- https://groups.google.com/d/topic/rubyonrails-security/4_YvCpLzL58/discussion
+Sun Dec 28 16:25:12 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Feb 11 23:08:48 2013 Tanaka Akira <akr@fsij.org>
+ * cygwin/GNUmakefile.in (EXTOBJS): override to add resource files
+ always. [ruby-core:67153] [Bug #10657]
- * configure.in: enable rb_cv_page_size_log test for MirOS BSD.
+Sun Dec 28 13:54:26 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Feb 11 20:06:38 2013 Tanaka Akira <akr@fsij.org>
+ * parse.y (f_kwrest, new_args_tail_gen): unnamed rest keyword and
+ keywords bits arguments should be unique. since internal IDs
+ depend on the local variable index in the current scope, new ID
+ should be made before popping those vtables.
+ [ruby-core:67157] [Bug #10659]
- * configure.in: use -pthread on mirbsd*.
+Sat Dec 27 20:12:55 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Feb 11 16:07:09 2013 Tanaka Akira <akr@fsij.org>
+ * ext/json/generator/generator.c (JSON_Generator_State_type): add
+ #ifdef for backward compatibility.
- * configure.in: add SOLIBS and LIBRUBY_SO definition for mirbsd*.
+ * ext/json/parser/parser.rl (JSON_Parser_type): ditto.
-Mon Feb 11 13:17:20 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/json/generator/generator.h (ZALLOC): add fallback definition.
- * configure.in (rubysitearchprefix): sitearchdir and vendorarchdir
- should use sitearch, not arch. [ruby-dev:46964] [Bug #7823]
+ * ext/json/parser/parser.h (ZALLOC): ditto.
- * win32/Makefile.sub (config.status): site and vendor directories
- should use sitearch, not arch. [ruby-dev:46964] [Bug #7823]
+Sat Dec 27 16:54:05 2014 Tanaka Akira <akr@fsij.org>
-Mon Feb 11 12:31:25 2013 Tanaka Akira <akr@fsij.org>
+ * process.c: Unused code removed.
+ It seems waitpid() is universally available on POSIX platforms.
- * configure.in: move OS specific header/function knowledge before
- automatic header tests.
+Sat Dec 27 15:08:27 2014 Eric Wong <e@80x24.org>
-Mon Feb 11 11:04:29 2013 Tanaka Akira <akr@fsij.org>
+ * vm_core.h (rb_vm_living_threads_insert): preserve order
+ [Bug #10660] [ruby-core:67154] [ruby-core:67159]
- * configure.in: move the test for -march=i486 just after
- RUBY_UNIVERSAL_ARCH/RUBY_DEFAULT_ARCH.
+Sat Dec 27 13:08:20 2014 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
-Sun Feb 10 23:42:26 2013 Tanaka Akira <akr@fsij.org>
+ * ext/socket/socket.c: improved document for YARD doc.
+ [fix GH-795][ci skip] Patch by @tlewin
- * ext/socket/extconf.rb: test structure members just after types test.
+Sat Dec 27 10:11:21 2014 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
-Sun Feb 10 20:58:17 2013 Tanaka Akira <akr@fsij.org>
+ * ext/tk/lib/tkextlib/tcllib/plotchart.rb: fix to invoke correct function
+ of tcllib. Patch by @zalt50 [fix GH-787]
- * ext/socket/extconf.rb: test types just after headers test.
+Sat Dec 27 10:03:41 2014 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
-Sun Feb 10 16:00:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * tool/make-snapshot: show sha1 digest when making packages.
+ it's request from https://github.com/ruby/www.ruby-lang.org/issues/921
+ [fix GH-794]
- * lib/rake/doc/MIT-LICENSE: Add license file from upstream
- * lib/rake/doc/README.rdoc: Link to license file from Rake README
- * lib/rake/version.rb: Include README rdoc for Rake module overview
+Fri Dec 26 15:32:16 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun Feb 10 15:26:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * ext/tk/tcltklib.c (ip_invoke_core): remove probably duplicate
+ dead code.
- * lib/rake/doc/*: Sync Rake rdoc files from upstream
+Fri Dec 26 15:28:27 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun Feb 10 15:50:02 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * ext/tk/tcltklib.c (ip_ruby_cmd_receiver_const_get): simply use
+ rb_path2class() to get a class/module from its name.
- * vm_exec.h (DISPATCH_ARCH_DEPEND_WAY): use __asm__ __volatile__
- instead of asm volatile.
+Fri Dec 26 15:20:54 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun Feb 10 15:50:02 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * marshal.c (w_long): append at once by w_nbyte() instead of
+ appending byte by byte.
- * gc.h (SET_MACHINE_STACK_END): use __volatile__ instead of volatile.
+Fri Dec 26 15:13:13 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun Feb 10 14:25:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * ext/json/parser/parser.rl (unescape_unicode): check if valid
+ before bit-or assignments.
+ reported by Denis Denisov <denji0k AT gmail.com>.
- * doc/rake/, lib/rake/doc/: Move Rake rdoc files to lib/rake
+ * ext/nkf/nkf-utf8/nkf.c (nkf_iconv_t): fix a missing semicolon.
+ reported by Denis Denisov <denji0k AT gmail.com>.
-Sun Feb 10 12:10:25 2013 Tanaka Akira <akr@fsij.org>
+ * process.c (rb_spawn_process): get rid of usage of uninitialized
+ variable.
+ reported by Denis Denisov <denji0k AT gmail.com>.
- * ext/socket/extconf.rb: test headers at first.
+ * regexec.c (match_at): ditto.
-Sun Feb 10 12:00:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * ext/win32ole/win32ole.c (ole_wc2mb_alloc, ole_vstr2wc, ole_mb2wc):
+ ditto.
- * doc/rake/*: Removed stale Rake static files
+ * dir.c (ruby_glob0): no need to check never-NULL pointer.
+ reported by Denis Denisov <denji0k AT gmail.com>.
-Sun Feb 10 09:10:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * win32/file.c (rb_file_expand_path_internal): ditto.
- * lib/pp.rb, lib/prettyprint.rb: Documentation for PP and PrettyPrint
- Based on a patch by Vincent Batts [ruby-core:51253] [Bug #7656]
+ * win32/file.c (code_page_i): handle realloc failure.
+ reported by Denis Denisov <denji0k AT gmail.com>.
-Sat Feb 9 21:11:21 2013 Tanaka Akira <akr@fsij.org>
+ * win32/stub.c (stub_sysinit): ditto.
- * configure.in: move header files check to the beginning of
- "header and library section".
- test rlim_t with sys/types.h and sys/time.h for MirOS BSD.
- sys/types.h and sys/time.h is guarded by #ifdef and the above
- move is required for this change.
+ * fix printf format conversion specifiers.
+ reported by Denis Denisov <denji0k AT gmail.com>.
-Sat Feb 9 17:45:58 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Dec 26 01:41:40 2014 NAKAMURA Usaku <usa@ruby-lang.org>
- * configure.in, version.c: prevent duplicated load paths by empty
- version string, it does not work right now.
+ * tool/rbinstall.rb: skip installing bundle gems if zlib is unavailable.
+ [Bug #10647] [ruby-dev:48787]
-Sat Feb 9 17:38:41 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Dec 26 01:24:42 2014 NAKAMURA Usaku <usa@ruby-lang.org>
- * configure.in: fix arch parameters in help message. [Bug #7804]
+ * tool/downloader.rb: support old versions of ruby.
-Sat Feb 9 13:13:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * tool/downloader.rb: now can download gems by http if openssl is not
+ available (this may be danger!)
- * vm_trace.c: Note about TracePoint events set, and comment on
- Kernel#set_trace_func to prefer new TracePoint API
+Fri Dec 26 00:13:48 2014 NAKAMURA Usaku <usa@ruby-lang.org>
-Sat Feb 9 10:07:47 2013 Kazuki Tsujimoto <kazuki@callcc.net>
+ * test/ruby/test_extlibs.rb: check existence of extension libraries
+ which not depend on outer libraries. (experimental)
- * BSDL: update copyright notice for 2013.
+Thu Dec 25 21:58:15 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Feb 9 09:24:38 2013 Eric Hodel <drbrain@segment7.net>
+ * ext/fiddle/extconf.rb: make PIC objects if it will be linked as
+ a shared object eventually. [ruby-core:67128]
- * lib/rubygems/package/old.rb: Fix behavior only on ruby 1.8.
+Thu Dec 25 19:01:13 2014 NAKAMURA Usaku <usa@ruby-lang.org>
- * lib/rubygems/package.rb: Include checksums.yaml.gz signatures for
- verification.
- * test/rubygems/test_gem_package.rb: Test for the above.
+ * ext/fiddle/win32/libffi-3.2.1-mswin.patch: support mswin32.
-Sat Feb 9 01:23:24 2013 Tanaka Akira <akr@fsij.org>
+Thu Dec 25 17:30:40 2014 Naohisa Goto <ngotogenome@gmail.com>
- * test/fiddle/helper.rb: specify libc and libm locations for MirOS BSD.
+ * gc.c (wmap_final_func): fix memory size shortage when realloc wmap.
+ Fix SEGV during finalize of WeakRef on Solaris (though the SEGV
+ could occur on all OS/platforms). [ruby-dev:48779] [Bug #10646]
- * test/dl/test_base.rb: ditto.
+Thu Dec 25 17:27:06 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Feb 8 23:25:33 2013 Tanaka Akira <akr@fsij.org>
+ * configure.in (NET_LUID): include winsock2.h instead of windows.h.
+ patch by Jon Forums in [ruby-core:67125]. [Bug #10640]
- * configure.in: change CFLAGS temporally to test
- ARCH_FLAG="-march=i486".
+Thu Dec 25 16:14:10 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Feb 8 21:19:41 2013 Tanaka Akira <akr@fsij.org>
+ * ext/io/console/console.c (console_dev): send the given arguments
+ to the opened console. as a special case, do nothing if :close
+ is given.
- * configure.in: don't define ARCH_FLAG="-march=i486" if it causes
- compilation problem.
+ * test/lib/leakchecker.rb (LeakChecker#check_fd_leak): close if
+ console.
+For the changes before 2.2.0, see doc/ChangeLog-2.2.0
+For the changes before 2.1.0, see doc/ChangeLog-2.1.0
For the changes before 2.0.0, see doc/ChangeLog-2.0.0
For the changes before 1.9.3, see doc/ChangeLog-1.9.3
For the changes before 1.8.0, see doc/ChangeLog-1.8.0
diff --git a/KNOWNBUGS.rb b/KNOWNBUGS.rb
index b97a08d928..35a8e75876 100644
--- a/KNOWNBUGS.rb
+++ b/KNOWNBUGS.rb
@@ -1,5 +1,7 @@
#
-# This test file concludes tests which point out known bugs.
+# IMPORTANT: Always keep the first 7 lines (comments),
+# even if this file is otherwise empty.
+#
+# This test file includes tests which point out known bugs.
# So all tests will cause failure.
#
-
diff --git a/LEGAL b/LEGAL
index 65706459cd..2607f0082a 100644
--- a/LEGAL
+++ b/LEGAL
@@ -5,6 +5,37 @@ All the files in this distribution are covered under either the Ruby's
license (see the file COPYING) or public-domain except some files
mentioned below.
+ccan/build_assert/build_assert.h
+ccan/check_type/check_type.h
+ccan/container_of/container_of.h
+ccan/str/str.h
+
+ These files are licensed under the CC0.
+
+ http://creativecommons.org/choose/zero/
+
+ccan/list/list.h
+
+ This file is licensed under the MIT License.
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
include/ruby/oniguruma.h:
regcomp.c:
regenc.[ch]:
@@ -56,7 +87,7 @@ http://www.geocities.jp/kosako3/oniguruma/
http://www.ruby-lang.org/cgi-bin/cvsweb.cgi/oniguruma/
http://www.freebsd.org/cgi/cvsweb.cgi/ports/devel/oniguruma/
- When this software is partly used or it is distributed with Ruby,
+ When this software is partly used or it is distributed with Ruby,
this of Ruby follows the license of Ruby.
configure:
@@ -98,7 +129,7 @@ tool/config.sub:
parse.c:
- This file is licensed under the GPL, but is incorporated into Ruby and
+ This file is licensed under the GPL, but is incorporated into Ruby and
redistributed under the terms of the Ruby license, as permitted by the
exception to the GPL below.
@@ -193,11 +224,11 @@ random.c
This is a faster version by taking Shawn Cokus's optimization,
Matthe Bellew's simplification, Isaku Wada's real version.
- Before using, initialize the state by using init_genrand(seed)
+ Before using, initialize the state by using init_genrand(seed)
or init_by_array(init_key, key_length).
Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
- All rights reserved.
+ All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
@@ -210,8 +241,8 @@ random.c
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- 3. The names of its contributors may not be used to endorse or promote
- products derived from this software without specific prior written
+ 3. The names of its contributors may not be used to endorse or promote
+ products derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
@@ -231,6 +262,36 @@ random.c
http://www.math.keio.ac.jp/matumoto/emt.html
email: matumoto@math.keio.ac.jp
+vm_dump.c:procstat_vm
+
+ This file is under the new-style BSD license.
+
+ Copyright (c) 2007 Robert N. M. Watson
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+
+ $FreeBSD: head/usr.bin/procstat/procstat_vm.c 261780 2014-02-11 21:57:37Z jhb $
+
vsnprintf.c:
This file is under the old-style BSD license. Note that the
@@ -364,30 +425,30 @@ missing/strlcpy.c
These files are under the new-style BSD license.
- Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
- All rights reserved.
+ Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
+ All rights reserved.
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- 3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
- THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ 3. The name of the author may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+ THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
missing/langinfo.c
@@ -476,7 +537,7 @@ ext/nkf/nkf-utf8/utf8tbl.c:
copyrighted semi-public-domain software.
Copyright (C) 1987, Fujitsu LTD. (Itaru ICHIKAWA)
- Everyone is permitted to do anything on this program
+ Everyone is permitted to do anything on this program
including copying, modifying, improving,
as long as you don't try to pretend that you wrote it.
i.e., the above copyright notice has to appear in all copies.
@@ -527,7 +588,7 @@ ext/win32ole/win32ole.c:
Other modifications Copyright (c) 1997, 1998 by Gurusamy Sarathy
<gsar@umich.edu> and Jan Dubois <jan.dubois@ibm.net>
-
+
You may distribute under the terms of either the GNU General Public
License or the Artistic License, as specified in the README file
of the Perl distribution.
diff --git a/Makefile.in b/Makefile.in
index d3313bea2e..ff475091ab 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,7 +1,7 @@
SHELL = /bin/sh
NULLCMD = @NULLCMD@
n=$(NULLCMD)
-ECHO1 = $(V:1=@$n)
+ECHO1 = $(V:1=$n)
RUNCMD = $(SHELL)
CDPATH = .
CHDIR = @CHDIR@
@@ -22,9 +22,11 @@ LD = @LD@
YACC = bison
PURIFY =
AUTOCONF = autoconf
+CONFIGURE = @CONFIGURE@
@SET_MAKE@
MKFILES = @MAKEFILES@
BASERUBY = @BASERUBY@
+HAVE_BASERUBY = @HAVE_BASERUBY@
TEST_RUNNABLE = @TEST_RUNNABLE@
CROSS_COMPILING = @CROSS_COMPILING@
DOXYGEN = @DOXYGEN@
@@ -50,14 +52,15 @@ DOCTARGETS = @RDOCTARGET@ @CAPITARGET@
EXTOUT = @EXTOUT@
arch_hdrdir = $(EXTOUT)/include/$(arch)
-VPATH = $(arch_hdrdir)/ruby:$(hdrdir)/ruby:$(srcdir):$(srcdir)/enc:$(srcdir)/missing
+VPATH = $(arch_hdrdir)/ruby:$(hdrdir)/ruby:$(srcdir):$(srcdir)/missing
empty =
CC_VERSION = @CC_VERSION@
OUTFLAG = @OUTFLAG@$(empty)
COUTFLAG = @COUTFLAG@$(empty)
ARCH_FLAG = @ARCH_FLAG@
-CFLAGS = @CFLAGS@ $(ARCH_FLAG)
+CFLAGS_NO_ARCH = @CFLAGS@
+CFLAGS = $(CFLAGS_NO_ARCH) $(ARCH_FLAG)
cflags = @cflags@
optflags = @optflags@
debugflags = @debugflags@
@@ -89,7 +92,6 @@ RUBY_BASE_NAME=@RUBY_BASE_NAME@
RUBY_PROGRAM_VERSION=@RUBY_PROGRAM_VERSION@
RUBY_INSTALL_NAME=@RUBY_INSTALL_NAME@
RUBY_SO_NAME=@RUBY_SO_NAME@
-RUBY_RELEASE_DATE=@RUBY_RELEASE_DATE@
EXEEXT = @EXEEXT@
LIBEXT = @LIBEXT@
PROGRAM=$(RUBY_INSTALL_NAME)$(EXEEXT)
@@ -112,8 +114,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
XRUBY_LIBDIR = @XRUBY_LIBDIR@
XRUBY_RUBYLIBDIR = @XRUBY_RUBYLIBDIR@
XRUBY_RUBYHDRDIR = @XRUBY_RUBYHDRDIR@
-
-DEFAULT_PRELUDES = $(GEM_PRELUDE)
+BOOTSTRAPRUBY = @BOOTSTRAPRUBY@
#### End of system configuration section. ####
@@ -131,12 +132,26 @@ LIBRUBYARG_SHARED = @LIBRUBYARG_SHARED@
LIBRUBY_RELATIVE = @LIBRUBY_RELATIVE@
LIBRUBY_A_OBJS = @LIBRUBY_A_OBJS@
+DTRACE_REBUILD_OBJS = $(DTRACE_REBUILD:yes=$(DTRACE_DEPENDENT_OBJS))
+
+DTRACE_DEPENDENT_OBJS = array.$(OBJEXT) \
+ eval.$(OBJEXT) \
+ gc.$(OBJEXT) \
+ hash.$(OBJEXT) \
+ load.$(OBJEXT) \
+ object.$(OBJEXT) \
+ parse.$(OBJEXT) \
+ string.$(OBJEXT) \
+ symbol.$(OBJEXT) \
+ vm.$(OBJEXT)
+
THREAD_MODEL = @THREAD_MODEL@
PREP = @PREP@
ARCHFILE = @ARCHFILE@
SETUP =
EXTSTATIC = @EXTSTATIC@
+ENCSTATIC = @ENCSTATIC@
SET_LC_MESSAGES = env LC_MESSAGES=C
MAKEDIRS = @MKDIR_P@
@@ -160,8 +175,9 @@ VCS = @VCS@
VCSUP = @VCSUP@
DTRACE = @DTRACE@
DTRACE_EXT = @DTRACE_EXT@
-DTRACE_OBJ = @DTRACE_OBJ@
-DTRACE_GLOMMED_OBJ = @DTRACE_GLOMMED_OBJ@
+DTRACE_OBJ = @DTRACE_OBJ@
+DTRACE_REBUILD= @DTRACE_REBUILD@
+DTRACE_GLOMMED_OBJ = $(DTRACE_REBUILD:yes=ruby-glommed.$(OBJEXT))
OBJEXT = @OBJEXT@
ASMEXT = S
@@ -171,10 +187,9 @@ SYMBOL_PREFIX = @SYMBOL_PREFIX@
INSTALLED_LIST= .installed.list
-MKMAIN_CMD = mkmain.sh
-
-NEWLINE_C = newline.c
+NEWLINE_C = enc/trans/newline.c
MINIPRELUDE_C = miniprelude.c
+PRELUDE_C = prelude.c
RBCONFIG = .rbconfig.time
SRC_FILE = $<
@@ -187,6 +202,8 @@ MESSAGE_END = ; do echo "$$line"; done
ECHO_BEGIN = @sep=''; for word in
ECHO_END = ; do echo @ECHO_N@ "$$sep'$$word'@ECHO_C@"; sep=' '; done; echo
+DESTDIR = @DESTDIR@
+
configure_args = @configure_args@
#### End of variables
@@ -194,15 +211,13 @@ configure_args = @configure_args@
all:
-.DEFAULT: all
-
# Prevent GNU make v3 from overflowing arg limit on SysV.
.NOEXPORT:
miniruby$(EXEEXT):
@-if test -f $@; then $(MV) -f $@ $@.old; $(RM) $@.old; fi
$(ECHO) linking $@
- $(Q) $(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(DMYEXT) $(DTRACE_OBJ) $(MAINLIBS) $(LIBS) $(OUTFLAG)$@
+ $(Q) $(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(MAINLIBS) $(LIBS) $(OUTFLAG)$@
$(PROGRAM):
@$(RM) $@
@@ -216,7 +231,7 @@ $(PROGRAM):
$(LIBRUBY_A):
@$(RM) $@
$(ECHO) linking static-library $@
- $(Q) $(AR) $(ARFLAGS) $@ $(LIBRUBY_A_OBJS) $(DMYEXT)
+ $(Q) $(AR) $(ARFLAGS) $@ $(LIBRUBY_A_OBJS) $(INITOBJS)
@-$(RANLIB) $@ 2> /dev/null || true
$(ECHO) verifying static-library $@
@$(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(MAINOBJ) $(LIBRUBY_A) $(MAINLIBS) $(EXTLIBS) $(LIBS) $(OUTFLAG)conftest$(EXEEXT)
@@ -225,20 +240,28 @@ $(LIBRUBY_A):
$(LIBRUBY_SO):
@-$(PRE_LIBRUBY_UPDATE)
$(ECHO) linking shared-library $@
- $(Q) $(LDSHARED) $(DLDFLAGS) $(OBJS) $(DLDOBJS) $(DTRACE_OBJ) $(SOLIBS) $(EXTSOLIBS) $(OUTFLAG)$@
- -$(Q) $(OBJCOPY) -w -L '$(SYMBOL_PREFIX)Init_*' -L '$(SYMBOL_PREFIX)*_threadptr_*' $@
+ $(Q) $(LDSHARED) $(DLDFLAGS) $(OBJS) $(DLDOBJS) $(SOLIBS) $(EXTSOLIBS) $(OUTFLAG)$@
+ -$(Q) $(OBJCOPY) -w -L '$(SYMBOL_PREFIX)Init_*' -L '$(SYMBOL_PREFIX)ruby_static_id_*' \
+ -L '$(SYMBOL_PREFIX)*_threadptr_*' $@
$(Q) $(POSTLINK)
@-$(MINIRUBY) -e 'ARGV.each{|link| File.delete link rescue nil; \
File.symlink "$(LIBRUBY_SO)", link}' \
$(LIBRUBY_ALIASES) || true
-$(arch)-fake.rb: config.status $(srcdir)/template/fake.rb.in
- @./config.status --file=$@:$(srcdir)/template/fake.rb.in
- @chmod +x $@
ruby_pc = @ruby_pc@
$(ruby_pc):
@./config.status --file=$@:$(srcdir)/template/ruby.pc.in
+ruby-runner.c: template/ruby-runner.c.in
+ @./config.status --file=$@:$(srcdir)/template/$(@F).in
+
+ruby-runner$(EXEEXT): ruby-runner.c
+ $(Q) $(PURIFY) $(CC) $(CFLAGS) $(CPPFLAGS) -DRUBY_INSTALL_NAME=$(RUBY_INSTALL_NAME) $(LDFLAGS) $(LIBS) $(OUTFLAG)$@ ruby-runner.c
+
+$(RBCONFIG): $(PREP)
+
+rbconfig.rb: $(RBCONFIG)
+
install-cross: $(arch)-fake.rb $(RBCONFIG) rbconfig.rb $(arch_hdrdir)/ruby/config.h \
$(LIBRUBY_A) $(LIBRUBY_SO) $(ARCHFILE)
$(ECHO) installing cross-compiling stuff
@@ -258,7 +281,7 @@ install-cross: $(arch)-fake.rb $(RBCONFIG) rbconfig.rb $(arch_hdrdir)/ruby/confi
Makefile: $(srcdir)/Makefile.in $(srcdir)/enc/Makefile.in
-$(MKFILES): config.status
+$(MKFILES): config.status $(srcdir)/version.h
@[ -f $@ ] && mv $@ $@.old
MAKE=$(MAKE) $(SHELL) ./config.status $@
@cmp $@ $@.old > /dev/null 2>&1 && echo $@ unchanged && exit 0; \
@@ -274,18 +297,18 @@ uncommon.mk: $(srcdir)/common.mk
sed 's/{\$$([^(){}]*)[^{}]*}//g' $< > $@
.PHONY: reconfig
-reconfig-args = $(srcdir)/configure $(configure_args)
+reconfig-args = $(srcdir)/$(CONFIGURE) $(configure_args)
config.status-args = ./config.status --recheck
-reconfig-exec-0 = exec 3>&1; exit `exec 4>&1; { "$$@" 3>&- 4>&-; echo $$? 1>&4; } | fgrep -v '(cached)' 1>&3`
+reconfig-exec-0 = test -t 1 && { CONFIGURE_TTY=yes; export CONFIGURE_TTY; }; exec 3>&1; exit `exec 4>&1; { "$$@" 3>&- 4>&-; echo $$? 1>&4; } | fgrep -v '(cached)' 1>&3 3>&- 4>&-`
reconfig-exec-1 = set -x; "$$@"
-reconfig config.status: $(srcdir)/configure $(srcdir)/enc/Makefile.in \
+reconfig config.status: $(srcdir)/$(CONFIGURE) $(srcdir)/enc/Makefile.in \
$(srcdir)/include/ruby/version.h
@PWD= MINIRUBY="$(MINIRUBY)"; export MINIRUBY; \
set $(SHELL) $($@-args); $(reconfig-exec-$(V))
-$(srcdir)/configure: $(srcdir)/configure.in
- $(CHDIR) $(srcdir) && exec $(AUTOCONF)
+$(srcdir)/$(CONFIGURE): $(srcdir)/configure.in $(srcdir)/aclocal.m4
+ $(CHDIR) $(srcdir) && exec $(AUTOCONF) -o $(@F)
incs: id.h
all-incs: probes.h
@@ -304,7 +327,9 @@ lex.c: defs/keywords
$(CP) $(srcdir)/lex.c.blt $@; \
else \
[ $(Q) ] && echo generating $@ || set -x; \
- gperf -C -p -j1 -i 1 -g -o -t -N rb_reserved_word -k1,3,$$ $? > $@.tmp && \
+ gperf -C -P -p -j1 -i 1 -g -o -t -N rb_reserved_word -k1,3,$$ $? \
+ | sed 's/(long)&((\(struct stringpool_t\) *\*)0)->\(stringpool_[a-z0-9]*\)/offsetof(\1, \2)/g' \
+ > $@.tmp && \
$(MV) $@.tmp $@ && \
$(CP) $? $(srcdir)/defs/lex.c.src && \
$(CP) $@ $(srcdir)/lex.c.blt; \
@@ -329,6 +354,22 @@ enc/unicode/name2ctype.h: enc/unicode/name2ctype.kwd
$(CP) $@ $(?:.kwd=.h.blt); \
fi
+JIS_PROPS_OPTIONS = -k1,3 -7 -c -j1 -i1 -t -C -P -t --ignore-case -H onig_jis_property_hash -Q onig_jis_property_pool -N onig_jis_property
+
+enc/jis/props.h: enc/jis/props.kwd
+ $(MAKEDIRS) $(@D)
+ @set +e; \
+ if cmp -s $(?:.kwd=.src) $?; then \
+ set -x; \
+ $(CP) $(?:.kwd=.h.blt) $@; \
+ else \
+ set -x; \
+ gperf $(JIS_PROPS_OPTIONS) $? | \
+ sed 's/(int)(long)&((\([a-zA-Z_0-9 ]*[a-zA-Z_0-9]\) *\*)0)->\([a-zA-Z0-9_]*\),/(char)offsetof(\1, \2),/g' > $@ && \
+ $(CP) $? $(?:.kwd=.src) && \
+ $(CP) $@ $(?:.kwd=.h.blt); \
+ fi
+
.c.@OBJEXT@:
@$(ECHO) compiling $<
$(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c $<
@@ -348,32 +389,31 @@ enc/unicode/name2ctype.h: enc/unicode/name2ctype.kwd
.d.h:
@$(ECHO) translating probes $<
$(Q) $(DTRACE) -o $@.tmp -h -C $(INCFLAGS) -s $<
- $(Q) sed -e 's/RUBY_/RUBY_DTRACE_/g' -e 's/PROBES_H_TMP/PROBES_H/g' -e 's/(char \*/(const char */g' -e 's/, char \*/, const char */g' $@.tmp > $@
+ $(Q) sed -e 's/RUBY_/RUBY_DTRACE_/g' -e 's/PROBES_H_TMP/RUBY_PROBES_H/' -e 's/(char \*/(const char */g' -e 's/, char \*/, const char */g' $@.tmp > $@
$(Q) $(RM) $@.tmp
.dmyh.h:
@$(ECHO) copying dummy $(DEST_FILE)
$(Q) $(CP) $(OS_SRC_FILE) $(OS_DEST_FILE)
-probes.@OBJEXT@: $(srcdir)/probes.d
+probes.stamp: $(DTRACE_REBUILD_OBJS)
+ $(Q) if test -f $@ -o -f probes.$(OBJEXT); then \
+ $(RM) $(DTRACE_REBUILD_OBJS) $@; \
+ $(ECHO0) "rebuilding objects which were modified by \"dtrace -G\""; \
+ $(MAKE) $(DTRACE_REBUILD_OBJS); \
+ fi
+ $(Q) touch $@
+
+probes.@OBJEXT@: $(srcdir)/probes.d $(DTRACE_REBUILD:yes=probes.stamp)
@$(ECHO) processing probes in object files
- $(Q) stamp="$*.stamp"; \
- if test -f "$$stamp" -o -f "$@"; then \
- $(RM) $(DTRACE_DEPENDENT_OBJS) "$$stamp"; \
- for o in $(DTRACE_DEPENDENT_OBJS); do \
- echo "rebuilding $$o which was modified by \"dtrace -G\""; \
- $(MAKE) "$$o"; \
- done; \
- fi; \
- touch "$$stamp"
- $(RM) $@
- $(Q) $(DTRACE) -G -C $(INCFLAGS) -s $(srcdir)/probes.d -o $@ $(DTRACE_DEPENDENT_OBJS)
+ $(Q) $(RM) $@
+ $(Q) $(DTRACE) -G -C $(INCFLAGS) -s $(srcdir)/probes.d -o $@ $(DTRACE_REBUILD_OBJS)
# DTrace static library hacks described here:
# http://mail.opensolaris.org/pipermail/dtrace-discuss/2005-August/000207.html
ruby-glommed.$(OBJEXT):
@$(ECHO) generating a glommed object with DTrace probes for static library
- $(Q) $(LD) -r -o $@ $(OBJS) $(DTRACE_OBJ)
+ $(Q) $(LD) -r -o $@ $(OBJS)
clean-local::
$(Q)$(RM) ext/extinit.c ext/extinit.$(OBJEXT) ext/ripper/y.output \
@@ -390,7 +430,7 @@ clean-ext distclean-ext realclean-ext::
@cd ext 2>/dev/null || exit 0; set dummy `echo "${EXTS}" | tr , ' '`; shift; \
test "$$#" = 0 && set .; \
set dummy `\
- find "$$@" -name Makefile -print | sed 's:^\./::;s:/Makefile$$:~:' | sort | sed 's:~$$::'; \
+ find "$$@" -name Makefile -print | sed 's:^\./::;s:/Makefile$$::' | sort; \
`; shift; \
cd ..; \
for dir do \
@@ -408,24 +448,12 @@ distclean-ext realclean-ext::
-$(Q)$(RMDIR) ext 2> /dev/null || true
clean-extout:
- -$(Q)$(RMDIRS) $(EXTOUT) 2> /dev/null || true
clean-enc distclean-enc realclean-enc:
@test -f "$(ENC_MK)" || exit 0; \
echo $(@:-enc=ing) encodings; \
exec $(MAKE) -f $(ENC_MK) $(MFLAGS) $(@:-enc=)
-clean-rdoc distclean-rdoc realclean-rdoc:
- @echo $(@:-rdoc=ing) rdoc
- $(Q)$(RMALL) $(RDOCOUT)
-clean-capi distclean-capi realclean-capi:
- @echo $(@:-capi=ing) capi
- $(Q)$(RMALL) $(CAPIOUT)
-
-clean-platform:
- @$(RM) $(PLATFORM_D)
- -$(Q) $(RMDIR) $(PLATFORM_DIR) 2> /dev/null || true
-
ext/extinit.$(OBJEXT): ext/extinit.c $(SETUP)
$(ECHO) compiling $@
$(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c ext/extinit.c
@@ -435,36 +463,80 @@ enc/encinit.$(OBJEXT): enc/encinit.c $(SETUP)
up::
@$(CHDIR) "$(srcdir)" && LC_TIME=C exec $(VCSUP)
-up::
- -$(Q)$(MAKE) $(MFLAGS) after-update
-
-after-update:: update-config_files
+after-update:: update-config_files common-srcs
update-mspec:
@$(CHDIR) $(srcdir); \
if [ -d spec/mspec ]; then \
- cd spec/mspec; \
echo updating mspec ...; \
+ $(Q1:0=:) set -x; \
+ cd spec/mspec && \
exec git pull; \
else \
echo retrieving mspec ...; \
+ $(Q1:0=:) set -x; \
exec git clone $(MSPEC_GIT_URL) spec/mspec; \
fi
update-rubyspec: update-mspec
@$(CHDIR) $(srcdir); \
if [ -d spec/rubyspec ]; then \
- cd spec/rubyspec; \
echo updating rubyspec ...; \
+ $(Q1:0=:) set -x; \
+ cd spec/rubyspec && \
exec git pull; \
else \
echo retrieving rubyspec ...; \
+ $(Q1:0=:) set -x; \
exec git clone $(RUBYSPEC_GIT_URL) spec/rubyspec; \
fi
test-rubyspec-precheck:
@if [ ! -d $(srcdir)/spec/rubyspec ]; then echo No rubyspec here. make update-rubyspec first.; exit 1; fi
+update-doclie:
+ @$(CHDIR) $(srcdir); \
+ if [ -d coverage/doclie ]; then \
+ echo updating doclie ...; \
+ $(Q1:0=:) set -x; \
+ cd coverage/doclie && \
+ git fetch && \
+ exec git checkout $(DOCLIE_GIT_REF); \
+ else \
+ echo retrieving doclie ...; \
+ $(Q1:0=:) set -x; \
+ exec git clone --branch $(DOCLIE_GIT_REF) $(DOCLIE_GIT_URL) coverage/doclie; \
+ fi
+
+update-simplecov-html:
+ @$(CHDIR) $(srcdir); \
+ if [ -d coverage/simplecov-html ]; then \
+ echo updating simplecov-html ...; \
+ $(Q1:0=:) set -x; \
+ cd coverage/simplecov-html && \
+ git fetch && \
+ exec git checkout $(SIMPLECOV_HTML_GIT_REF); \
+ else \
+ echo retrieving simplecov-html ...; \
+ exec git clone --branch $(SIMPLECOV_HTML_GIT_REF) $(SIMPLECOV_HTML_GIT_URL) coverage/simplecov-html; \
+ fi
+
+update-simplecov:
+ @$(CHDIR) $(srcdir); \
+ if [ -d coverage/simplecov ]; then \
+ echo updating simplecov ...; \
+ $(Q1:0=:) set -x; \
+ cd coverage/simplecov && \
+ git fetch && \
+ exec git checkout $(SIMPLECOV_GIT_REF); \
+ else \
+ echo retrieving simplecov ...; \
+ $(Q1:0=:) set -x; \
+ exec git clone --branch $(SIMPLECOV_GIT_REF) $(SIMPLECOV_GIT_URL) coverage/simplecov; \
+ fi
+
+update-coverage: update-simplecov update-simplecov-html update-doclie
+
INSNS = opt_sc.inc optinsn.inc optunifs.inc insns.inc insns_info.inc \
vmtc.inc vm.inc
@@ -474,6 +546,8 @@ $(INSNS): $(srcdir)/insns.def vm_opts.h \
$(ECHO) generating $@
$(Q) $(BASERUBY) -Ku $(srcdir)/tool/insns2vm.rb $(INSNS2VMOPT) $@
+verconf.h: $(RBCONFIG)
+
loadpath: verconf.h
@$(CPP) $(XCFLAGS) $(CPPFLAGS) $(srcdir)/loadpath.c | \
sed -e '1,/^const char ruby_initial_load_paths/d;/;/,$$d' \
diff --git a/NEWS b/NEWS
index afd15faf3b..be722bc9de 100644
--- a/NEWS
+++ b/NEWS
@@ -1,380 +1,404 @@
# -*- rdoc -*-
-= NEWS for Ruby 2.1.0
+= NEWS for Ruby 2.3.0
This document is a list of user visible feature changes made between
releases except for bug fixes.
Note that each entry is kept so brief that no reason behind or
reference information is supplied with. For a full list of changes
-with all sufficient information, see the ChangeLog file.
+with all sufficient information, see the ChangeLog file or Redmine
+(e.g. <tt>https://bugs.ruby-lang.org/issues/$FEATURE_OR_BUG_NUMBER</tt>)
-== Changes since the 2.0.0 release
+== Changes since the 2.2.0 release
=== Language changes
-* Now the default values of keyword arguments can be omitted. Those
- "required keyword arguments" need giving explicitly at the call time.
+* frozen-string-literal pragma:
-* Added suffixes for integer and float literals: 'r', 'i', and 'ri'.
- * "42r" and "3.14r" are evaluated as Rational(42, 1) and 3.14.rationalize,
- respectively. But exponential form with 'r' suffix like "6.022e+23r" is
- not accepted because it is misleading.
- * "42i" and "3.14i" are evaluated as Complex(0, 42) and Complex(0, 3.14),
- respectively.
- * "42ri" and "3.14ri" are evaluated as Complex(0, 42r) and Complex(0, 3.14r),
- respectively.
+ * new pragma, frozen-string-literal has been experimentally introduced.
+ [Feature #8976]
+ * besides, --enable/--disable=frozen-string-literal options also have
+ been introduced. [Feature #8976]
+ * command line options --debug or --debug=frozen-string-literal enable
+ additional debugging mode which shows created location with at frozen
+ object error (RuntimeError).
+ [Feature #11725]
-* def-expr now returns the symbol of its name instead of nil.
+* safe navigation operator:
+
+ * new method call syntax, `object&.foo', method #foo is called on
+ `object' if it is not nil.
+ this is similar to `try!' in Active Support, except:
+ * method name is syntactically required
+ obj.try! {} # valid
+ obj&. {} # syntax error
+ * arguments are evaluated only if a call is made:
+ obj.try!(:foo, bar()) # bar() is always evaluated
+ obj&.foo(bar()) # bar() is conditionally evaluated
+ * attribute assignment is valid
+ obj&.attr += 1
+ [Feature #11537]
+
+* the did_you_mean gem:
+
+ * When a NameError or NoMethodError occurs because of a typo in the name,
+ the did_you_mean gem automatically suggests other names similar to the
+ method name.
+
+ "Yuki".starts_with?("Y")
+ # => NoMethodError: undefined method `starts_with?' for "Yuki":String
+ # Did you mean? start_with?
+
+* indented here document:
+
+ * new string literal, here document starts with `<<~`.
+ refer doc/syntax/literals.rdoc for more details.
+ [Feature #9098]
=== Core classes updates (outstanding ones only)
+* ARGF
+
+ * ARGF.read_nonblock supports `exception: false' like IO#read_nonblock.
+ [Feature #11358]
+
* Array
- * New methods
- * Array#to_h converts an array of key-value pairs into a Hash.
-* Binding
- * New methods
- * Binding#local_variable_get(symbol)
- * Binding#local_variable_set(symbol, obj)
- * Binding#local_variable_defined?(symbol)
+ * Array#bsearch_index [Feature #10730]
+ * Array#dig [Feature #11643]
+
+* Comparable
+
+ * Comparable#== no longer rescues exceptions [Feature #7688]
+
+* Encoding
+
+ * new Encoding::IBM037 (alias ebcdic-cp-us; dummy)
* Enumerable
- * New methods
- * Enumerable#to_h converts a list of key-value pairs into a Hash.
-
-* Exception
- * New methods
- * Exception#cause provides the previous exception which has been caught
- at where raising the new exception.
-
-* GC
- * improvements:
- * introduced the generational GC a.k.a RGenGC.
- * added environment variables:
- * RUBY_GC_HEAP_INIT_SLOTS
- * RUBY_GC_HEAP_FREE_SLOTS
- * RUBY_GC_HEAP_GROWTH_FACTOR
- * RUBY_GC_HEAP_GROWTH_MAX_SLOTS
- * RUBY_GC_MALLOC_LIMIT_MAX
- * RUBY_GC_MALLOC_LIMIT_GROWTH_FACTOR
- * RUBY_GC_OLDMALLOC_LIMIT
- * RUBY_GC_OLDMALLOC_LIMIT_MAX
- * RUBY_GC_OLDMALLOC_LIMIT_GROWTH_FACTOR
- * obsoleted environment variables:
- * RUBY_FREE_MIN (Use RUBY_GC_HEAP_FREE_SLOTS instead)
- * RUBY_HEAP_MIN_SLOTS (Use RUBY_GC_HEAP_INIT_SLOTS instead)
-
-* Integer
- * New methods
- * Fixnum#bit_length
- * Bignum#bit_length
- * Bignum performance improvement
- * Use GMP if available.
- GMP is used only for several operations:
- multiplication, division, radix conversion, GCD
+
+ * Enumerable#grep_v is added as inverse version of Enumerable#grep.
+ [Feature #11049]
+ * Enumerable#chunk_while [Feature #10769]
+
+* Enumerator::Lazy
+
+ * Enumerator::Lazy#grep_v [Feature #11773]
+
+* File
+
+ * File.mkfifo [Feature #11536]
+ * Add File::TMPFILE corresponding to O_TMPFILE
+
+* Hash
+
+ * Hash#fetch_values [Feature #10017]
+ * Hash#dig [Feature #11643]
+ * Hash#<=, Hash#<, Hash#>=, Hash#> [Feature #10984]
+ * Hash#to_proc [Feature #11653]
* IO
- * extended methods:
- * IO#seek supports SEEK_DATA and SEEK_HOLE as whence.
- * IO#seek accepts symbols (:CUR, :END, :SET, :DATA, :HOLE) for 2nd argument.
- * IO#read_nonblock accepts optional `exception: false` to return symbols
- * IO#write_nonblock accepts optional `exception: false` to return symbols
+
+ * new mode flag File::SHARE_DELETE is available.
+ this flag means to permit deleting opened file on Windows, but currently
+ this affect only files opened as binary. [Feature #11218]
+
+ * new option parameter `flags' is added.
+ this parameter is bitwise-ORed to oflags generated by normal mode argument.
+ [Feature #11253]
+
+ * IO#advise no longer raises Errno::ENOSYS in cases where it was
+ detected at build time but not available at runtime. [Feature #11806]
* Kernel
- * New methods:
- * Kernel#singleton_method
+
+ * Kernel#loop, when stopped by a StopIteration exception, returns
+ what the enumerator has returned instead of nil. [Feature #11498]
* Module
- * New methods:
- * Module#using, which activates refinements of the specified module only
- in the current class or module definition.
- * Module#singleton_class? returns true if the receiver is a singleton class
- or false if it is an ordinary class or module.
- * extended methods:
- * Module#refine is no longer experimental.
- * Module#include and Module#prepend are now public methods.
-
-* Mutex
- * misc
- * Mutex#owned? is no longer experimental.
+ * Module#deprecate_constant [Feature #11398]
+
+* NameError
+ * NameError#receiver is added to take the receiver object. [Feature #10881]
* Numeric
- * extended methods:
- * Numeric#step allows the limit argument to be omitted, in which
- case an infinite sequence of numbers is generated. Keyword
- arguments `to` and `by` are introduced for ease of use.
-
-* Process
- * New methods:
- * alternative methods to $0/$0=:
- * Process.argv0() returns the original value of $0.
- * Process.setproctitle() sets the process title without affecting $0.
- * Process.clock_gettime
- * Process.clock_getres
+
+ * Numeric#positive? and Numeric#negative? are added, which return
+ true when the receiver is positive and negative respectively.
+ [Feature #11151]
+
+* Proc
+
+ * Proc#call (and also #[], #===, #yield) are optimized.
+ Backtrace doesn't show each method (show block lines directly).
+ TracePoint also ignores these calls. [Feature #11569]
+
+* Queue (Thread::Queue)
+
+ * Queue#close is added to notice a termination. [Feature #10600]
+
+* Regexp/String: Updated Unicode version from 7.0.0 to 8.0.0
+
+* RubyVM::InstructionSequence
+ * add the following methods as a primitive tool of iseq loader.
+ See sample/iseq_loader.rb for usage.
+ Note that loader does not have verifier so it is easy to cause
+ critical problem by loading modified/broken binary data.
+ See [Feature #11788] for more details. (experimental feature)
+ * RubyVM::InstructionSequence#to_binary(extra_data = nil)
+ * RubyVM::InstructionSequence.load_from_binary(binary)
+ * RubyVM::InstructionSequence.load_from_binary_extra_data(binary)
* String
- * "literal".freeze is now optimized to return the same object
- * New methods:
- * String#scrub and String#scrub! verify and fix invalid byte sequence.
- If you want to use this function with older Ruby,
- consider to use string-scrub.gem.
-* Symbol
- * All symbols are now frozen.
+ * String#+@ and String#-@ are added to get mutable/frozen strings.
+ [Feature #11782]
-* pack/unpack (Array/String)
- * Q! and q! directives for long long type if platform has the type.
+ * String.new now accepts new option parameter `encoding'.
+ [Feature #11785]
+
+* Struct
+ * Struct#dig [Feature #11688]
-* toplevel
- * extended methods:
- * main.using is no longer experimental. The method activates refinements
- in the ancestors of the argument module to support refinement
- inheritance by Module#include.
+* Thread
+ * Thread#name, Thread#name= are added to handle thread names [Feature #11251]
=== Core classes compatibility issues (excluding feature bug fixes)
-* Dir
- * incompatible changes:
- * Dir#glob returns composed characters (previously Apple Modofied UTF-8).
+* Array
+ * Array#select!, Array#keep_if, Array#reject!, and Array#delete_if
+ no longer changes the receiver array instantly every time the
+ block is called. [Feature #10714]
-* Hash
- * incompatible changes:
- * Hash#reject will return plain Hash object in the future versions, that
- is the original object's subclass, instance variables, default value,
- and taintedness will be no longer copied, so now warnings are emitted
- when called with such Hash.
+ * Array#flatten and Array#flatten! no longer try to call #to_ary
+ method on elements beyond the given level. [Bug #10748]
-* IO
- * incompatible changes:
- * open ignore internal encoding if external encoding is ASCII-8BIT.
+ * Array#inspect doesn't raise error even if its content returns
+ a string which is not compatible with Encoding.default_external
+ as inspected result. [Feature #11801]
-* Kernel#eval, Kernel#instance_eval, and Module#module_eval.
- * Copies the scope information of the original environment, which means
- that private, protected, public, and module_function without arguments
- do not affect the environment outside the eval string.
- For example, `class Foo; eval "private"; def foo; end; end' doesn't make
- Foo#foo private.
+* Enumerable
+ * Enumerable#chunk and Enumerable#slice_before no longer takes the
+ initial_state argument. [Feature #10958]
+ Use a local variable instead to maintain a state.
-* Kernel#untrusted?, untrust, and trust
- * These methods are deprecated and their behavior is same as tainted?,
- taint, and untaint, respectively. If $VERBOSE is true, they show warnings.
+* File::Stat
+ * On Windows File::Stat#ino always returned 0, but now returns
+ BY_HANDLE_FILE_INFORMATION.nFileIndexHigh/Low. [Feature #11216]
-* Module#ancestors
- * The ancestors of a singleton class now include singleton classes,
- in particular itself.
+* Hash
+ * Hash#inspect doesn't raise error even if its content returns
+ a string which is not compatible with Encoding.default_external
+ as inspected result. [Feature #11801]
-* Module#define_method and Object#define_singleton_method
- * Now they return the symbols of the defined methods, not the methods/procs
- themselves.
+* IO
+ * IO#close doesn't raise when the IO object is closed. [Feature #10718]
+ * IO#each_codepoint raises an exception at incomplete character
+ before EOF when conversion takes place. [Bug #11444]
-* Numeric#quo
- * Raises TypeError instead of ArgumentError if the receiver doesn't have
- to_r method.
+* Module
+ * Module#define_method and Object.define_singleton_method now
+ require method body, Proc, Method, or a block, and raise
+ ArgumentError if no block is given directly. [Bug #11283]
-* Proc
- * Returning from lambda proc now always exits from the Proc, not from the
- method where the lambda is created. Returning from non-lambda proc exits
- from the method, same as the former behavior.
+* pack/unpack (Array/String)
+ * j and J directives for pointer width integer type. [Feature #11215]
-String
- * If invalid: :replace is specified for String#encode, replace
- invalid byte sequence even if the destination encoding equals to
- the source encoding.
=== Stdlib updates (outstanding ones only)
-* CGI::Util
- * All class methods modulized.
-
-* Digest
- * extended methods:
- * Digest::Class.file takes optional arguments for its constructor
-
-* Matrix
- * Added Vector#cross_product.
-
-* Net::SMTP
- * Added Net::SMTP#rset to implement the RSET command
-
-* objspace
- * new method:
- * ObjectSpace.trace_object_allocations
- * ObjectSpace.trace_object_allocations_start
- * ObjectSpace.trace_object_allocations_stop
- * ObjectSpace.trace_object_allocations_clear
- * ObjectSpace.allocation_sourcefile
- * ObjectSpace.allocation_sourceline
- * ObjectSpace.allocation_class_path
- * ObjectSpace.allocation_method_id
- * ObjectSpace.allocation_generation
- * ObjectSpace.reachable_objects_from_root
- * ObjectSpace.dump
- * ObjectSpace.dump_all
-
-* OpenSSL::BN
- * extended methods:
- * OpenSSL::BN.new allows Fixnum/Bignum argument.
-
-* open-uri
- * Support multiple fields with same field name (like Set-Cookie).
+* Logger
-* Pathname
- * New methods:
- * Pathname#write
- * Pathname#binwrite
+ * Logger#level= now supports symbol and string levels such as :debug, :info,
+ :warn, :error, :fatal (case insensitive) [Feature #11695]
+ * Logger#reopen is added to reopen a log device. [Feature #11696]
-* rake
- * Updated to 10.1.0. Major changes include removal of the class namespace,
- Rake::DSL to hold the rake DSL methods and removal of support for legacy
- rake features.
+* io/wait
+ * IO#wait_readable no longer checks FIONREAD, it may be used for
+ non-bytestream IO such as listen sockets.
- For a complete list of changes since rake 0.9.6 see:
+* Net::FTP
+ * Net::FTP#mlst is added.
+ * Net::FTP#mlsd is added.
- http://rake.rubyforge.org/doc/release_notes/rake-10_1_0_rdoc.html
+* nkf
+ * Merge nkf 2.1.4.
- http://rake.rubyforge.org/doc/release_notes/rake-10_0_3_rdoc.html
+* ObjectSpace (objspace)
+ * ObjectSpace.count_symbols is added.
+ * ObjectSpace.count_imemo_objects is added.
+ * ObjectSpace.internal_class_of is added.
+ * ObjectSpace.internal_super_of is added.
-* RbConfig
- * New constants:
- * RbConfig::SIZEOF is added to provide the size of C types.
+* OpenSSL
+ * OpenSSL::SSL::SSLSocket#accept_nonblock and
+ OpenSSL::SSL::SSLSocket#connect_nonblock supports `exception: false`.
+ [Feature #10532]
-* RDoc
- * Updated to 4.1.0. Major enhancements include a modified default template
- * and accessibility enhancements.
+* Pathname
+ * Pathname#descend and Pathname#ascend supported blockless form.
+ [Feature #11052]
- For a list of minor enhancements and bug fixes see:
- https://github.com/rdoc/rdoc/blob/v4.1.0.preview.1/History.rdoc
+* Socket
+ * Socket#connect_nonblock, Socket#accept_nonblock,
+ TCPServer#accept_nonblock, UNIXServer#accept_nonblock,
+ BasicSocket#recv_nonblock, BasicSocket#recvmsg_nonblock,
+ BasicSocket#sendmsg_nonblock all support `exception: false` to return
+ :wait_readable or :wait_writable symbols instead of raising
+ IO::WaitReadable or IO::WaitWritable exceptions
+ [Feature #10532] [Feature #11229]
+ * BasicSocket#recv and BasicSocket#recv_nonblock allow an output
+ String buffer argument like IO#read and IO#read_nonblock to reduce
+ GC overhead [Feature #11242]
+
+* StringIO
+ * In read-only mode, StringIO#set_encoding no longer sets the encoding
+ of its buffer string. Setting the encoding of the string directly
+ without StringIO#set_encoding may cause unpredictable behavior now.
+ [Bug #11827]
+
+* timeout
+ * Object#timeout is now warned as deprecated when called.
-* Resolv
- * New methods:
- * Resolv::DNS.fetch_resource
- * One-shot multicast DNS support
- * Support LOC resources
+=== Stdlib compatibility issues (excluding feature bug fixes)
-* REXML::Parsers::SAX2Parser
- * Fixes wrong number of arguments of entitydecl event. Document of the event
- says "an array of the entity declaration" but implementation passes two
- or more arguments. It is an implementation bug but it breaks backward
- compatibility.
+* ext/coverage/coverage.c
+ * Coverage.peek_result: new method to allow coverage to be captured without
+ stopping the coverage tool. [Feature #10816]
-* REXML::Parsers::StreamParser
- * Supports "entity" event.
+* Fiddle
+ * Fiddle::Function#call releases the GVL. [Feature #11607]
-* REXML::Text
- * REXML::Text#<< supports method chain like 'text << "XXX" << "YYY"'.
- * REXML::Text#<< supports not "raw" mode.
+* io-console
+ * Update to io-console 0.4.5, and change the license to BSD 2-clause
+ "Simplified" License.
-* Rinda::RingServer, Rinda::RingFinger
- * Rinda now supports multicast sockets. See Rinda::RingServer and
- Rinda::RingFinger for details.
+* lib/base64.rb
+ * Base64.urlsafe_encode64: added a "padding" option to suppress
+ the padding character ("="). [Feature #10740]
+ * Base64.urlsafe_decode64: now it accepts not only correctly-padded
+ input but also unpadded input. [Feature #10740]
-* RubyGems
- * Updated to 2.2.0. Notable new features include:
+* lib/drb/drb.rb
+ * removed unused argument. https://github.com/ruby/ruby/pull/515
- * Gemfile or gem.deps.rb support including Gem.file.lock (experimental)
- * Improved, iterative resolver (compared to RubyGems 2.1 and earlier)
- * Support for a sharing a GEM_HOME across ruby platforms and versions
+* lib/matrix.rb
+ * Add Vector#round. https://github.com/ruby/ruby/pull/802
- * Updated to 2.2.2. Fixes some minor bugs and performance regressions.
+* lib/webrick/utils.rb
+ * removed unused argument. https://github.com/ruby/ruby/pull/356
- For a complete list of enhancements and bug fixes see:
- https://github.com/rubygems/rubygems/tree/master/History.txt
+* Net::FTP
+ * Connections are in passive mode per default now. The default mode can
+ be changed by Net::FTP.default_passive=. [Feature #11612]
-* Set
- * New methods:
- * Set#intersect?
- * Set#disjoint?
+* Net::HTTP
+ * default value of Net::HTTP#open_timeout is now 60 (was nil).
-* Socket
- * New methods:
- * Socket.getifaddrs
-
-* StringScanner
- * extended methods:
- * StringScanner#[] supports named captures.
-
-* Syslog::Logger
- * Added facility.
-
-* Tempfile
- * New methods:
- * Tempfile.create
-
-* Timeout
- * The exception to terminate the given block can no longer be rescued
- inside the block, by default, unless the exception class is given
- explicitly.
-
-* TSort
- * New methods:
- * TSort.tsort
- * TSort.tsort_each
- * TSort.strongly_connected_components
- * TSort.each_strongly_connected_component
- * TSort.each_strongly_connected_component_from
-
-* WEBrick
- * The body of a response may now be a StringIO or other IO-like that responds
- to #readpartial and #read.
-
-* XMLRPC::Client
- * New methods:
- * XMLRPC::Client#http. It returns Net::HTTP for the client. Normally,
- it is not needed. It is useful when you want to change minor HTTP client
- options. You can change major HTTP client options by XMLRPC::Client
- methods. You should use XMLRPC::Client methods for changing major
- HTTP client options instead of XMLRPC::Client#http.
+* Net::Telnet
+ * Net::Telnet is extracted to net-telnet gem. It's unmaintain code.
+ [Feature #11083]
-=== Stdlib compatibility issues (excluding feature bug fixes)
+* Psych
+ * Updated to Psych 2.0.17
-* Set
- * incompatible changes:
- * Set#to_set now returns self instead of generating a copy.
+* Rake
+ * Rake is removed from stdlib. [Feature #11025]
-* URI
- * incompatible changes:
- * URI.decode_www_form follows current WHATWG URL Standard.
- It gets encoding argument to specify the character encoding.
- It now allows loose percent encoded strings, but denies ;-separator.
- * URI.encode_www_form follows current WHATWG URL Standard.
- It gets encoding argument to convert before percent encode.
- UTF-16 strings aren't converted to UTF-8 before percent encode by default.
+* RDoc
+ * Updated to RDoc 4.2.1. For full release notes see:
+
+ https://github.com/rdoc/rdoc/blob/master/History.rdoc#421--2015-12-22
+
+* RubyGems
+ * Updated to RubyGems 2.5.1. For full release notes see:
-* curses
- * Removed.
- curses is now available as a gem.
- See https://rubygems.org/gems/curses for details.
+ http://docs.seattlerb.org/rubygems/History_txt.html#label-2.5.0+-2F+2015-11-03
+ and
+ http://docs.seattlerb.org/rubygems/History_txt.html#label-2.5.1+-2F+2015-12-10
=== Built-in global variables compatibility issues
* $SAFE
- * $SAFE=4 is obsolete. If $SAFE is set to 4 or larger, an ArgumentError
- is raised.
+ * $SAFE=2 and $SAFE=3 are obsolete. If $SAFE is set to 2 or larger,
+ an ArgumentError is raised. [Feature #5455]
=== C API updates
-* rb_gc_set_params() is deprecated. This is only used in Ruby internal.
+* rb_define_class_id_under() now raises a TypeError exception when the
+ class is already defined but its superclass does not match the given
+ superclass, as well as definitions in ruby level.
+
+* rb_timespec_now() is added to fetch current datetime as struct timespec.
+ [Feature #11558]
+
+* rb_time_timespec_new() is added to create a time object with epoch,
+ nanosecond, and UTC/localtime/time offset arguments. [Feature #11558]
+
+* rb_autoload() deprecated, use rb_funcall() instead. [Feature #11664]
+
+* rb_compile_error_with_enc(), rb_compile_error(), and rb_compile_bug()
+ deprecated. these functions are exposed but only for internal use.
+ external libraries should not use them.
+
+=== Supported platform changes
+
+* OS/2 is no longer supported
+
+* BeOS is no longer supported
+
+* Borland-C is no longer supported
+
+* Haiku now stable and best effort
+
+=== Implementation improvements
+
+* Optimize Proc#call to eliminate method frame construction.
+ [Feature #11569]
+
+* Reconsidering method entry data structure.
+ [Bug #11278]
+
+* Introducing new table data structure for ID keys tables used by
+ method table and so on. New table structure is simple and fast
+ than st_table. [Feature #11420]
+
+* Machine code level tuning for object allocation and method calling
+ code. r52099, r52254
+
+* RubyVM::InstructionSequence is extended for future improvement.
+ [Feature #11788]
+
+* Case dispatch is now optimized for all special constant literals
+ including nil, true, and false. Previously, only literal strings,
+ symbols, integers and floats compiled to optimized case dispatch.
+ [Feature #11769]
+
+* Instance variables on non-pure Ruby classes (T_DATA, T_FILE,
+ etc..) is less expensive to store than before. [Feature #11170]
+
+* All accesses to members of big Struct objects are performed in
+ constant-time. Previously, Struct elements beyond the first 10
+ 10 elements used a linear scan. [Feature #10585]
-* rb_gc_count() added. This returns the number of times GC occurred.
+* The Set class got several speed up.
+ [Misc #10754], [r52591]
-* rb_gc_stat() added. This allows access to specific GC.stat() values from C
- without any allocation overhead.
+* Socket and I/O-related improvements
-* rb_gc_latest_gc_info() added. This allows access to GC.latest_gc_info().
+ * Calling overhead of most of new keyword-using I/O methods in
+ [Feature #11229] is reduced by avoiding the inefficient C API
+ to parse keywords. [Feature #11339]
-* rb_postponed_job_register() added. Takes a function callback which is invoked
- when the VM is in a consistent state, i.e. to perform work from a C signal
- handler.
+ * The standard library is updated to use the improved
+ exception-free non-blocking I/O from [Feature #11229].
+ This has the additional benefit of quieter $DEBUG output in
+ addition to reducing expensive exceptions. [Feature #11044]
-* rb_profile_frames() added. Provides low-cost access to the current ruby stack
- for callstack profiling.
+ * (Linux-only) waiting on a single FD anywhere in the stdlib no longer
+ uses select(2), making it immune to slowdowns with high-numbered FDs.
+ [Feature #11081] [Feature #11377]
-* rb_tracepoint_new() supports new internal events accessible only from C:
- * RUBY_INTERNAL_EVENT_NEWOBJ
- * RUBY_INTERNAL_EVENT_FREEOBJ
- * RUBY_INTERNAL_EVENT_GC_START
- * RUBY_INTERNAL_EVENT_GC_END_MARK
- * RUBY_INTERNAL_EVENT_GC_END_SWEEP
- * Note that you *can not* specify "internal events" with normal events
- (such as RUBY_EVENT_CALL, RUBY_EVENT_RETURN) simultaneously.
+* CGI.escapeHTML is optimized with C extention.
+ https://github.com/ruby/ruby/pull/1164
diff --git a/README b/README
deleted file mode 100644
index 3ffe3553a8..0000000000
--- a/README
+++ /dev/null
@@ -1,166 +0,0 @@
-= What's Ruby
-
-Ruby is the interpreted scripting language for quick and
-easy object-oriented programming. It has many features to
-process text files and to do system management tasks (as in
-Perl). It is simple, straight-forward, and extensible.
-
-
-== Features of Ruby
-
-* Simple Syntax
-* *Normal* Object-Oriented features(ex. class, method calls)
-* *Advanced* Object-Oriented features(ex. Mix-in, Singleton-method)
-* Operator Overloading
-* Exception Handling
-* Iterators and Closures
-* Garbage Collection
-* Dynamic Loading of Object files(on some architecture)
-* Highly Portable (works on many Unix-like/POSIX compatible platforms
- as well as Windows, Mac OS X, BeOS etc.)
- cf. http://bugs.ruby-lang.org/projects/ruby-trunk/wiki/SupportedPlatforms
-
-
-== How to get Ruby
-
-For a complete list of ways to install Ruby, including using third party
-tools like rvm, see:
-
-http://www.ruby-lang.org/en/downloads/
-
-The Ruby distribution files can be found in the following FTP site:
-
-ftp://ftp.ruby-lang.org/pub/ruby/
-
-The trunk of the Ruby source tree can be checked out with the
-following command:
-
- $ svn co http://svn.ruby-lang.org/repos/ruby/trunk/ ruby
-
-Or if you are using git then use the following command:
-
- $ git clone git://github.com/ruby/ruby.git
-
-There are some other branches under development. Try the following
-command and see the list of branches:
-
- $ svn ls http://svn.ruby-lang.org/repos/ruby/branches/
-
-Or if you are using git then use the following command:
-
- $ git ls-remote git://github.com/ruby/ruby.git
-
-== Ruby home-page
-
-The URL of the Ruby home-page is:
-
-http://www.ruby-lang.org/
-
-
-== Mailing list
-
-There is a mailing list to talk about Ruby.
-To subscribe this list, please send the following phrase
-
- subscribe YourFirstName YourFamilyName
-e.g.
- subscribe Joseph Smith
-
-in the mail body (not subject) to the address <mailto:ruby-talk-ctl@ruby-lang.org>.
-
-
-== How to compile and install
-
-This is what you need to do to compile and install Ruby:
-
-0. If you want to use Microsoft Visual C++ to compile ruby,
- read win32/README.win32 instead of this document.
-
-1. If +./configure+ does not exist or is older than configure.in,
- run autoconf to (re)generate configure.
-
-2. Run +./configure+, which will generate config.h and Makefile.
-
- Some C compiler flags may be added by default depending on your
- environment. Specify <tt>optflags=..</tt> and <tt>warnflags=..</tt> as
- necessary to override them.
-
-3. Edit +defines.h+ if you need. Usually this step will not be needed.
-
-4. Remove comment mark(<tt>#</tt>) before the module names from +ext/Setup+
- (or add module names if not present), if you want to link modules
- statically.
-
- If you don't want to compile non static extension modules
- (probably on architectures which does not allow dynamic loading),
- remove comment mark from the line "<tt>#option nodynamic</tt>" in
- +ext/Setup+.
-
- Usually this step will not be needed.
-
-5. Run +make+.
-
-6. Optionally, run '<tt>make check</tt>' to check whether the compiled Ruby
- interpreter works well. If you see the message "<tt>check succeeded</tt>",
- your ruby works as it should (hopefully).
-
-7. Run '<tt>make install</tt>'
-
- This command will create following directories and install files
- onto them.
-
- * <tt>${DESTDIR}${prefix}/bin</tt>
- * <tt>${DESTDIR}${prefix}/include/ruby-${MAJOR}.${MINOR}.${TEENY}</tt>
- * <tt>${DESTDIR}${prefix}/include/ruby-${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}</tt>
- * <tt>${DESTDIR}${prefix}/lib</tt>
- * <tt>${DESTDIR}${prefix}/lib/ruby</tt>
- * <tt>${DESTDIR}${prefix}/lib/ruby/${MAJOR}.${MINOR}.${TEENY}</tt>
- * <tt>${DESTDIR}${prefix}/lib/ruby/${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}</tt>
- * <tt>${DESTDIR}${prefix}/lib/ruby/site_ruby</tt>
- * <tt>${DESTDIR}${prefix}/lib/ruby/site_ruby/${MAJOR}.${MINOR}.${TEENY}</tt>
- * <tt>${DESTDIR}${prefix}/lib/ruby/site_ruby/${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}</tt>
- * <tt>${DESTDIR}${prefix}/lib/ruby/vendor_ruby</tt>
- * <tt>${DESTDIR}${prefix}/lib/ruby/vendor_ruby/${MAJOR}.${MINOR}.${TEENY}</tt>
- * <tt>${DESTDIR}${prefix}/lib/ruby/vendor_ruby/${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}</tt>
- * <tt>${DESTDIR}${prefix}/lib/ruby/gems/${MAJOR}.${MINOR}.${TEENY}</tt>
- * <tt>${DESTDIR}${prefix}/share/man/man1</tt>
- * <tt>${DESTDIR}${prefix}/share/ri/${MAJOR}.${MINOR}.${TEENY}/system</tt>
-
- If Ruby's API version is '_x.y.z_', the <tt>${MAJOR}</tt> is '_x_', the
- <tt>${MINOR}</tt> is '_y_', and the <tt>${TEENY}</tt> is '_z_'.
-
- *NOTE*: teeny of the API version may be different from one of
- Ruby's program version
-
- You may have to be a super user to install ruby.
-
-If you fail to compile ruby, please send the detailed error report with
-the error log and machine/OS type, to help others.
-
-Some extension libraries may not get compiled because of lack of
-necessary external libraries and/or headers, then you will need to run
-'<tt>make distclean-ext</tt>' to remove old configuration after
-installing them in such case.
-
-== Copying
-
-See the file +COPYING+.
-
-== Feedback
-
-Questions about the Ruby language can be asked on the Ruby-Talk mailing list
-(http://www.ruby-lang.org/en/community/mailing-lists) or on websites like
-(http://stackoverflow.com).
-
-Bug reports should be filed at http://bugs.ruby-lang.org
-
-== The Author
-
-Ruby was originally designed and developed by Yukihiro Matsumoto (Matz) in 1995.
-
-<mailto:matz@ruby-lang.org>
-
---
-Local variables:
-mode: rdoc
-end:
diff --git a/README.EXT b/README.EXT
index b1a816c271..48b8d964c4 100644
--- a/README.EXT
+++ b/README.EXT
@@ -1,1598 +1 @@
-# README.EXT - -*- RDoc -*- created at: Mon Aug 7 16:45:54 JST 1995
-
-This document explains how to make extension libraries for Ruby.
-
-= Basic Knowledge
-
-In C, variables have types and data do not have types. In contrast,
-Ruby variables do not have a static type, and data themselves have
-types, so data will need to be converted between the languages.
-
-Data in Ruby are represented by the C type `VALUE'. Each VALUE data
-has its data-type.
-
-To retrieve C data from a VALUE, you need to:
-
-1. Identify the VALUE's data type
-2. Convert the VALUE into C data
-
-Converting to the wrong data type may cause serious problems.
-
-== Data-Types
-
-The Ruby interpreter has the following data types:
-
-T_NIL :: nil
-T_OBJECT :: ordinary object
-T_CLASS :: class
-T_MODULE :: module
-T_FLOAT :: floating point number
-T_STRING :: string
-T_REGEXP :: regular expression
-T_ARRAY :: array
-T_HASH :: associative array
-T_STRUCT :: (Ruby) structure
-T_BIGNUM :: multi precision integer
-T_FIXNUM :: Fixnum(31bit or 63bit integer)
-T_COMPLEX :: complex number
-T_RATIONAL :: rational number
-T_FILE :: IO
-T_TRUE :: true
-T_FALSE :: false
-T_DATA :: data
-T_SYMBOL :: symbol
-
-In addition, there are several other types used internally:
-
-T_ICLASS :: included module
-T_MATCH :: MatchData object
-T_UNDEF :: undefined
-T_NODE :: syntax tree node
-T_ZOMBIE :: object awaiting finalization
-
-Most of the types are represented by C structures.
-
-== Check Data Type of the VALUE
-
-The macro TYPE() defined in ruby.h shows the data type of the VALUE.
-TYPE() returns the constant number T_XXXX described above. To handle
-data types, your code will look something like this:
-
- switch (TYPE(obj)) {
- case T_FIXNUM:
- /* process Fixnum */
- break;
- case T_STRING:
- /* process String */
- break;
- case T_ARRAY:
- /* process Array */
- break;
- default:
- /* raise exception */
- rb_raise(rb_eTypeError, "not valid value");
- break;
- }
-
-There is the data-type check function
-
- void Check_Type(VALUE value, int type)
-
-which raises an exception if the VALUE does not have the type
-specified.
-
-There are also faster check macros for fixnums and nil.
-
- FIXNUM_P(obj)
- NIL_P(obj)
-
-== Convert VALUE into C Data
-
-The data for type T_NIL, T_FALSE, T_TRUE are nil, false, true
-respectively. They are singletons for the data type.
-The equivalent C constants are: Qnil, Qfalse, Qtrue.
-Note that Qfalse is false in C also (i.e. 0), but not Qnil.
-
-The T_FIXNUM data is a 31bit or 63bit length fixed integer.
-This size is depend on the size of long: if long is 32bit then
-T_FIXNUM is 31bit, if long is 64bit then T_FIXNUM is 63bit.
-T_FIXNUM can be converted to a C integer by using the
-FIX2INT() macro or FIX2LONG(). Though you have to check that the
-data is really FIXNUM before using them, they are faster. FIX2LONG()
-never raises exceptions, but FIX2INT() raises RangeError if the
-result is bigger or smaller than the size of int.
-There are also NUM2INT() and NUM2LONG() which converts any Ruby
-numbers into C integers. These macros includes a type check,
-so an exception will be raised if the conversion failed. NUM2DBL()
-can be used to retrieve the double float value in the same way.
-
-You can use the macros
-StringValue() and StringValuePtr() to get a char* from a VALUE.
-StringValue(var) replaces var's value with the result of "var.to_str()".
-StringValuePtr(var) does same replacement and returns char*
-representation of var. These macros will skip the replacement if var
-is a String. Notice that the macros take only the lvalue as their
-argument, to change the value of var in place.
-
-You can also use the macro named StringValueCStr(). This is just
-like StringValuePtr(), but always add nul character at the end of
-the result. If the result contains nul character, this macro causes
-the ArgumentError exception.
-StringValuePtr() doesn't guarantee the existence of a nul at the end
-of the result, and the result may contain nul.
-
-Other data types have corresponding C structures, e.g. struct RArray
-for T_ARRAY etc. The VALUE of the type which has the corresponding
-structure can be cast to retrieve the pointer to the struct. The
-casting macro will be of the form RXXXX for each data type; for
-instance, RARRAY(obj). See "ruby.h". However, we do not recommend
-to access RXXXX data directly because these data structure is complex.
-Use corresponding rb_xxx() functions to access internal struct.
-For example, to access an entry of array, use rb_ary_entry(ary, offset)
-and rb_ary_store(ary, offset, obj).
-
-There are some accessing macros for structure members, for example
-`RSTRING_LEN(str)' to get the size of the Ruby String object. The
-allocated region can be accessed by `RSTRING_PTR(str)'.
-
-Notice: Do not change the value of the structure directly, unless you
-are responsible for the result. This ends up being the cause of
-interesting bugs.
-
-== Convert C Data into VALUE
-
-To convert C data to Ruby values:
-
-FIXNUM ::
-
- left shift 1 bit, and turn on LSB.
-
-Other pointer values::
-
- cast to VALUE.
-
-You can determine whether a VALUE is pointer or not by checking its LSB.
-
-Notice Ruby does not allow arbitrary pointer values to be a VALUE. They
-should be pointers to the structures which Ruby knows about. The known
-structures are defined in <ruby.h>.
-
-To convert C numbers to Ruby values, use these macros.
-
-INT2FIX() :: for integers within 31bits.
-INT2NUM() :: for arbitrary sized integer.
-
-INT2NUM() converts an integer into a Bignum if it is out of the FIXNUM
-range, but is a bit slower.
-
-== Manipulating Ruby Data
-
-As I already mentioned, it is not recommended to modify an object's
-internal structure. To manipulate objects, use the functions supplied
-by the Ruby interpreter. Some (not all) of the useful functions are
-listed below:
-
-=== String Functions
-
-rb_str_new(const char *ptr, long len) ::
-
- Creates a new Ruby string.
-
-rb_str_new2(const char *ptr) ::
-rb_str_new_cstr(const char *ptr) ::
-
- Creates a new Ruby string from a C string. This is equivalent to
- rb_str_new(ptr, strlen(ptr)).
-
-rb_tainted_str_new(const char *ptr, long len) ::
-
- Creates a new tainted Ruby string. Strings from external data
- sources should be tainted.
-
-rb_tainted_str_new2(const char *ptr) ::
-rb_tainted_str_new_cstr(const char *ptr) ::
-
- Creates a new tainted Ruby string from a C string.
-
-rb_sprintf(const char *format, ...) ::
-rb_vsprintf(const char *format, va_list ap) ::
-
- Creates a new Ruby string with printf(3) format.
-
- Note: In the format string, %i is used for Object#to_s (or Object#inspect if
- '+' flag is set) output (and related argument must be a VALUE). For integers
- in format strings, use %d.
-
-rb_str_cat(VALUE str, const char *ptr, long len) ::
-
- Appends len bytes of data from ptr to the Ruby string.
-
-rb_str_cat2(VALUE str, const char* ptr) ::
-
- Appends C string ptr to Ruby string str. This function is
- equivalent to rb_str_cat(str, ptr, strlen(ptr)).
-
-rb_str_catf(VALUE str, const char* format, ...) ::
-rb_str_vcatf(VALUE str, const char* format, va_list ap) ::
-
- Appends C string format and successive arguments to Ruby string
- str according to a printf-like format. These functions are
- equivalent to rb_str_cat2(str, rb_sprintf(format, ...)) and
- rb_str_cat2(str, rb_vsprintf(format, ap)), respectively.
-
-rb_enc_str_new(const char *ptr, long len, rb_encoding *enc) ::
-rb_enc_str_new_cstr(const char *ptr, rb_encoding *enc) ::
-
- Creates a new Ruby string with the specified encoding.
-
-rb_usascii_str_new(const char *ptr, long len) ::
-rb_usascii_str_new_cstr(const char *ptr) ::
-
- Creates a new Ruby string with encoding US-ASCII.
-
-rb_str_resize(VALUE str, long len) ::
-
- Resizes Ruby string to len bytes. If str is not modifiable, this
- function raises an exception. The length of str must be set in
- advance. If len is less than the old length the content beyond
- len bytes is discarded, else if len is greater than the old length
- the content beyond the old length bytes will not be preserved but
- will be garbage. Note that RSTRING_PTR(str) may change by calling
- this function.
-
-rb_str_set_len(VALUE str, long len) ::
-
- Sets the length of Ruby string. If str is not modifiable, this
- function raises an exception. This function preserves the content
- upto len bytes, regardless RSTRING_LEN(str). len must not exceed
- the capacity of str.
-
-=== Array Functions
-
-rb_ary_new() ::
-
- Creates an array with no elements.
-
-rb_ary_new2(long len) ::
-rb_ary_new_capa(long len) ::
-
- Creates an array with no elements, allocating internal buffer
- for len elements.
-
-rb_ary_new3(long n, ...) ::
-rb_ary_new_from_args(long n, ...) ::
-
- Creates an n-element array from the arguments.
-
-rb_ary_new4(long n, VALUE *elts) ::
-rb_ary_new_from_values(long n, VALUE *elts) ::
-
- Creates an n-element array from a C array.
-
-rb_ary_to_ary(VALUE obj) ::
-
- Converts the object into an array.
- Equivalent to Object#to_ary.
-
-There are many functions to operate an array. They may dump core if other
-types are given.
-
-rb_ary_aref(argc, VALUE *argv, VALUE ary) ::
-
- Equivalent to Array#[].
-
-rb_ary_entry(VALUE ary, long offset) ::
-
- ary[offset]
-
-rb_ary_store(VALUE ary, long offset, VALUE obj) ::
-
- ary[offset] = obj
-
-rb_ary_subseq(VALUE ary, long beg, long len) ::
-
- ary[beg, len]
-
-rb_ary_push(VALUE ary, VALUE val) ::
-rb_ary_pop(VALUE ary) ::
-rb_ary_shift(VALUE ary) ::
-rb_ary_unshift(VALUE ary, VALUE val) ::
-
-rb_ary_cat(VALUE ary, const VALUE *ptr, long len) ::
-
- Appends len elements of objects from ptr to the array.
-
-= Extending Ruby with C
-
-== Adding New Features to Ruby
-
-You can add new features (classes, methods, etc.) to the Ruby
-interpreter. Ruby provides APIs for defining the following things:
-
-* Classes, Modules
-* Methods, Singleton Methods
-* Constants
-
-=== Class and Module Definition
-
-To define a class or module, use the functions below:
-
- VALUE rb_define_class(const char *name, VALUE super)
- VALUE rb_define_module(const char *name)
-
-These functions return the newly created class or module. You may
-want to save this reference into a variable to use later.
-
-To define nested classes or modules, use the functions below:
-
- VALUE rb_define_class_under(VALUE outer, const char *name, VALUE super)
- VALUE rb_define_module_under(VALUE outer, const char *name)
-
-=== Method and Singleton Method Definition
-
-To define methods or singleton methods, use these functions:
-
- void rb_define_method(VALUE klass, const char *name,
- VALUE (*func)(), int argc)
-
- void rb_define_singleton_method(VALUE object, const char *name,
- VALUE (*func)(), int argc)
-
-The `argc' represents the number of the arguments to the C function,
-which must be less than 17. But I doubt you'll need that many.
-
-If `argc' is negative, it specifies the calling sequence, not number of
-the arguments.
-
-If argc is -1, the function will be called as:
-
- VALUE func(int argc, VALUE *argv, VALUE obj)
-
-where argc is the actual number of arguments, argv is the C array of
-the arguments, and obj is the receiver.
-
-If argc is -2, the arguments are passed in a Ruby array. The function
-will be called like:
-
- VALUE func(VALUE obj, VALUE args)
-
-where obj is the receiver, and args is the Ruby array containing
-actual arguments.
-
-There are some more functions to define methods. One takes an ID
-as the name of method to be defined. See also ID or Symbol below.
-
- void rb_define_method_id(VALUE klass, ID name,
- VALUE (*func)(ANYARGS), int argc)
-
-There are two functions to define private/protected methods:
-
- void rb_define_private_method(VALUE klass, const char *name,
- VALUE (*func)(), int argc)
- void rb_define_protected_method(VALUE klass, const char *name,
- VALUE (*func)(), int argc)
-
-At last, rb_define_module_function defines a module functions,
-which are private AND singleton methods of the module.
-For example, sqrt is the module function defined in Math module.
-It can be called in the following way:
-
- Math.sqrt(4)
-
-or
-
- include Math
- sqrt(4)
-
-To define module functions, use:
-
- void rb_define_module_function(VALUE module, const char *name,
- VALUE (*func)(), int argc)
-
-In addition, function-like methods, which are private methods defined
-in the Kernel module, can be defined using:
-
- void rb_define_global_function(const char *name, VALUE (*func)(), int argc)
-
-To define an alias for the method,
-
- void rb_define_alias(VALUE module, const char* new, const char* old);
-
-To define a reader/writer for an attribute,
-
- void rb_define_attr(VALUE klass, const char *name, int read, int write)
-
-To define and undefine the `allocate' class method,
-
- void rb_define_alloc_func(VALUE klass, VALUE (*func)(VALUE klass));
- void rb_undef_alloc_func(VALUE klass);
-
-func has to take the klass as the argument and return a newly
-allocated instance. This instance should be as empty as possible,
-without any expensive (including external) resources.
-
-=== Constant Definition
-
-We have 2 functions to define constants:
-
- void rb_define_const(VALUE klass, const char *name, VALUE val)
- void rb_define_global_const(const char *name, VALUE val)
-
-The former is to define a constant under specified class/module. The
-latter is to define a global constant.
-
-== Use Ruby Features from C
-
-There are several ways to invoke Ruby's features from C code.
-
-=== Evaluate Ruby Programs in a String
-
-The easiest way to use Ruby's functionality from a C program is to
-evaluate the string as Ruby program. This function will do the job:
-
- VALUE rb_eval_string(const char *str)
-
-Evaluation is done under the current context, thus current local variables
-of the innermost method (which is defined by Ruby) can be accessed.
-
-Note that the evaluation can raise an exception. There is a safer
-function:
-
- VALUE rb_eval_string_protect(const char *str, int *state)
-
-It returns nil when an error occur. Moreover, *state is zero if str was
-successfully evaluated, or nonzero otherwise.
-
-=== ID or Symbol
-
-You can invoke methods directly, without parsing the string. First I
-need to explain about ID. ID is the integer number to represent
-Ruby's identifiers such as variable names. The Ruby data type
-corresponding to ID is Symbol. It can be accessed from Ruby in the
-form:
-
- :Identifier
-
-or
-
- :"any kind of string"
-
-You can get the ID value from a string within C code by using
-
- rb_intern(const char *name)
- rb_intern_str(VALUE name)
-
-You can retrieve ID from Ruby object (Symbol or String) given as an
-argument by using
-
- rb_to_id(VALUE symbol)
- rb_check_id(volatile VALUE *name)
- rb_check_id_cstr(const char *name, long len, rb_encoding *enc)
-
-These functions try to convert the argument to a String if it was not
-a Symbol nor a String. The second function stores the converted
-result into *name, and returns 0 if the string is not a known symbol.
-After this function returned a non-zero value, *name is always a
-Symbol or a String, otherwise it is a String if the result is 0.
-The third function takes NUL-terminated C string, not Ruby VALUE.
-
-You can convert C ID to Ruby Symbol by using
-
- VALUE ID2SYM(ID id)
-
-and to convert Ruby Symbol object to ID, use
-
- ID SYM2ID(VALUE symbol)
-
-=== Invoke Ruby Method from C
-
-To invoke methods directly, you can use the function below
-
- VALUE rb_funcall(VALUE recv, ID mid, int argc, ...)
-
-This function invokes a method on the recv, with the method name
-specified by the symbol mid.
-
-=== Accessing the Variables and Constants
-
-You can access class variables and instance variables using access
-functions. Also, global variables can be shared between both
-environments. There's no way to access Ruby's local variables.
-
-The functions to access/modify instance variables are below:
-
- VALUE rb_ivar_get(VALUE obj, ID id)
- VALUE rb_ivar_set(VALUE obj, ID id, VALUE val)
-
-id must be the symbol, which can be retrieved by rb_intern().
-
-To access the constants of the class/module:
-
- VALUE rb_const_get(VALUE obj, ID id)
-
-See also Constant Definition above.
-
-= Information Sharing Between Ruby and C
-
-=== Ruby Constants That C Can Be Accessed From C
-
-As stated in section 1.3,
-the following Ruby constants can be referred from C.
-
- Qtrue
- Qfalse
-
-Boolean values. Qfalse is false in C also (i.e. 0).
-
- Qnil
-
-Ruby nil in C scope.
-
-== Global Variables Shared Between C and Ruby
-
-Information can be shared between the two environments using shared global
-variables. To define them, you can use functions listed below:
-
- void rb_define_variable(const char *name, VALUE *var)
-
-This function defines the variable which is shared by both environments.
-The value of the global variable pointed to by `var' can be accessed
-through Ruby's global variable named `name'.
-
-You can define read-only (from Ruby, of course) variables using the
-function below.
-
- void rb_define_readonly_variable(const char *name, VALUE *var)
-
-You can defined hooked variables. The accessor functions (getter and
-setter) are called on access to the hooked variables.
-
- void rb_define_hooked_variable(const char *name, VALUE *var,
- VALUE (*getter)(), void (*setter)())
-
-If you need to supply either setter or getter, just supply 0 for the
-hook you don't need. If both hooks are 0, rb_define_hooked_variable()
-works just like rb_define_variable().
-
-The prototypes of the getter and setter functions are as follows:
-
- VALUE (*getter)(ID id, VALUE *var);
- void (*setter)(VALUE val, ID id, VALUE *var);
-
-
-Also you can define a Ruby global variable without a corresponding C
-variable. The value of the variable will be set/get only by hooks.
-
- void rb_define_virtual_variable(const char *name,
- VALUE (*getter)(), void (*setter)())
-
-The prototypes of the getter and setter functions are as follows:
-
- VALUE (*getter)(ID id);
- void (*setter)(VALUE val, ID id);
-
-
-== Encapsulate C Data into a Ruby Object
-
-To wrap and objectify a C pointer as a Ruby object (so called
-DATA), use Data_Wrap_Struct().
-
- Data_Wrap_Struct(klass, mark, free, sval)
-
-Data_Wrap_Struct() returns a created DATA object. The klass argument
-is the class for the DATA object. The mark argument is the function
-to mark Ruby objects pointed by this data. The free argument is the
-function to free the pointer allocation. If this is -1, the pointer
-will be just freed. The functions mark and free will be called from
-garbage collector.
-
-These mark / free functions are invoked during GC execution. No
-object allocations are allowed during it, so do not allocate ruby
-objects inside them.
-
-You can allocate and wrap the structure in one step.
-
- Data_Make_Struct(klass, type, mark, free, sval)
-
-This macro returns an allocated Data object, wrapping the pointer to
-the structure, which is also allocated. This macro works like:
-
- (sval = ALLOC(type), Data_Wrap_Struct(klass, mark, free, sval))
-
-Arguments klass, mark, and free work like their counterparts in
-Data_Wrap_Struct(). A pointer to the allocated structure will be
-assigned to sval, which should be a pointer of the type specified.
-
-To retrieve the C pointer from the Data object, use the macro
-Data_Get_Struct().
-
- Data_Get_Struct(obj, type, sval)
-
-A pointer to the structure will be assigned to the variable sval.
-
-See the example below for details.
-
-= Example - Creating dbm Extension
-
-OK, here's the example of making an extension library. This is the
-extension to access DBMs. The full source is included in the ext/
-directory in the Ruby's source tree.
-
-== Make the Directory
-
- % mkdir ext/dbm
-
-Make a directory for the extension library under ext directory.
-
-== Design the Library
-
-You need to design the library features, before making it.
-
-== Write the C Code
-
-You need to write C code for your extension library. If your library
-has only one source file, choosing ``LIBRARY.c'' as a file name is
-preferred. On the other hand, in case your library has multiple source
-files, avoid choosing ``LIBRARY.c'' for a file name. It may conflict
-with an intermediate file ``LIBRARY.o'' on some platforms.
-Note that some functions in mkmf library described below generate
-a file ``conftest.c'' for checking with compilation. You shouldn't
-choose ``conftest.c'' as a name of a source file.
-
-Ruby will execute the initializing function named ``Init_LIBRARY'' in
-the library. For example, ``Init_dbm()'' will be executed when loading
-the library.
-
-Here's the example of an initializing function.
-
- void
- Init_dbm(void)
- {
- /* define DBM class */
- cDBM = rb_define_class("DBM", rb_cObject);
- /* DBM includes Enumerate module */
- rb_include_module(cDBM, rb_mEnumerable);
-
- /* DBM has class method open(): arguments are received as C array */
- rb_define_singleton_method(cDBM, "open", fdbm_s_open, -1);
-
- /* DBM instance method close(): no args */
- rb_define_method(cDBM, "close", fdbm_close, 0);
- /* DBM instance method []: 1 argument */
- rb_define_method(cDBM, "[]", fdbm_fetch, 1);
-
- /* ... */
-
- /* ID for a instance variable to store DBM data */
- id_dbm = rb_intern("dbm");
- }
-
-The dbm extension wraps the dbm struct in the C environment using
-Data_Make_Struct.
-
- struct dbmdata {
- int di_size;
- DBM *di_dbm;
- };
-
- obj = Data_Make_Struct(klass, struct dbmdata, 0, free_dbm, dbmp);
-
-This code wraps the dbmdata structure into a Ruby object. We avoid
-wrapping DBM* directly, because we want to cache size information.
-
-To retrieve the dbmdata structure from a Ruby object, we define the
-following macro:
-
- #define GetDBM(obj, dbmp) {\
- Data_Get_Struct(obj, struct dbmdata, dbmp);\
- if (dbmp->di_dbm == 0) closed_dbm();\
- }
-
-This sort of complicated macro does the retrieving and close checking for
-the DBM.
-
-There are three kinds of way to receive method arguments. First,
-methods with a fixed number of arguments receive arguments like this:
-
- static VALUE
- fdbm_delete(VALUE obj, VALUE keystr)
- {
- /* ... */
- }
-
-The first argument of the C function is the self, the rest are the
-arguments to the method.
-
-Second, methods with an arbitrary number of arguments receive
-arguments like this:
-
- static VALUE
- fdbm_s_open(int argc, VALUE *argv, VALUE klass)
- {
- /* ... */
- if (rb_scan_args(argc, argv, "11", &file, &vmode) == 1) {
- mode = 0666; /* default value */
- }
- /* ... */
- }
-
-The first argument is the number of method arguments, the second
-argument is the C array of the method arguments, and the third
-argument is the receiver of the method.
-
-You can use the function rb_scan_args() to check and retrieve the
-arguments. The third argument is a string that specifies how to
-capture method arguments and assign them to the following VALUE
-references.
-
-
-The following is an example of a method that takes arguments by Ruby's
-array:
-
- static VALUE
- thread_initialize(VALUE thread, VALUE args)
- {
- /* ... */
- }
-
-The first argument is the receiver, the second one is the Ruby array
-which contains the arguments to the method.
-
-*Notice*: GC should know about global variables which refer to Ruby's objects,
-but are not exported to the Ruby world. You need to protect them by
-
- void rb_global_variable(VALUE *var)
-
-== Prepare extconf.rb
-
-If the file named extconf.rb exists, it will be executed to generate
-Makefile.
-
-extconf.rb is the file for checking compilation conditions etc. You
-need to put
-
- require 'mkmf'
-
-at the top of the file. You can use the functions below to check
-various conditions.
-
- have_macro(macro[, headers[, opt]]): check whether macro is defined
- have_library(lib[, func[, headers[, opt]]]): check whether library containing function exists
- find_library(lib[, func, *paths]): find library from paths
- have_func(func[, headers[, opt]): check whether function exists
- have_var(var[, headers[, opt]]): check whether variable exists
- have_header(header[, preheaders[, opt]]): check whether header file exists
- find_header(header, *paths): find header from paths
- have_framework(fw): check whether framework exists (for MacOS X)
- have_struct_member(type, member[, headers[, opt]]): check whether struct has member
- have_type(type[, headers[, opt]]): check whether type exists
- find_type(type, opt, *headers): check whether type exists in headers
- have_const(const[, headers[, opt]]): check whether constant is defined
- check_sizeof(type[, headers[, opts]]): check size of type
- check_signedness(type[, headers[, opts]]): check signedness of type
- convertible_int(type[, headers[, opts]]): find convertible integer type
- find_executable(bin[, path]): find executable file path
- create_header(header): generate configured header
- create_makefile(target[, target_prefix]): generate Makefile
-
-See MakeMakefile for full documentation of these functions.
-
-The value of the variables below will affect the Makefile.
-
- $CFLAGS: included in CFLAGS make variable (such as -O)
- $CPPFLAGS: included in CPPFLAGS make variable (such as -I, -D)
- $LDFLAGS: included in LDFLAGS make variable (such as -L)
- $objs: list of object file names
-
-Normally, the object files list is automatically generated by searching
-source files, but you must define them explicitly if any sources will
-be generated while building.
-
-If a compilation condition is not fulfilled, you should not call
-``create_makefile''. The Makefile will not be generated, compilation will
-not be done.
-
-== Prepare Depend (Optional)
-
-If the file named depend exists, Makefile will include that file to
-check dependencies. You can make this file by invoking
-
- % gcc -MM *.c > depend
-
-It's harmless. Prepare it.
-
-== Generate Makefile
-
-Try generating the Makefile by:
-
- ruby extconf.rb
-
-If the library should be installed under vendor_ruby directory
-instead of site_ruby directory, use --vendor option as follows.
-
- ruby extconf.rb --vendor
-
-You don't need this step if you put the extension library under the ext
-directory of the ruby source tree. In that case, compilation of the
-interpreter will do this step for you.
-
-== Run make
-
-Type
-
- make
-
-to compile your extension. You don't need this step either if you have
-put the extension library under the ext directory of the ruby source tree.
-
-== Debug
-
-You may need to rb_debug the extension. Extensions can be linked
-statically by adding the directory name in the ext/Setup file so that
-you can inspect the extension with the debugger.
-
-== Done! Now You Have the Extension Library
-
-You can do anything you want with your library. The author of Ruby
-will not claim any restrictions on your code depending on the Ruby API.
-Feel free to use, modify, distribute or sell your program.
-
-= Appendix A. Ruby Source Files Overview
-
-== Ruby Language Core
-
-class.c :: classes and modules
-error.c :: exception classes and exception mechanism
-gc.c :: memory management
-load.c :: library loading
-object.c :: objects
-variable.c :: variables and constants
-
-== Ruby Syntax Parser
-
-parse.y :: grammar definition
-parse.c :: automatically generated from parse.y
-keywords :: reserved keywords
-lex.c :: automatically generated from keywords
-
-== Ruby Evaluator (a.k.a. YARV)
-
- compile.c
- eval.c
- eval_error.c
- eval_jump.c
- eval_safe.c
- insns.def : definition of VM instructions
- iseq.c : implementation of VM::ISeq
- thread.c : thread management and context switching
- thread_win32.c : thread implementation
- thread_pthread.c : ditto
- vm.c
- vm_dump.c
- vm_eval.c
- vm_exec.c
- vm_insnhelper.c
- vm_method.c
-
- opt_insns_unif.def : instruction unification
- opt_operand.def : definitions for optimization
-
- -> insn*.inc : automatically generated
- -> opt*.inc : automatically generated
- -> vm.inc : automatically generated
-
-== Regular Expression Engine (Oniguruma)
-
- regex.c
- regcomp.c
- regenc.c
- regerror.c
- regexec.c
- regparse.c
- regsyntax.c
-
-== Utility Functions
-
-debug.c :: debug symbols for C debugger
-dln.c :: dynamic loading
-st.c :: general purpose hash table
-strftime.c :: formatting times
-util.c :: misc utilities
-
-== Ruby Interpreter Implementation
-
- dmyext.c
- dmydln.c
- dmyencoding.c
- id.c
- inits.c
- main.c
- ruby.c
- version.c
-
- gem_prelude.rb
- prelude.rb
-
-== Class Library
-
-array.c :: Array
-bignum.c :: Bignum
-compar.c :: Comparable
-complex.c :: Complex
-cont.c :: Fiber, Continuation
-dir.c :: Dir
-enum.c :: Enumerable
-enumerator.c :: Enumerator
-file.c :: File
-hash.c :: Hash
-io.c :: IO
-marshal.c :: Marshal
-math.c :: Math
-numeric.c :: Numeric, Integer, Fixnum, Float
-pack.c :: Array#pack, String#unpack
-proc.c :: Binding, Proc
-process.c :: Process
-random.c :: random number
-range.c :: Range
-rational.c :: Rational
-re.c :: Regexp, MatchData
-signal.c :: Signal
-sprintf.c :: String#sprintf
-string.c :: String
-struct.c :: Struct
-time.c :: Time
-
-defs/known_errors.def :: Errno::* exception classes
--> known_errors.inc :: automatically generated
-
-== Multilingualization
-
-encoding.c :: Encoding
-transcode.c :: Encoding::Converter
-enc/*.c :: encoding classes
-enc/trans/* :: codepoint mapping tables
-
-== goruby Interpreter Implementation
-
- goruby.c
- golf_prelude.rb : goruby specific libraries.
- -> golf_prelude.c : automatically generated
-
-
-= Appendix B. Ruby Extension API Reference
-
-== Types
-
-VALUE ::
-
- The type for the Ruby object. Actual structures are defined in ruby.h,
- such as struct RString, etc. To refer the values in structures, use
- casting macros like RSTRING(obj).
-
-== Variables and Constants
-
-Qnil::
- nil object
-
-Qtrue::
- true object (default true value)
-
-Qfalse::
- false object
-
-== C Pointer Wrapping
-
-Data_Wrap_Struct(VALUE klass, void (*mark)(), void (*free)(), void *sval) ::
-
- Wrap a C pointer into a Ruby object. If object has references to other
- Ruby objects, they should be marked by using the mark function during
- the GC process. Otherwise, mark should be 0. When this object is no
- longer referred by anywhere, the pointer will be discarded by free
- function.
-
-Data_Make_Struct(klass, type, mark, free, sval) ::
-
- This macro allocates memory using malloc(), assigns it to the variable
- sval, and returns the DATA encapsulating the pointer to memory region.
-
-Data_Get_Struct(data, type, sval) ::
-
- This macro retrieves the pointer value from DATA, and assigns it to
- the variable sval.
-
-== Checking Data Types
-
-TYPE(value) ::
-
- Internal type (T_NIL, T_FIXNUM, etc.)
-
-FIXNUM_P(value) ::
-
- Is +value+ a Fixnum?
-
-NIL_P(value) ::
-
- Is +value+ nil?
-
-void Check_Type(VALUE value, int type) ::
-
- Ensures +value+ is of the given internal +type+ or raises a TypeError
-
-SaveStringValue(value) ::
-
- Checks that +value+ is a String and is not tainted
-
-== Data Type Conversion
-
-FIX2INT(value), INT2FIX(i) ::
-
- Fixnum <-> integer
-
-FIX2LONG(value), LONG2FIX(l) ::
-
- Fixnum <-> long
-
-NUM2INT(value), INT2NUM(i) ::
-
- Numeric <-> integer
-
-NUM2UINT(value), UINT2NUM(ui) ::
-
- Numeric <-> unsigned integer
-
-NUM2LONG(value), LONG2NUM(l) ::
-
- Numeric <-> long
-
-NUM2ULONG(value), ULONG2NUM(ul) ::
-
- Numeric <-> unsigned long
-
-NUM2LL(value), LL2NUM(ll) ::
-
- Numeric <-> long long
-
-NUM2ULL(value), ULL2NUM(ull) ::
-
- Numeric <-> unsigned long long
-
-NUM2OFFT(value), OFFT2NUM(off) ::
-
- Numeric <-> off_t
-
-NUM2SIZET(value), SIZET2NUM(size) ::
-
- Numeric <-> size_t
-
-NUM2SSIZET(value), SSIZET2NUM(ssize) ::
-
- Numeric <-> ssize_t
-
-rb_integer_pack(value, words, numwords, wordsize, nails, flags), rb_integer_unpack(words, numwords, wordsize, nails, flags) ::
-
- Numeric <-> Arbitrary size integer buffer
-
-NUM2DBL(value) ::
-
- Numeric -> double
-
-rb_float_new(f) ::
-
- double -> Float
-
-StringValue(value) ::
-
- Object with #to_str -> String
-
-StringValuePtr(value) ::
-
- Object with #to_str -> pointer to String data
-
-StringValueCStr(value) ::
-
- Object with #to_str -> pointer to String data without NULL bytes
-
-rb_str_new2(s) ::
-
- char * -> String
-
-== Defining Class and Module
-
-VALUE rb_define_class(const char *name, VALUE super) ::
-
- Defines a new Ruby class as a subclass of super.
-
-VALUE rb_define_class_under(VALUE module, const char *name, VALUE super) ::
-
- Creates a new Ruby class as a subclass of super, under the module's
- namespace.
-
-VALUE rb_define_module(const char *name) ::
-
- Defines a new Ruby module.
-
-VALUE rb_define_module_under(VALUE module, const char *name) ::
-
- Defines a new Ruby module under the module's namespace.
-
-void rb_include_module(VALUE klass, VALUE module) ::
-
- Includes module into class. If class already includes it, just ignored.
-
-void rb_extend_object(VALUE object, VALUE module) ::
-
- Extend the object with the module's attributes.
-
-== Defining Global Variables
-
-void rb_define_variable(const char *name, VALUE *var) ::
-
- Defines a global variable which is shared between C and Ruby. If name
- contains a character which is not allowed to be part of the symbol,
- it can't be seen from Ruby programs.
-
-void rb_define_readonly_variable(const char *name, VALUE *var) ::
-
- Defines a read-only global variable. Works just like
- rb_define_variable(), except the defined variable is read-only.
-
-void rb_define_virtual_variable(const char *name, VALUE (*getter)(), VALUE (*setter)()) ::
-
- Defines a virtual variable, whose behavior is defined by a pair of C
- functions. The getter function is called when the variable is
- referenced. The setter function is called when the variable is set to a
- value. The prototype for getter/setter functions are:
-
- VALUE getter(ID id)
- void setter(VALUE val, ID id)
-
- The getter function must return the value for the access.
-
-void rb_define_hooked_variable(const char *name, VALUE *var, VALUE (*getter)(), VALUE (*setter)()) ::
-
- Defines hooked variable. It's a virtual variable with a C variable.
- The getter is called as
-
- VALUE getter(ID id, VALUE *var)
-
- returning a new value. The setter is called as
-
- void setter(VALUE val, ID id, VALUE *var)
-
- GC requires C global variables which hold Ruby values to be marked.
-
-void rb_global_variable(VALUE *var)
-
- Tells GC to protect these variables.
-
-== Constant Definition
-
-void rb_define_const(VALUE klass, const char *name, VALUE val) ::
-
- Defines a new constant under the class/module.
-
-void rb_define_global_const(const char *name, VALUE val) ::
-
- Defines a global constant. This is just the same as
-
- rb_define_const(cKernal, name, val)
-
-== Method Definition
-
-rb_define_method(VALUE klass, const char *name, VALUE (*func)(), int argc) ::
-
- Defines a method for the class. func is the function pointer. argc
- is the number of arguments. if argc is -1, the function will receive
- 3 arguments: argc, argv, and self. if argc is -2, the function will
- receive 2 arguments, self and args, where args is a Ruby array of
- the method arguments.
-
-rb_define_private_method(VALUE klass, const char *name, VALUE (*func)(), int argc) ::
-
- Defines a private method for the class. Arguments are same as
- rb_define_method().
-
-rb_define_singleton_method(VALUE klass, const char *name, VALUE (*func)(), int argc) ::
-
- Defines a singleton method. Arguments are same as rb_define_method().
-
-rb_scan_args(int argc, VALUE *argv, const char *fmt, ...) ::
-
- Retrieve argument from argc and argv to given VALUE references
- according to the format string. The format can be described in ABNF
- as follows:
-
- scan-arg-spec := param-arg-spec [option-hash-arg-spec] [block-arg-spec]
-
- param-arg-spec := pre-arg-spec [post-arg-spec] / post-arg-spec /
- pre-opt-post-arg-spec
- pre-arg-spec := num-of-leading-mandatory-args [num-of-optional-args]
- post-arg-spec := sym-for-variable-length-args
- [num-of-trailing-mandatory-args]
- pre-opt-post-arg-spec := num-of-leading-mandatory-args num-of-optional-args
- num-of-trailing-mandatory-args
- option-hash-arg-spec := sym-for-option-hash-arg
- block-arg-spec := sym-for-block-arg
-
- num-of-leading-mandatory-args := DIGIT ; The number of leading
- ; mandatory arguments
- num-of-optional-args := DIGIT ; The number of optional
- ; arguments
- sym-for-variable-length-args := "*" ; Indicates that variable
- ; length arguments are
- ; captured as a ruby array
- num-of-trailing-mandatory-args := DIGIT ; The number of trailing
- ; mandatory arguments
- sym-for-option-hash-arg := ":" ; Indicates that an option
- ; hash is captured if the last
- ; argument is a hash or can be
- ; converted to a hash with
- ; #to_hash. When the last
- ; argument is nil, it is
- ; captured if it is not
- ; ambiguous to take it as
- ; empty option hash; i.e. '*'
- ; is not specified and
- ; arguments are given more
- ; than sufficient.
- sym-for-block-arg := "&" ; Indicates that an iterator
- ; block should be captured if
- ; given
-
- For example, "12" means that the method requires at least one
- argument, and at most receives three (1+2) arguments. So, the format
- string must be followed by three variable references, which are to be
- assigned to captured arguments. For omitted arguments, variables are
- set to Qnil. NULL can be put in place of a variable reference, which
- means the corresponding captured argument(s) should be just dropped.
-
- The number of given arguments, excluding an option hash or iterator
- block, is returned.
-
-== Invoking Ruby method
-
-VALUE rb_funcall(VALUE recv, ID mid, int narg, ...) ::
-
- Invokes a method. To retrieve mid from a method name, use rb_intern().
- Able to call even private/protected methods.
-
-VALUE rb_funcall2(VALUE recv, ID mid, int argc, VALUE *argv) ::
-VALUE rb_funcallv(VALUE recv, ID mid, int argc, VALUE *argv) ::
-
- Invokes a method, passing arguments as an array of values.
- Able to call even private/protected methods.
-
-VALUE rb_funcallv_public(VALUE recv, ID mid, int argc, VALUE *argv) ::
-
- Invokes a method, passing arguments as an array of values.
- Able to call only public methods.
-
-VALUE rb_eval_string(const char *str) ::
-
- Compiles and executes the string as a Ruby program.
-
-ID rb_intern(const char *name) ::
-
- Returns ID corresponding to the name.
-
-char *rb_id2name(ID id) ::
-
- Returns the name corresponding ID.
-
-char *rb_class2name(VALUE klass) ::
-
- Returns the name of the class.
-
-int rb_respond_to(VALUE object, ID id) ::
-
- Returns true if the object responds to the message specified by id.
-
-== Instance Variables
-
-VALUE rb_iv_get(VALUE obj, const char *name) ::
-
- Retrieve the value of the instance variable. If the name is not
- prefixed by `@', that variable shall be inaccessible from Ruby.
-
-VALUE rb_iv_set(VALUE obj, const char *name, VALUE val) ::
-
- Sets the value of the instance variable.
-
-== Control Structure
-
-VALUE rb_block_call(VALUE recv, ID mid, int argc, VALUE * argv, VALUE (*func) (ANYARGS), VALUE data2) ::
-
- Calls a method on the recv, with the method name specified by the
- symbol mid, with argc arguments in argv, supplying func as the
- block. When func is called as the block, it will receive the value
- from yield as the first argument, and data2 as the second argument.
- When yielded with multiple values (in C, rb_yield_values(),
- rb_yield_values2() and rb_yield_splat()), data2 is packed as an Array,
- whereas yielded values can be gotten via argc/argv of the third/fourth
- arguments.
-
-[OBSOLETE] VALUE rb_iterate(VALUE (*func1)(), void *arg1, VALUE (*func2)(), void *arg2) ::
-
- Calls the function func1, supplying func2 as the block. func1 will be
- called with the argument arg1. func2 receives the value from yield as
- the first argument, arg2 as the second argument.
-
- When rb_iterate is used in 1.9, func1 has to call some Ruby-level method.
- This function is obsolete since 1.9; use rb_block_call instead.
-
-VALUE rb_yield(VALUE val) ::
-
- Evaluates the block with value val.
-
-VALUE rb_rescue(VALUE (*func1)(), VALUE arg1, VALUE (*func2)(), VALUE arg2) ::
-
- Calls the function func1, with arg1 as the argument. If an exception
- occurs during func1, it calls func2 with arg2 as the argument. The
- return value of rb_rescue() is the return value from func1 if no
- exception occurs, from func2 otherwise.
-
-VALUE rb_ensure(VALUE (*func1)(), VALUE arg1, VALUE (*func2)(), VALUE arg2) ::
-
- Calls the function func1 with arg1 as the argument, then calls func2
- with arg2 if execution terminated. The return value from
- rb_ensure() is that of func1 when no exception occurred.
-
-VALUE rb_protect(VALUE (*func) (VALUE), VALUE arg, int *state) ::
-
- Calls the function func with arg as the argument. If no exception
- occurred during func, it returns the result of func and *state is zero.
- Otherwise, it returns Qnil and sets *state to nonzero. If state is
- NULL, it is not set in both cases.
- You have to clear the error info with rb_set_errinfo(Qnil) when
- ignoring the caught exception.
-
-void rb_jump_tag(int state) ::
-
- Continues the exception caught by rb_protect() and rb_eval_string_protect().
- state must be the returned value from those functions. This function
- never return to the caller.
-
-void rb_iter_break() ::
-
- Exits from the current innermost block. This function never return to
- the caller.
-
-void rb_iter_break_value(VALUE value) ::
-
- Exits from the current innermost block with the value. The block will
- return the given argument value. This function never return to the
- caller.
-
-== Exceptions and Errors
-
-void rb_warn(const char *fmt, ...) ::
-
- Prints a warning message according to a printf-like format.
-
-void rb_warning(const char *fmt, ...) ::
-
- Prints a warning message according to a printf-like format, if
- $VERBOSE is true.
-
-void rb_raise(rb_eRuntimeError, const char *fmt, ...) ::
-
- Raises RuntimeError. The fmt is a format string just like printf().
-
-void rb_raise(VALUE exception, const char *fmt, ...) ::
-
- Raises a class exception. The fmt is a format string just like printf().
-
-void rb_fatal(const char *fmt, ...) ::
-
- Raises a fatal error, terminates the interpreter. No exception handling
- will be done for fatal errors, but ensure blocks will be executed.
-
-void rb_bug(const char *fmt, ...) ::
-
- Terminates the interpreter immediately. This function should be
- called under the situation caused by the bug in the interpreter. No
- exception handling nor ensure execution will be done.
-
-Note: In the format string, %i is used for Object#to_s (or Object#inspect if
-'+' flag is set) output (and related argument must be a VALUE). For integers
-in format strings, use %d.
-
-== Initialize and Start the Interpreter
-
-The embedding API functions are below (not needed for extension libraries):
-
-void ruby_init() ::
-
- Initializes the interpreter.
-
-void ruby_options(int argc, char **argv) ::
-
- Process command line arguments for the interpreter.
-
-void ruby_run() ::
-
- Starts execution of the interpreter.
-
-void ruby_script(char *name) ::
-
- Specifies the name of the script ($0).
-
-== Hooks for the Interpreter Events
-
- void rb_add_event_hook(rb_event_hook_func_t func, rb_event_flag_t events,
- VALUE data)
-
-Adds a hook function for the specified interpreter events.
-events should be OR'ed value of:
-
- RUBY_EVENT_LINE
- RUBY_EVENT_CLASS
- RUBY_EVENT_END
- RUBY_EVENT_CALL
- RUBY_EVENT_RETURN
- RUBY_EVENT_C_CALL
- RUBY_EVENT_C_RETURN
- RUBY_EVENT_RAISE
- RUBY_EVENT_ALL
-
-The definition of rb_event_hook_func_t is below:
-
- typedef void (*rb_event_hook_func_t)(rb_event_t event, VALUE data,
- VALUE self, ID id, VALUE klass)
-
-The third argument `data' to rb_add_event_hook() is passed to the hook
-function as the second argument, which was the pointer to the current
-NODE in 1.8. See RB_EVENT_HOOKS_HAVE_CALLBACK_DATA below.
-
- int rb_remove_event_hook(rb_event_hook_func_t func)
-
-Removes the specified hook function.
-
-== Macros for Compatibility
-
-Some macros to check API compatibilities are available by default.
-
-NORETURN_STYLE_NEW ::
-
- Means that NORETURN macro is functional style instead of prefix.
-
-HAVE_RB_DEFINE_ALLOC_FUNC ::
-
- Means that function rb_define_alloc_func() is provided, that means the
- allocation framework is used. This is same as the result of
- have_func("rb_define_alloc_func", "ruby.h").
-
-HAVE_RB_REG_NEW_STR ::
-
- Means that function rb_reg_new_str() is provided, that creates Regexp
- object from String object. This is same as the result of
- have_func("rb_reg_new_str", "ruby.h").
-
-HAVE_RB_IO_T ::
-
- Means that type rb_io_t is provided.
-
-USE_SYMBOL_AS_METHOD_NAME ::
-
- Means that Symbols will be returned as method names, e.g.,
- Module#methods, #singleton_methods and so on.
-
-HAVE_RUBY_*_H ::
-
- Defined in ruby.h and means corresponding header is available. For
- instance, when HAVE_RUBY_ST_H is defined you should use ruby/st.h not
- mere st.h.
-
-RB_EVENT_HOOKS_HAVE_CALLBACK_DATA ::
-
- Means that rb_add_event_hook() takes the third argument `data', to be
- passed to the given event hook function.
-
-= Appendix C. Functions available for use in extconf.rb
-
-See documentation for {mkmf}[rdoc-ref:MakeMakefile].
-
-= Appendix D. Generational GC
-
-Ruby 2.1 introduced a generational garbage collector (called RGenGC).
-RGenGC (mostly) keeps compatibility.
-
-Generally, the use of the technique called write barriers is required in
-extension libraries for generational GC
-(http://en.wikipedia.org/wiki/Garbage_collection_%28computer_science%29).
-RGenGC works fine without write barriers in extension libraries.
-
-If your library adheres to the following tips, performance can
-be further improved. Especially, the "Don't touch pointers directly" section is
-important.
-
-== Incompatibility
-
-You can't write RBASIC(obj)->klass field directly because it is const
-value now.
-
-Basically you should not write this field because MRI expects it to be
-an immutable field, but if you want to do it in your extension you can
-use the following functions:
-
-VALUE rb_obj_hide(VALUE obj) ::
-
- Clear RBasic::klass field. The object will be an internal object.
- ObjectSpace::each_object can't find this object.
-
-VALUE rb_obj_reveal(VALUE obj, VALUE klass) ::
-
- Reset RBasic::klass to be klass.
- We expect the `klass' is hidden class by rb_obj_hide().
-
-== Write barriers
-
-RGenGC doesn't require write barriers to support generational GC.
-However, caring about write barrier can improve the performance of
-RGenGC. Please check the following tips.
-
-=== Don't touch pointers directly
-
-In MRI (include/ruby/ruby.h), some macros to acquire pointers to the
-internal data structures are supported such as RARRAY_PTR(),
-RSTRUCT_PTR() and so on.
-
-DO NOT USE THESE MACROS and instead use the corresponding C-APIs such as
-rb_ary_aref(), rb_ary_store() and so on.
-
-=== Consider whether to insert write barriers
-
-You don't need to care about write barriers if you only use built-in
-types.
-
-If you support T_DATA objects, you may consider using write barriers.
-
-Inserting write barriers into T_DATA objects only works with the
-following type objects: (a) long-lived objects, (b) when a huge number
-of objects are generated and (c) container-type objects that have
-references to other objects. If your extension provides such a type of
-T_DATA objects, consider inserting write barriers.
-
-(a): short-lived objects don't become old generation objects.
-(b): only a few oldgen objects don't have performance impact.
-(c): only a few references don't have performance impact.
-
-Inserting write barriers is a very difficult hack, it is easy to
-introduce critical bugs. And inserting write barriers has several areas
-of overhead. Basically we don't recommend you insert write barriers.
-Please carefully consider the risks.
-
-=== Combine with built-in types
-
-Please consider utilizing built-in types. Most built-in types support
-write barrier, so you can use them to avoid manually inserting write
-barriers.
-
-For example, if your T_DATA has references to other objects, then you
-can move these references to Array. A T_DATA object only has a reference
-to an array object. Or you can also use a Struct object to gather a
-T_DATA object (without any references) and an that Array contains
-references.
-
-With use of such techniques, you don't need to insert write barriers
-anymore.
-
-=== Insert write barriers
-
-[AGAIN] Inserting write barriers is a very difficult hack, and it is
-easy to introduce critical bugs. And inserting write barriers has
-several areas of overhead. Basically we don't recommend you insert write
-barriers. Please carefully consider the risks.
-
-Before inserting write barriers, you need to know about RGenGC algorithm
-(gc.c will help you). Macros and functions to insert write barriers are
-available in in include/ruby/ruby.h. An example is available in iseq.c.
-
-For a complete guide for RGenGC and write barriers, please refer to
-<https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/RGenGC>.
-
-/*
- * Local variables:
- * fill-column: 70
- * end:
- */
+Moved to doc/extension.rdoc
diff --git a/README.EXT.ja b/README.EXT.ja
index b4b59008e0..f884ecbb0e 100644
--- a/README.EXT.ja
+++ b/README.EXT.ja
@@ -1,1650 +1 @@
-# README.EXT.ja - -*- RDoc -*- created at: Mon Aug 7 16:45:54 JST 1995
-
-Rubyの拡張ライブラリの作り方を説明します.
-
-= 基礎知識
-
-Cの変数には型があり,データには型がありません.ですから,た
-とえばポインタをintの変数に代入すると,その値は整数として取
-り扱われます.逆にRubyの変数には型がなく,データに型がありま
-す.この違いのため,CとRubyは相互に変換しなければ,お互いの
-データをアクセスできません.
-
-RubyのデータはVALUEというCの型で表現されます.VALUE型のデー
-タはそのデータタイプを自分で知っています.このデータタイプと
-いうのはデータ(オブジェクト)の実際の構造を意味していて,Ruby
-のクラスとはまた違ったものです.
-
-VALUEからCにとって意味のあるデータを取り出すためには
-
-1. VALUEのデータタイプを知る
-2. VALUEをCのデータに変換する
-
-の両方が必要です.(1)を忘れると間違ったデータの変換が行われ
-て,最悪プログラムがcore dumpします.
-
-== データタイプ
-
-Rubyにはユーザが使う可能性のある以下のタイプがあります.
-
-T_NIL :: nil
-T_OBJECT :: 通常のオブジェクト
-T_CLASS :: クラス
-T_MODULE :: モジュール
-T_FLOAT :: 浮動小数点数
-T_STRING :: 文字列
-T_REGEXP :: 正規表現
-T_ARRAY :: 配列
-T_HASH :: 連想配列
-T_STRUCT :: (Rubyの)構造体
-T_BIGNUM :: 多倍長整数
-T_FIXNUM :: Fixnum(31bitまたは63bit長整数)
-T_COMPLEX :: 複素数
-T_RATIONAL :: 有理数
-T_FILE :: 入出力
-T_TRUE :: 真
-T_FALSE :: 偽
-T_DATA :: データ
-T_SYMBOL :: シンボル
-
-その他に内部で利用されている以下のタイプがあります.
-
- T_ICLASS
- T_MATCH
- T_UNDEF
- T_NODE
- T_ZOMBIE
-
-ほとんどのタイプはCの構造体で実装されています.
-
-== VALUEのデータタイプをチェックする
-
-ruby.hではTYPE()というマクロが定義されていて,VALUEのデータ
-タイプを知ることが出来ます.TYPE()マクロは上で紹介したT_XXXX
-の形式の定数を返します.VALUEのデータタイプに応じて処理する
-場合には,TYPE()の値で分岐することになります.
-
- switch (TYPE(obj)) {
- case T_FIXNUM:
- /* FIXNUMの処理 */
- break;
- case T_STRING:
- /* 文字列の処理 */
- break;
- case T_ARRAY:
- /* 配列の処理 */
- break;
- default:
- /* 例外を発生させる */
- rb_raise(rb_eTypeError, "not valid value");
- break;
- }
-
-それとデータタイプをチェックして,正しくなければ例外を発生す
-る関数が用意されています.
-
- void Check_Type(VALUE value, int type)
-
-この関数はvalueがtypeで無ければ,例外を発生させます.引数と
-して与えられたVALUEのデータタイプが正しいかどうかチェックす
-るためには,この関数を使います.
-
-FIXNUMとNILに関してはより高速な判別マクロが用意されています.
-
- FIXNUM_P(obj)
- NIL_P(obj)
-
-== VALUEをCのデータに変換する
-
-データタイプがT_NIL,T_FALSE,T_TRUEである時,データはそれぞ
-れnil,false,trueです.このデータタイプのオブジェクトはひと
-つずつしか存在しません.
-
-データタイプがT_FIXNUMの時,これは31bitまたは63bitのサイズを
-持つ整数です.longのサイズが32bitのプラットフォームであれば
-31bitに,longのサイズが64bitのプラットフォームであれば63bit
-になります. FIXNUM を C の整数に変換するためにはマクロ
-「FIX2INT()」または「FIX2LONG()」を使います.これらのマクロ
-を使用する際には事前にデータタイプがFIXNUMであることを確認す
-る必要がありますが,比較的高速に変換を行うことができます.ま
-た,「FIX2LONG()」は例外を発生しませんが,「FIX2INT()」は変
-換結果がintのサイズに収まらない場合には例外を発生します.
-それから,FIXNUMに限らずRubyのデータを整数に変換する
-「NUM2INT()」および「NUM2LONG()」というマクロがあります.こ
-れらのマクロはマクロはデータタイプのチェック無しで使えます
-(整数に変換できない場合には例外が発生する).同様にチェック無
-で使える変換マクロはdoubleを取り出す「NUM2DBL()」があります.
-
-char* を取り出す場合, StringValue() と StringValuePtr()
-を使います.
-StringValue(var) は var が String
-であれば何もせず,そうでなければ var を var.to_str() の結果
-に置き換えるマクロ,StringValuePtr(var) は同様に var を
-String に置き換えてから var のバイト列表現に対する char* を
-返すマクロです.var の内容を直接置き換える処理が入るので,
-var は lvalue である必要があります.
-また,StringValuePtr() に類似した StringValueCStr() というマ
-クロもあります.StringValueCStr(var) は var を String に置き
-換えてから var の文字列表現に対する char* を返します.返され
-る文字列の末尾には nul 文字が付加されます.なお,途中に nul
-文字が含まれる場合は ArgumentError が発生します.
-一方,StringValuePtr() では,末尾に nul 文字がある保証はなく,
-途中に nul 文字が含まれている可能性もあります.
-
-それ以外のデータタイプは対応するCの構造体があります.対応す
-る構造体のあるVALUEはそのままキャスト(型変換)すれば構造体の
-ポインタに変換できます.
-
-構造体は「struct RXxxxx」という名前でruby.hで定義されていま
-す.例えば文字列は「struct RString」です.実際に使う可能性が
-あるのは文字列と配列くらいだと思います.
-
-ruby.hでは構造体へキャストするマクロも「RXXXXX()」(全部大文
-字にしたもの)という名前で提供されています(例: RSTRING()).た
-だし、構造体への直接のアクセスはできるだけ避け,対応する
-rb_xxxx() といった関数を使うようにして下さい.例えば,配列の
-要素へアクセスする場合は,rb_ary_entry(ary, offset),
-rb_ary_store(ary, offset, obj) を利用するようにして下さい.
-
-構造体からデータを取り出すマクロが提供されています.文字列
-strの長さを得るためには「RSTRING_LEN(str)」とし,文字列strを
-char*として得るためには「RSTRING_PTR(str)」とします.
-
-Rubyの構造体を直接アクセスする時に気をつけなければならないこ
-とは,配列や文字列の構造体の中身は参照するだけで,直接変更し
-ないことです.直接変更した場合,オブジェクトの内容の整合性が
-とれなくなって,思わぬバグの原因になります.
-
-== CのデータをVALUEに変換する
-
-VALUEの実際の構造は
-
-FIXNUMの場合 ::
-
- 1bit左シフトして,LSBを立てる.
-
-その他のポインタの場合 ::
-
- そのままVALUEにキャストする.
-
-となっています.よって,LSBをチェックすればVALUEがFIXNUMかど
-うかわかるわけです(ポインタのLSBが立っていないことを仮定して
-いる).
-
-ですから,FIXNUM以外のRubyのオブジェクトの構造体は単にVALUE
-にキャストするだけでVALUEに変換出来ます.ただし,任意の構造
-体がVALUEにキャスト出来るわけではありません.キャストするの
-はRubyの知っている構造体(ruby.hで定義されているstruct RXxxx
-のもの)だけです.
-
-FIXNUMに関しては変換マクロを経由する必要があります.Cの整数
-からVALUEに変換するマクロは以下のものがあります.必要に応じ
-て使い分けてください.
-
-INT2FIX() :: もとの整数が31bitまたは63bit以内に収まる自信
- がある時
-INT2NUM() :: 任意の整数からVALUEへ
-
-INT2NUM()は整数がFIXNUMの範囲に収まらない場合,Bignumに変換
-してくれます(が,少し遅い).
-
-== Rubyのデータを操作する
-
-先程も述べた通り,Rubyの構造体をアクセスする時に内容の更新を
-行うことは勧められません.で,Rubyのデータを操作する時には
-Rubyが用意している関数を用いてください.
-
-ここではもっとも使われるであろう文字列と配列の生成/操作を行
-う関数をあげます(全部ではないです).
-
-=== 文字列に対する関数
-
-rb_str_new(const char *ptr, long len) ::
-
- 新しいRubyの文字列を生成する.
-
-rb_str_new2(const char *ptr)
-rb_str_new_cstr(const char *ptr)
-
- Cの文字列からRubyの文字列を生成する.この関数の機能は
- rb_str_new(ptr, strlen(ptr))と同等である.
-
-rb_tainted_str_new(const char *ptr, long len)
-
- 汚染マークが付加された新しいRubyの文字列を生成する.外部
- からのデータに基づく文字列には汚染マークが付加されるべき
- である.
-
-rb_tainted_str_new2(const char *ptr)
-rb_tainted_str_new_cstr(const char *ptr)
-
- Cの文字列から汚染マークが付加されたRubyの文字列を生成する.
-
-rb_sprintf(const char *format, ...)
-rb_vsprintf(const char *format, va_list ap)
-
- Cの文字列formatと続く引数をprintf(3)のフォーマットにしたがって
- 整形し,Rubyの文字列を生成する.
-
- 注意: %iはObject#to_s('+'フラグが指定されているときはObject#inspect)を
- 使ったVALUEの出力に使用されているため,整数には%dを使用すること.
-
-rb_str_cat(VALUE str, const char *ptr, long len)
-
- Rubyの文字列strにlenバイトの文字列ptrを追加する.
-
-rb_str_cat2(VALUE str, const char* ptr)
-
- Rubyの文字列strにCの文字列ptrを追加する.この関数の機能は
- rb_str_cat(str, ptr, strlen(ptr))と同等である.
-
-rb_str_catf(VALUE str, const char* format, ...)
-rb_str_vcatf(VALUE str, const char* format, va_list ap)
-
- Cの文字列formatと続く引数をprintf(3)のフォーマットにしたがって
- 整形し,Rubyの文字列strに追加する.この関数の機能は,それぞれ
- rb_str_cat2(str, rb_sprintf(format, ...)) や
- rb_str_cat2(str, rb_vsprintf(format, ap)) と同等である.
-
-rb_enc_str_new(const char *ptr, long len, rb_encoding *enc)
-rb_enc_str_new_cstr(const char *ptr, rb_encoding *enc)
-
- 指定されたエンコーディングでRubyの文字列を生成する.
-
-rb_usascii_str_new(const char *ptr, long len)
-rb_usascii_str_new_cstr(const char *ptr)
-
- エンコーディングがUS-ASCIIのRubyの文字列を生成する.
-
-rb_str_resize(VALUE str, long len)
-
- Rubyの文字列のサイズをlenバイトに変更する.strの長さは前
- 以てセットされていなければならない.lenが元の長さよりも短
- い時は,lenバイトを越えた部分の内容は捨てられる.lenが元
- の長さよりも長い時は,元の長さを越えた部分の内容は保存さ
- れないでゴミになるだろう.この関数の呼び出しによって
- RSTRING_PTR(str)が変更されるかもしれないことに注意.
-
-rb_str_set_len(VALUE str, long len)
-
- Rubyの文字列のサイズをlenバイトにセットする.strが変更可
- 能でなければ例外が発生する.RSTRING_LEN(str)とは無関係に,
- lenバイトまでの内容は保存される.lenはstrの容量を越えてい
- てはならない.
-
-
-== 配列に対する関数
-
-rb_ary_new()
-
- 要素が0の配列を生成する.
-
-rb_ary_new2(long len)
-rb_ary_new_capa(long len)
-
- 要素が0の配列を生成する.len要素分の領域をあらかじめ割り
- 当てておく.
-
-rb_ary_new3(long n, ...)
-rb_ary_new_from_args(long n, ...)
-
- 引数で指定したn要素を含む配列を生成する.
-
-rb_ary_new4(long n, VALUE *elts)
-rb_ary_new_from_values(long n, VALUE *elts)
-
- 配列で与えたn要素の配列を生成する.
-
-rb_ary_to_ary(VALUE obj)
-
- オブジェクトを配列に変換する.
- Object#to_aryと同等である.
-
-他にも配列を操作する関数が多数ある. これらは
-引数aryに配列を渡さなければならない. さもないと
-コアを吐く.
-
-rb_ary_aref(argc, VALUE *argv, VALUE ary)
-
- Array#[]と同等.
-
-rb_ary_entry(VALUE ary, long offset)
-
- ary[offset]
-
-rb_ary_store(VALUE ary, long offset, VALUE obj) ::
-
- ary[offset] = obj
-
-rb_ary_subseq(VALUE ary, long beg, long len)
-
- ary[beg, len]
-
-rb_ary_push(VALUE ary, VALUE val)
-rb_ary_pop(VALUE ary)
-rb_ary_shift(VALUE ary)
-rb_ary_unshift(VALUE ary, VALUE val)
-
-rb_ary_cat(VALUE ary, const VALUE *ptr, long len)
-
- 配列aryにptrからlen個のオブジェクトを追加する.
-
-= Rubyの機能を使う
-
-原理的にRubyで書けることはCでも書けます.RubyそのものがCで記
-述されているんですから,当然といえば当然なんですけど.ここで
-はRubyの拡張に使うことが多いだろうと予測される機能を中心に紹
-介します.
-
-== Rubyに機能を追加する
-
-Rubyで提供されている関数を使えばRubyインタプリタに新しい機能
-を追加することができます.Rubyでは以下の機能を追加する関数が
-提供されています.
-
-* クラス,モジュール
-* メソッド,特異メソッドなど
-* 定数
-
-では順に紹介します.
-
-=== クラス/モジュール定義
-
-クラスやモジュールを定義するためには,以下の関数を使います.
-
- VALUE rb_define_class(const char *name, VALUE super)
- VALUE rb_define_module(const char *name)
-
-これらの関数は新しく定義されたクラスやモジュールを返します.
-メソッドや定数の定義にこれらの値が必要なので,ほとんどの場合
-は戻り値を変数に格納しておく必要があるでしょう.
-
-クラスやモジュールを他のクラスの内部にネストして定義する時に
-は以下の関数を使います.
-
- VALUE rb_define_class_under(VALUE outer, const char *name, VALUE super)
- VALUE rb_define_module_under(VALUE outer, const char *name)
-
-=== メソッド/特異メソッド定義
-
-メソッドや特異メソッドを定義するには以下の関数を使います.
-
- void rb_define_method(VALUE klass, const char *name,
- VALUE (*func)(), int argc)
-
- void rb_define_singleton_method(VALUE object, const char *name,
- VALUE (*func)(), int argc)
-
-
-念のため説明すると「特異メソッド」とは,その特定のオブジェク
-トに対してだけ有効なメソッドです.RubyではよくSmalltalkにお
-けるクラスメソッドとして,クラスに対する特異メソッドが使われ
-ます.
-
-これらの関数の argcという引数はCの関数へ渡される引数の数(と
-形式)を決めます.argcが0以上の時は関数に引き渡す引数の数を意
-味します.16個以上の引数は使えません(が,要りませんよね,そ
-んなに).実際の関数には先頭の引数としてselfが与えられますの
-で,指定した数より1多い引数を持つことになります.
-
-argcが負の時は引数の数ではなく,形式を指定したことになります.
-argcが-1の時は引数を配列に入れて渡されます.argcが-2の時は引
-数はRubyの配列として渡されます.
-
-メソッドを定義する関数はまだいくつかあります. ひとつはメソッド
-名としてIDを取ります. IDについては2.2.2を参照.
-
- void rb_define_method_id(VALUE klass, ID name,
- VALUE (*func)(ANYARGS), int argc)
-
-private/protectedなメソッドを定義するふたつの関数があります.
-
- void rb_define_private_method(VALUE klass, const char *name,
- VALUE (*func)(), int argc)
- void rb_define_protected_method(VALUE klass, const char *name,
- VALUE (*func)(), int argc)
-
-privateメソッドとは関数形式でしか呼び出すことの出来ないメソッ
-ドです.
-
-最後に, rb_define_module関数はモジュール関数を定義します.
-モジュール関数とはモジュールの特異メソッドであり,同時に
-privateメソッドでもあるものです.例をあげるとMathモジュール
-のsqrt()などがあげられます.このメソッドは
-
- Math.sqrt(4)
-
-という形式でも
-
- include Math
- sqrt(4)
-
-という形式でも使えます.モジュール関数を定義する関数は以下の
-通りです.
-
- void rb_define_module_function(VALUE module, const char *name,
- VALUE (*func)(), int argc)
-
-関数的メソッド(Kernelモジュールのprivate method)を定義するた
-めの関数は以下の通りです.
-
- void rb_define_global_function(const char *name, VALUE (*func)(), int argc)
-
-
-メソッドの別名を定義するための関数は以下の通りです.
-
- void rb_define_alias(VALUE module, const char* new, const char* old);
-
-属性の取得・設定メソッドを定義するには
-
- void rb_define_attr(VALUE klass, const char *name, int read, int write)
-
-クラスメソッドallocateを定義したり削除したりするための関数は
-以下の通りです.
-
- void rb_define_alloc_func(VALUE klass, VALUE (*func)(VALUE klass));
- void rb_undef_alloc_func(VALUE klass);
-
-funcはクラスを引数として受け取って,新しく割り当てられたイン
-スタンスを返さなくてはなりません.このインスタンスは,外部リ
-ソースなどを含まない,できるだけ「空」のままにしておいたほう
-がよいでしょう.
-
-=== 定数定義
-
-拡張ライブラリが必要な定数はあらかじめ定義しておいた方が良い
-でしょう.定数を定義する関数は二つあります.
-
- void rb_define_const(VALUE klass, const char *name, VALUE val)
- void rb_define_global_const(const char *name, VALUE val)
-
-前者は特定のクラス/モジュールに属する定数を定義するもの,後
-者はグローバルな定数を定義するものです.
-
-== Rubyの機能をCから呼び出す
-
-既に『1.5 Rubyのデータを操作する』で一部紹介したような関数を
-使えば,Rubyの機能を実現している関数を直接呼び出すことが出来
-ます.
-
-# このような関数の一覧表はいまのところありません.ソースを見
-# るしかないですね.
-
-それ以外にもRubyの機能を呼び出す方法はいくつかあります.
-
-=== Rubyのプログラムをevalする
-
-CからRubyの機能を呼び出すもっとも簡単な方法として,文字列で
-与えられたRubyのプログラムを評価する以下の関数があります.
-
- VALUE rb_eval_string(const char *str)
-
-この評価は現在の環境で行われます.つまり,現在のローカル変数
-などを受け継ぎます.
-
-評価は例外を発生するかもしれないことに注意しましょう. より安全
-な関数もあります.
-
- VALUE rb_eval_string_protect(const char *str, int *state)
-
-この関数はエラーが発生するとnilを返します.そして,成功時には
-*stateはゼロに,さもなくば非ゼロになります.
-
-=== IDまたはシンボル
-
-Cから文字列を経由せずにRubyのメソッドを呼び出すこともできま
-す.その前に,Rubyインタプリタ内でメソッドや変数名を指定する
-時に使われているIDについて説明しておきましょう.
-
-IDとは変数名,メソッド名を表す整数です.Rubyの中では
-
- :識別子
-
-または
-
- :"任意の文字列"
-
-でアクセスできます.Cからこの整数を得るためには関数
-
- rb_intern(const char *name)
- rb_intern_str(VALUE name)
-
-を使います.Rubyから引数として与えられたシンボル(または文字
-列)をIDに変換するには以下の関数を使います.
-
- rb_to_id(VALUE symbol)
- rb_check_id(volatile VALUE *name)
- rb_check_id_cstr(const char *name, long len, rb_encoding *enc)
-
-もし引数がシンボルでも文字列でもなければ、to_strメソッドで文
-字列に変換しようとします.第二の関数はその変換結果を*nameに保
-存し,その名前が既知のシンボルでない場合は0を返します.この関
-数が0以外を返した場合は*nameは常にシンボルか文字列であり、0を
-返した場合は常に文字列です.第三の関数はRubyの文字列ではなく
-NUL終端されたCの文字列を使います.
-
-=== CからRubyのメソッドを呼び出す
-
-Cから文字列を経由せずにRubyのメソッドを呼び出すためには以下
-の関数を使います.
-
- VALUE rb_funcall(VALUE recv, ID mid, int argc, ...)
-
-この関数はオブジェクトrecvのmidで指定されるメソッドを呼び出
-します.その他に引数の指定の仕方が違う以下の関数もあります.
-
- VALUE rb_funcall2(VALUE recv, ID mid, int argc, VALUE *argv)
- VALUE rb_funcallv(VALUE recv, ID mid, int argc, VALUE *argv)
- VALUE rb_apply(VALUE recv, ID mid, VALUE args)
-
-applyには引数としてRubyの配列を与えます.
-
-=== 変数/定数を参照/更新する
-
-Cから関数を使って参照・更新できるのは,定数,インスタンス変
-数です.大域変数は一部のものはCの大域変数としてアクセスでき
-ます.ローカル変数を参照する方法は公開していません.
-
-オブジェクトのインスタンス変数を参照・更新する関数は以下の通
-りです.
-
- VALUE rb_ivar_get(VALUE obj, ID id)
- VALUE rb_ivar_set(VALUE obj, ID id, VALUE val)
-
-idはrb_intern()で得られるものを使ってください.
-
-定数を参照するには以下の関数を使ってください.
-
- VALUE rb_const_get(VALUE obj, ID id)
-
-定数を新しく定義するためには『2.1.3 定数定義』で紹介さ
-れている関数を使ってください.
-
-= RubyとCとの情報共有
-
-C言語とRubyの間で情報を共有する方法について解説します.
-
-== Cから参照できるRubyの定数
-
-以下のRubyの定数はCのレベルから参照できます.
-
- Qtrue
- Qfalse
-
-真偽値.QfalseはC言語でも偽とみなされます(つまり0).
-
- Qnil
-
-C言語から見た「nil」.
-
-== CとRubyで共有される大域変数
-
-CとRubyで大域変数を使って情報を共有できます.共有できる大域
-変数にはいくつかの種類があります.そのなかでもっとも良く使わ
-れると思われるのはrb_define_variable()です.
-
- void rb_define_variable(const char *name, VALUE *var)
-
-この関数はRubyとCとで共有する大域変数を定義します.変数名が
-`$'で始まらない時には自動的に追加されます.この変数の値を変
-更すると自動的にRubyの対応する変数の値も変わります.
-
-またRuby側からは更新できない変数もあります.このread onlyの
-変数は以下の関数で定義します.
-
- void rb_define_readonly_variable(const char *name, VALUE *var)
-
-これら変数の他にhookをつけた大域変数を定義できます.hook付き
-の大域変数は以下の関数を用いて定義します.hook付き大域変数の
-値の参照や設定はhookで行う必要があります.
-
- void rb_define_hooked_variable(const char *name, VALUE *var,
- VALUE (*getter)(), void (*setter)())
-
-この関数はCの関数によってhookのつけられた大域変数を定義しま
-す.変数が参照された時には関数getterが,変数に値がセットされ
-た時には関数setterが呼ばれる.hookを指定しない場合はgetterや
-setterに0を指定します.
-# getterもsetterも0ならばrb_define_variable()と同じになる.
-
-getterとsetterの仕様は次の通りです.
-
- VALUE (*getter)(ID id, VALUE *var);
- void (*setter)(VALUE val, ID id, VALUE *var);
-
-
-それから,対応するCの変数を持たないRubyの大域変数を定義する
-こともできます. その変数の値はフック関数のみによって取得・設定
-されます.
-
- void rb_define_virtual_variable(const char *name,
- VALUE (*getter)(), void (*setter)())
-
-この関数によって定義されたRubyの大域変数が参照された時には
-getterが,変数に値がセットされた時にはsetterが呼ばれます.
-
-getterとsetterの仕様は以下の通りです.
-
- (*getter)(ID id);
- (*setter)(VALUE val, ID id);
-
-== CのデータをRubyオブジェクトにする
-
-Cの世界で定義されたデータ(構造体)をRubyのオブジェクトとして
-取り扱いたい場合がありえます.このような場合には,Dataという
-RubyオブジェクトにCの構造体(へのポインタ)をくるむことでRuby
-オブジェクトとして取り扱えるようになります.
-
-Dataオブジェクトを生成して構造体をRubyオブジェクトにカプセル
-化するためには,以下のマクロを使います.
-
- Data_Wrap_Struct(klass, mark, free, sval)
-
-このマクロの戻り値は生成されたDataオブジェクトです.
-
-klassはこのDataオブジェクトのクラスです.markはこの構造体が
-Rubyのオブジェクトへの参照がある時に使う関数です.そのような
-参照を含まない時には0を指定します.
-
-# そのような参照は勧められません.
-
-freeはこの構造体がもう不要になった時に呼ばれる関数です.この
-関数がガーベージコレクタから呼ばれます.これが-1の場合は,単
-純に開放されます.
-
-markおよびfree関数はGC実行中に呼び出されます.
-なお, GC実行中はRubyオブジェクトのアロケーションは禁止されま
-す. よって, markおよびfree関数でRubyオブジェクトのアロケーシ
-ョンは行わないでください.
-
-Cの構造体の割当とDataオブジェクトの生成を同時に行うマクロと
-して以下のものが提供されています.
-
- Data_Make_Struct(klass, type, mark, free, sval)
-
-このマクロの戻り値は生成されたDataオブジェクトです.このマク
-ロは以下の式のように働きます:
-
- (sval = ALLOC(type), Data_Wrap_Struct(klass, mark, free, sval))
-
-klass, mark, freeはData_Wrap_Structと同じ働きをします.type
-は割り当てるC構造体の型です.割り当てられた構造体は変数sval
-に代入されます.この変数の型は (type*) である必要があります.
-
-Dataオブジェクトからポインタを取り出すのは以下のマクロを用い
-ます.
-
- Data_Get_Struct(obj, type, sval)
-
-Cの構造体へのポインタは変数svalに代入されます.
-
-これらのDataの使い方はちょっと分かりにくいので,後で説明する
-例題を参照してください.
-
-= 例題 - dbmパッケージを作る
-
-ここまでの説明でとりあえず拡張ライブラリは作れるはずです.
-Rubyのextディレクトリにすでに含まれているdbmライブラリを例に
-して段階的に説明します.
-
-== ディレクトリを作る
-
- % mkdir ext/dbm
-
-Ruby 1.1からは任意のディレクトリでダイナミックライブラリを作
-ることができるようになりました.Rubyに静的にリンクする場合に
-はRubyを展開したディレクトリの下,extディレクトリの中に拡張
-ライブラリ用のディレクトリを作る必要があります.名前は適当に
-選んで構いません.
-
-== 設計する
-
-まあ,当然なんですけど,どういう機能を実現するかどうかまず設
-計する必要があります.どんなクラスをつくるか,そのクラスには
-どんなメソッドがあるか,クラスが提供する定数などについて設計
-します.
-
-== Cコードを書く
-
-拡張ライブラリ本体となるC言語のソースを書きます.C言語のソー
-スがひとつの時には「ライブラリ名.c」を選ぶと良いでしょう.C
-言語のソースが複数の場合には逆に「ライブラリ名.c」というファ
-イル名は避ける必要があります.オブジェクトファイルとモジュー
-ル生成時に中間的に生成される「ライブラリ名.o」というファイル
-とが衝突するからです.また,後述する mkmf ライブラリのいくつ
-かの関数がコンパイルを要するテストのために「conftest.c」とい
-うファイル名を使用することに注意してください.ソースファイル
-名として「conftest.c」を使用してはなりません.
-
-Rubyは拡張ライブラリをロードする時に「Init_ライブラリ名」と
-いう関数を自動的に実行します.dbmライブラリの場合「Init_dbm」
-です.この関数の中でクラス,モジュール,メソッド,定数などの
-定義を行います.dbm.cから一部引用します.
-
- void
- Init_dbm(void)
- {
- /* DBMクラスを定義する */
- cDBM = rb_define_class("DBM", rb_cObject);
- /* DBMはEnumerateモジュールをインクルードする */
- rb_include_module(cDBM, rb_mEnumerable);
-
- /* DBMクラスのクラスメソッドopen(): 引数はCの配列で受ける */
- rb_define_singleton_method(cDBM, "open", fdbm_s_open, -1);
-
- /* DBMクラスのメソッドclose(): 引数はなし */
- rb_define_method(cDBM, "close", fdbm_close, 0);
- /* DBMクラスのメソッド[]: 引数は1個 */
- rb_define_method(cDBM, "[]", fdbm_fetch, 1);
-
- /* ... */
-
- /* DBMデータを格納するインスタンス変数名のためのID */
- id_dbm = rb_intern("dbm");
- }
-
-DBMライブラリはdbmのデータと対応するオブジェクトになるはずで
-すから,Cの世界のdbmをRubyの世界に取り込む必要があります.
-
-dbm.cではData_Make_Structを以下のように使っています.
-
- struct dbmdata {
- int di_size;
- DBM *di_dbm;
- };
-
-
- obj = Data_Make_Struct(klass, struct dbmdata, 0, free_dbm, dbmp);
-
-ここではdbmstruct構造体へのポインタをDataにカプセル化してい
-ます.DBM*を直接カプセル化しないのはclose()した時の処理を考
-えてのことです.
-
-Dataオブジェクトからdbmstruct構造体のポインタを取り出すため
-に以下のマクロを使っています.
-
- #define GetDBM(obj, dbmp) {\
- Data_Get_Struct(obj, struct dbmdata, dbmp);\
- if (dbmp->di_dbm == 0) closed_dbm();\
- }
-
-ちょっと複雑なマクロですが,要するにdbmdata構造体のポインタ
-の取り出しと,closeされているかどうかのチェックをまとめてい
-るだけです.
-
-DBMクラスにはたくさんメソッドがありますが,分類すると3種類の
-引数の受け方があります.ひとつは引数の数が固定のもので,例と
-してはdeleteメソッドがあります.deleteメソッドを実装している
-fdbm_delete()はこのようになっています.
-
- static VALUE
- fdbm_delete(VALUE obj, VALUE keystr)
- {
- /* ... */
- }
-
-引数の数が固定のタイプは第1引数がself,第2引数以降がメソッド
-の引数となります.
-
-引数の数が不定のものはCの配列で受けるものとRubyの配列で受け
-るものとがあります.dbmライブラリの中で,Cの配列で受けるもの
-はDBMのクラスメソッドであるopen()です.これを実装している関
-数fdbm_s_open()はこうなっています.
-
- static VALUE
- fdbm_s_open(int argc, VALUE *argv, VALUE klass)
- {
- /* ... */
-
- if (rb_scan_args(argc, argv, "11", &file, &vmode) == 1) {
- mode = 0666; /* default value */
- }
-
- /* ... */
- }
-
-このタイプの関数は第1引数が与えられた引数の数,第2引数が与え
-られた引数の入っている配列になります.selfは第3引数として与
-えられます.
-
-この配列で与えられた引数を解析するための関数がopen()でも使わ
-れているrb_scan_args()です.第3引数に指定したフォーマットに従
-い,第4変数以降に指定したVALUEへの参照に値を代入してくれま
-す.
-
-
-引数をRubyの配列として受け取るメソッドの例には
-Thread#initializeがあります.実装はこうです.
-
- static VALUE
- thread_initialize(VALUE thread, VALUE args)
- {
- /* ... */
- }
-
-第1引数はself,第2引数はRubyの配列です.
-
-*注意事項*
-
-Rubyと共有はしないがRubyのオブジェクトを格納する可能性のある
-Cの大域変数は以下の関数を使ってRubyインタプリタに変数の存在
-を教えてあげてください.でないとGCでトラブルを起こします.
-
- void rb_global_variable(VALUE *var)
-
-== extconf.rbを用意する
-
-Makefileを作る場合の雛型になるextconf.rbというファイルを作り
-ます.extconf.rbはライブラリのコンパイルに必要な条件のチェッ
-クなどを行うことが目的です.まず,
-
- require 'mkmf'
-
-をextconf.rbの先頭に置きます.extconf.rbの中では以下のRuby関
-数を使うことが出来ます.
-
- have_library(lib, func): ライブラリの存在チェック
- have_func(func, header): 関数の存在チェック
- have_header(header): ヘッダファイルの存在チェック
- create_makefile(target[, target_prefix]): Makefileの生成
-
-以下の変数を使うことができます.
-
- $CFLAGS: コンパイル時に追加的に指定するフラグ(-Oなど)
- $CPPFLAGS: プリプロセッサに追加的に指定するフラグ(-Iや-Dなど)
- $LDFLAGS: リンク時に追加的に指定するフラグ(-Lなど)
- $objs: リンクされるオブジェクトファイル名のリスト
-
-オブジェクトファイルのリストは,通常はソースファイルを検索し
-て自動的に生成されますが,makeの途中でソースを生成するような
-場合は明示的に指定する必要があります.
-
-ライブラリをコンパイルする条件が揃わず,そのライブラリをコン
-パイルしない時にはcreate_makefileを呼ばなければMakefileは生
-成されず,コンパイルも行われません.
-
-== dependを用意する
-
-もし,ディレクトリにdependというファイルが存在すれば,
-Makefileが依存関係をチェックしてくれます.
-
- % gcc -MM *.c > depend
-
-などで作ることが出来ます.あって損は無いでしょう.
-
-== Makefileを生成する
-
-Makefileを実際に生成するためには
-
- ruby extconf.rb
-
-とします.extconf.rbに require 'mkmf' の行がない場合にはエラー
-になりますので,引数を追加して
-
- ruby -r mkmf extconf.rb
-
-としてください.
-
-site_ruby ディレクトリでなく,
-vendor_ruby ディレクトリにインストールする場合には
-以下のように --vendor オプションを加えてください.
-
- ruby extconf.rb --vendor
-
-ディレクトリをext以下に用意した場合にはRuby全体のmakeの時に
-自動的にMakefileが生成されますので,このステップは不要です.
-
-== makeする
-
-動的リンクライブラリを生成する場合にはその場でmakeしてくださ
-い.必要であれば make install でインストールされます.
-
-ext以下にディレクトリを用意した場合は,Rubyのディレクトリで
-makeを実行するとMakefileを生成からmake,必要によってはそのモ
-ジュールのRubyへのリンクまで自動的に実行してくれます.
-extconf.rbを書き換えるなどしてMakefileの再生成が必要な時はま
-たRubyディレクトリでmakeしてください.
-
-拡張ライブラリはmake installでRubyライブラリのディレクトリの
-下にコピーされます.もし拡張ライブラリと協調して使うRubyで記
-述されたプログラムがあり,Rubyライブラリに置きたい場合には,
-拡張ライブラリ用のディレクトリの下に lib というディレクトリ
-を作り,そこに 拡張子 .rb のファイルを置いておけば同時にイン
-ストールされます.
-
-== デバッグ
-
-まあ,デバッグしないと動かないでしょうね.ext/Setupにディレ
-クトリ名を書くと静的にリンクするのでデバッガが使えるようにな
-ります.その分コンパイルが遅くなりますけど.
-
-== できあがり
-
-後はこっそり使うなり,広く公開するなり,売るなり,ご自由にお
-使いください.Rubyの作者は拡張ライブラリに関して一切の権利を
-主張しません.
-
-= Appendix A. Rubyのソースコードの分類
-
-Rubyのソースはいくつかに分類することが出来ます.このうちクラ
-スライブラリの部分は基本的に拡張ライブラリと同じ作り方になっ
-ています.これらのソースは今までの説明でほとんど理解できると
-思います.
-
-== Ruby言語のコア
-
-class.c :: クラスとモジュール
-error.c :: 例外クラスと例外機構
-gc.c :: 記憶領域管理
-load.c :: ライブラリのロード
-object.c :: オブジェクト
-variable.c :: 変数と定数
-
-== Rubyの構文解析器
-
- parse.y : 字句解析器と構文定義
- -> parse.c : 自動生成
- keywords : 予約語
- -> lex.c : 自動生成
-
-== Rubyの評価器 (通称YARV)
- compile.c
- eval.c
- eval_error.c
- eval_jump.c
- eval_safe.c
- insns.def : 仮想機械語の定義
- iseq.c : VM::ISeqの実装
- thread.c : スレッド管理とコンテキスト切り替え
- thread_win32.c : スレッド実装
- thread_pthread.c : 同上
- vm.c
- vm_dump.c
- vm_eval.c
- vm_exec.c
- vm_insnhelper.c
- vm_method.c
-
- opt_insns_unif.def : 命令融合
- opt_operand.def : 最適化のための定義
-
- -> insn*.inc : 自動生成
- -> opt*.inc : 自動生成
- -> vm.inc : 自動生成
-
-== 正規表現エンジン (鬼車)
-
- regex.c
- regcomp.c
- regenc.c
- regerror.c
- regexec.c
- regparse.c
- regsyntax.c
-
-== ユーティリティ関数
-
-debug.c :: Cデバッガ用のデバッグシンボル
-dln.c :: 動的ローディング
-st.c :: 汎用ハッシュ表
-strftime.c :: 時刻整形
-util.c :: その他のユーティリティ
-
-== Rubyコマンドの実装
-
- dmyext.c
- dmydln.c
- dmyencoding.c
- id.c
- inits.c
- main.c
- ruby.c
- version.c
-
- gem_prelude.rb
- prelude.rb
-
-== クラスライブラリ
-
-array.c :: Array
-bignum.c :: Bignum
-compar.c :: Comparable
-complex.c :: Complex
-cont.c :: Fiber, Continuation
-dir.c :: Dir
-enum.c :: Enumerable
-enumerator.c :: Enumerator
-file.c :: File
-hash.c :: Hash
-io.c :: IO
-marshal.c :: Marshal
-math.c :: Math
-numeric.c :: Numeric, Integer, Fixnum, Float
-pack.c :: Array#pack, String#unpack
-proc.c :: Binding, Proc
-process.c :: Process
-random.c :: 乱数
-range.c :: Range
-rational.c :: Rational
-re.c :: Regexp, MatchData
-signal.c :: Signal
-sprintf.c :: String#sprintf
-string.c :: String
-struct.c :: Struct
-time.c :: Time
-defs/known_errors.def :: 例外クラス Errno::*
--> known_errors.inc :: 自動生成
-
-== 多言語化
-
-encoding.c :: Encoding
-transcode.c :: Encoding::Converter
-enc/*.c :: エンコーディングクラス群
-enc/trans/* :: コードポイント対応表
-
-== gorubyコマンドの実装
-
- goruby.c
- golf_prelude.rb : goruby固有のライブラリ
- -> golf_prelude.c : 自動生成
-
-= Appendix B. 拡張用関数リファレンス
-
-C言語からRubyの機能を利用するAPIは以下の通りである.
-
-== 型
-
-VALUE ::
-
- Rubyオブジェクトを表現する型.必要に応じてキャストして用いる.
- 組み込み型を表現するCの型はruby.hに記述してあるRで始まる構造
- 体である.VALUE型をこれらにキャストするためにRで始まる構造体
- 名を全て大文字にした名前のマクロが用意されている.
-
-== 変数・定数
-
-Qnil ::
-
- 定数: nilオブジェクト
-
-Qtrue ::
-
- 定数: trueオブジェクト(真のデフォルト値)
-
-Qfalse ::
-
- 定数: falseオブジェクト
-
-== Cデータのカプセル化
-
-Data_Wrap_Struct(VALUE klass, void (*mark)(), void (*free)(), void *sval) ::
-
- Cの任意のポインタをカプセル化したRubyオブジェクトを返す.こ
- のポインタがRubyからアクセスされなくなった時,freeで指定した
- 関数が呼ばれる.また,このポインタの指すデータが他のRubyオブ
- ジェクトを指している場合,markに指定する関数でマークする必要
- がある.
-
-Data_Make_Struct(klass, type, mark, free, sval) ::
-
- type型のメモリをmallocし,変数svalに代入した後,それをカプセ
- ル化したデータを返すマクロ.
-
-Data_Get_Struct(data, type, sval) ::
-
- dataからtype型のポインタを取り出し変数svalに代入するマクロ.
-
-== 型チェック
-
- TYPE(value)
- FIXNUM_P(value)
- NIL_P(value)
- void Check_Type(VALUE value, int type)
- SafeStringValue(value)
-
-== 型変換
-
- FIX2INT(value), INT2FIX(i)
- FIX2LONG(value), LONG2FIX(l)
- NUM2INT(value), INT2NUM(i)
- NUM2UINT(value), UINT2NUM(ui)
- NUM2LONG(value), LONG2NUM(l)
- NUM2ULONG(value), ULONG2NUM(ul)
- NUM2LL(value), LL2NUM(ll)
- NUM2ULL(value), ULL2NUM(ull)
- NUM2OFFT(value), OFFT2NUM(off)
- NUM2SIZET(value), SIZET2NUM(size)
- NUM2SSIZET(value), SSIZET2NUM(ssize)
- rb_integer_pack(value, words, numwords, wordsize, nails, flags), rb_integer_unpack(words, numwords, wordsize, nails, flags)
- NUM2DBL(value)
- rb_float_new(f)
- StringValue(value)
- StringValuePtr(value)
- StringValueCStr(value)
- rb_str_new2(s)
-
-== クラス/モジュール定義
-
-VALUE rb_define_class(const char *name, VALUE super) ::
-
- superのサブクラスとして新しいRubyクラスを定義する.
-
-VALUE rb_define_class_under(VALUE module, const char *name, VALUE super) ::
-
- superのサブクラスとして新しいRubyクラスを定義し,moduleの
- 定数として定義する.
-
-VALUE rb_define_module(const char *name) ::
-
- 新しいRubyモジュールを定義する.
-
-VALUE rb_define_module_under(VALUE module, const char *name) ::
-
- 新しいRubyモジュールを定義し,moduleの定数として定義する.
-
-void rb_include_module(VALUE klass, VALUE module) ::
-
- モジュールをインクルードする.classがすでにmoduleをインク
- ルードしている時には何もしない(多重インクルードの禁止).
-
-void rb_extend_object(VALUE object, VALUE module) ::
-
- オブジェクトをモジュール(で定義されているメソッド)で拡張する.
-
-== 大域変数定義
-
-void rb_define_variable(const char *name, VALUE *var) ::
-
- RubyとCとで共有するグローバル変数を定義する.変数名が`$'で
- 始まらない時には自動的に追加される.nameとしてRubyの識別子
- として許されない文字(例えば` ')を含む場合にはRubyプログラ
- ムからは見えなくなる.
-
-void rb_define_readonly_variable(const char *name, VALUE *var) ::
-
- RubyとCとで共有するread onlyのグローバル変数を定義する.
- read onlyであること以外はrb_define_variable()と同じ.
-
-void rb_define_virtual_variable(const char *name, VALUE (*getter)(), void (*setter)()) ::
-
- 関数によって実現されるRuby変数を定義する.変数が参照された
- 時にはgetterが,変数に値がセットされた時にはsetterが呼ばれ
- る.
-
-void rb_define_hooked_variable(const char *name, VALUE *var, VALUE (*getter)(), void (*setter)()) ::
-
- 関数によってhookのつけられたグローバル変数を定義する.変数
- が参照された時にはgetterが,関数に値がセットされた時には
- setterが呼ばれる.getterやsetterに0を指定した時にはhookを
- 指定しないのと同じ事になる.
-
-void rb_global_variable(VALUE *var)
-
- GCのため,Rubyプログラムからはアクセスされないが, Rubyオブ
- ジェクトを含む大域変数をマークする.
-
-== 定数
-
-void rb_define_const(VALUE klass, const char *name, VALUE val) ::
-
- 定数を定義する.
-
-void rb_define_global_const(const char *name, VALUE val) ::
-
- 大域定数を定義する.
-
- rb_define_const(rb_cObject, name, val)
-
- と同じ意味.
-
-== メソッド定義
-
-rb_define_method(VALUE klass, const char *name, VALUE (*func)(), int argc) ::
-
- メソッドを定義する.argcはselfを除く引数の数.argcが-1の時,
- 関数には引数の数(selfを含まない)を第1引数, 引数の配列を第2
- 引数とする形式で与えられる(第3引数はself).argcが-2の時,
- 第1引数がself, 第2引数がargs(argsは引数を含むRubyの配列)と
- いう形式で与えられる.
-
-rb_define_private_method(VALUE klass, const char *name, VALUE (*func)(), int argc) ::
-
- privateメソッドを定義する.引数はrb_define_method()と同じ.
-
-rb_define_singleton_method(VALUE klass, const char *name, VALUE (*func)(), int argc) ::
-
- 特異メソッドを定義する.引数はrb_define_method()と同じ.
-
-rb_scan_args(int argc, VALUE *argv, const char *fmt, ...) ::
-
- argc, argv形式で与えられた指定されたフォーマットに従って引
- 数を分解し,続くVALUEへの参照にセットします.このフォーマッ
- トは,ABNFで記述すると以下の通りです.
-
- scan-arg-spec := param-arg-spec [option-hash-arg-spec] [block-arg-spec]
-
- param-arg-spec := pre-arg-spec [post-arg-spec] / post-arg-spec /
- pre-opt-post-arg-spec
- pre-arg-spec := num-of-leading-mandatory-args [num-of-optional-args]
- post-arg-spec := sym-for-variable-length-args
- [num-of-trailing-mandatory-args]
- pre-opt-post-arg-spec := num-of-leading-mandatory-args num-of-optional-args
- num-of-trailing-mandatory-args
- option-hash-arg-spec := sym-for-option-hash-arg
- block-arg-spec := sym-for-block-arg
-
- num-of-leading-mandatory-args := DIGIT ; 先頭に置かれる省略不能な引数の数
- num-of-optional-args := DIGIT ; 続いて置かれる省略可能な引数の数
- sym-for-variable-length-args := "*" ; 続いて置かれる可変長引数を
- ; Rubyの配列で取得するための指定
- num-of-trailing-mandatory-args := DIGIT ; 終端に置かれる省略不能な引数の数
- sym-for-option-hash-arg := ":" ; オプションハッシュを取得する
- ; ための指定; 省略不能な引数の
- ; 数よりも多くの引数が指定され,
- ; 最後の引数がハッシュ(または
- ; #to_hashで変換可能)の場合に
- ; 取得される.最後の引数がnilの
- ; 場合,可変長引数指定がなく,
- ; 省略不能引数の数よりも多くの
- ; 引数が指定された場合に取得される
- sym-for-block-arg := "&" ; イテレータブロックを取得するための
- ; 指定
-
- フォーマットが"12"の場合,引数は最低1つで,3つ(1+2)まで許さ
- れるという意味になります.従って,フォーマット文字列に続い
- て3つのVALUEへの参照を置く必要があります.それらには取得した
- 変数がセットされます.変数への参照の代わりにNULLを指定する
- こともでき,その場合は取得した引数の値は捨てられます.なお,
- 省略可能引数が省略された時の変数の値はnil(C言語のレベルでは
- Qnil)になります.
-
- 返り値は与えられた引数の数です.オプションハッシュおよびイ
- テレータブロックは数えません.
-
-== Rubyメソッド呼び出し
-
-VALUE rb_funcall(VALUE recv, ID mid, int narg, ...) ::
-
- メソッド呼び出し.文字列からmidを得るためにはrb_intern()を
- 使う.
- private/protectedなメソッドでも呼び出せる.
-
-VALUE rb_funcall2(VALUE recv, ID mid, int argc, VALUE *argv) ::
-VALUE rb_funcallv(VALUE recv, ID mid, int argc, VALUE *argv) ::
-
- メソッド呼び出し.引数をargc, argv形式で渡す.
- private/protectedなメソッドでも呼び出せる.
-
-VALUE rb_funcallv_public(VALUE recv, ID mid, int argc, VALUE *argv) ::
-
- メソッド呼び出し.
- publicなメソッドしか呼べない.
-
-VALUE rb_eval_string(const char *str)
-
- 文字列をRubyスクリプトとしてコンパイル・実行する.
-
-ID rb_intern(const char *name) ::
-
- 文字列に対応するIDを返す.
-
-char *rb_id2name(ID id) ::
-
- IDに対応する文字列を返す(デバッグ用).
-
-char *rb_class2name(VALUE klass) ::
-
- クラスの名前を返す(デバッグ用).クラスが名前を持たない時に
- は, 祖先を遡って名前を持つクラスの名前を返す.
-
-int rb_respond_to(VALUE obj, ID id) ::
-
- objがidで示されるメソッドを持つかどうかを返す.
-
-== インスタンス変数
-
-VALUE rb_iv_get(VALUE obj, const char *name) ::
-
- objのインスタンス変数の値を得る.`@'で始まらないインスタン
- ス変数は Rubyプログラムからアクセスできない「隠れた」イン
- スタンス変数になる.定数は大文字の名前を持つクラス(または
- モジュール)のインスタンス変数として実装されている.
-
-VALUE rb_iv_set(VALUE obj, const char *name, VALUE val) ::
-
- objのインスタンス変数をvalにセットする.
-
-== 制御構造
-
-VALUE rb_block_call(VALUE obj, ID mid, int argc, VALUE * argv, VALUE (*func) (ANYARGS), VALUE data2) ::
-
- funcをブロックとして設定し,objをレシーバ,argcとargvを引数
- としてmidメソッドを呼び出す.funcは第一引数にyieldされた値,
- 第二引数にdata2を受け取る.複数の値がyieldされた場合(Cでは
- rb_yield_values()とrb_yield_values2(), rb_yield_splat()),
- data2はArrayとしてパックされている.第三, 第四引数のargcと
- argvによってyieldされた値を取り出すことができる.
-
-[OBSOLETE] VALUE rb_iterate(VALUE (*func1)(), VALUE arg1, VALUE (*func2)(), VALUE arg2) ::
-
- func2をブロックとして設定し, func1をイテレータとして呼ぶ.
- func1には arg1が引数として渡され, func2には第1引数にイテレー
- タから与えられた値, 第2引数にarg2が渡される.
-
- 1.9でrb_iterateを使う場合は, func1の中でRubyレベルのメソッド
- を呼び出さなければならない.
- 1.9でobsoleteとなった. 代わりにrb_block_callが用意された.
-
-VALUE rb_yield(VALUE val) ::
-
- valを値としてイテレータブロックを呼び出す.
-
-VALUE rb_rescue(VALUE (*func1)(), VALUE arg1, VALUE (*func2)(), VALUE arg2) ::
-
- 関数func1をarg1を引数に呼び出す.func1の実行中に例外が発生
- した時には func2をarg2を引数として呼ぶ.戻り値は例外が発生
- しなかった時はfunc1の戻り値, 例外が発生した時にはfunc2の戻
- り値である.
-
-VALUE rb_ensure(VALUE (*func1)(), VALUE arg1, VALUE (*func2)(), VALUE arg2) ::
-
- 関数func1をarg1を引数として実行し, 実行終了後(たとえ例外が
- 発生しても) func2をarg2を引数として実行する.戻り値はfunc1
- の戻り値である(例外が発生した時は戻らない).
-
-VALUE rb_protect(VALUE (*func) (VALUE), VALUE arg, int *state) ::
-
- 関数funcをargを引数として実行し, 例外が発生しなければその戻
- り値を返す.例外が発生した場合は, *stateに非0をセットして
- Qnilを返す.
- rb_jump_tag()を呼ばずに捕捉した例外を無視する場合には,
- rb_set_errinfo(Qnil)でエラー情報をクリアしなければならない.
-
-void rb_jump_tag(int state) ::
-
- rb_protect()やrb_eval_string_protect()で捕捉された例外を再
- 送する.stateはそれらの関数から返された値でなければならない.
- この関数は直接の呼び出し元に戻らない.
-
-void rb_iter_break() ::
-
- 現在の最も内側のブロックを終了する.この関数は直接の呼び出
- し元に戻らない.
-
-void rb_iter_break_value(VALUE value) ::
-
- 現在の最も内側のブロックをvalueで終了する.ブロックは引数で
- 与えられたvalueを返す.この関数は直接の呼び出し元に戻らない.
-
-== 例外・エラー
-
-void rb_warning(const char *fmt, ...) ::
-
- rb_verbose時に標準エラー出力に警告情報を表示する.引数は
- printf()と同じ.
-
-void rb_raise(rb_eRuntimeError, const char *fmt, ...) ::
-
- RuntimeError例外を発生させる.引数はprintf()と同じ.
-
-void rb_raise(VALUE exception, const char *fmt, ...) ::
-
- exceptionで指定した例外を発生させる.fmt以下の引数は
- printf()と同じ.
-
-void rb_fatal(const char *fmt, ...) ::
-
- 致命的例外を発生させる.通常の例外処理は行なわれず, インター
- プリタが終了する(ただしensureで指定されたコードは終了前に
- 実行される).
-
-void rb_bug(const char *fmt, ...) ::
-
- インタープリタなどプログラムのバグでしか発生するはずのない
- 状況の時呼ぶ.インタープリタはコアダンプし直ちに終了する.
- 例外処理は一切行なわれない.
-
-注意: %iはObject#to_s('+'フラグが指定されているときはObject#inspect)を
-使ったVALUEの出力に使用されているため,整数には%dを使用すること.
-
-== Rubyの初期化・実行
-
-Rubyをアプリケーションに埋め込む場合には以下のインタフェース
-を使う.通常の拡張ライブラリには必要ない.
-
-void ruby_init() ::
-
- Rubyインタプリタの初期化を行なう.
-
-void ruby_options(int argc, char **argv) ::
-
- Rubyインタプリタのコマンドライン引数の処理を行なう.
-
-void ruby_run() ::
-
- Rubyインタプリタを実行する.
-
-void ruby_script(char *name) ::
-
- Rubyのスクリプト名($0)を設定する.
-
-== インタプリタのイベントのフック
-
- void rb_add_event_hook(rb_event_hook_func_t func, rb_event_flag_t events,
- VALUE data)
-
-指定されたインタプリタのイベントに対するフック関数を追加します.
-eventsは以下の値のorでなければなりません:
-
- RUBY_EVENT_LINE
- RUBY_EVENT_CLASS
- RUBY_EVENT_END
- RUBY_EVENT_CALL
- RUBY_EVENT_RETURN
- RUBY_EVENT_C_CALL
- RUBY_EVENT_C_RETURN
- RUBY_EVENT_RAISE
- RUBY_EVENT_ALL
-
-rb_event_hook_func_tの定義は以下の通りです:
-
- typedef void (*rb_event_hook_func_t)(rb_event_t event, VALUE data,
- VALUE self, ID id, VALUE klass)
-
-rb_add_event_hook() の第3引数 data は,フック関数の第2引数と
-して渡されます.これは1.8では現在のNODEへのポインタでした.以
-下の RB_EVENT_HOOKS_HAVE_CALLBACK_DATA も参照してください.
-
- int rb_remove_event_hook(rb_event_hook_func_t func)
-
-指定されたフック関数を削除します.
-
-== 互換性のためのマクロ
-
-APIの互換性をチェックするために以下のマクロがデフォルトで定義されています.
-
-NORETURN_STYLE_NEW ::
-
- NORETURN マクロが関数型マクロとして定義されていることを意味する.
-
-HAVE_RB_DEFINE_ALLOC_FUNC ::
-
- rb_define_alloc_func() 関数が提供されていること,つまり
- allocation framework が使われることを意味する.
- have_func("rb_define_alloc_func", "ruby.h")
- の結果と同じ.
-
-HAVE_RB_REG_NEW_STR ::
-
- StringオブジェクトからRegexpオブジェクトを作る
- rb_reg_new_str() 関数が提供されていることを意味する.
- have_func("rb_reg_new_str", "ruby.h").
- の結果と同じ.
-
-HAVE_RB_IO_T ::
-
- rb_io_t 型が提供されていることを意味する.
-
-USE_SYMBOL_AS_METHOD_NAME ::
-
- メソッド名を返すメソッド,Module#methods, #singleton_methods
- などがSymbolを返すことを意味する.
-
-HAVE_RUBY_*_H ::
-
- ruby.h で定義されている.対応するヘッダが提供されていること
- を意味する.たとえば,HAVE_RUBY_ST_H が定義されている場合は
- 単なる st.h ではなく ruby/st.h を使用する.
-
-RB_EVENT_HOOKS_HAVE_CALLBACK_DATA ::
-
- rb_add_event_hook() がフック関数に渡す data を第3引数として
- 受け取ることを意味する.
-
-= Appendix C. extconf.rbで使える関数たち
-
-extconf.rbの中では利用可能なコンパイル条件チェックの関数は以
-下の通りである.
-
-have_macro(macro, headers) ::
-
- ヘッダファイルheaderをインクルードしてマクロmacroが定義さ
- れているかどうかチェックする.マクロが定義されている時true
- を返す.
-
-have_library(lib, func) ::
-
- 関数funcを定義しているライブラリlibの存在をチェックする.
- チェックに成功すると,-llibを$libsに追加し,trueを返す.
-
-find_library(lib, func, path...) ::
-
- 関数funcを定義しているライブラリlibの存在を -Lpath を追加
- しながらチェックする.チェックに成功すると,-llibを$libsに
- 追加し,trueを返す.
-
-have_func(func, header) ::
-
- ヘッダファイルheaderをインクルードして関数funcの存在をチェ
- ックする.funcが標準ではリンクされないライブラリ内のもので
- ある時には先にhave_libraryでそのライブラリをチェックしてお
- く事.チェックに成功すると,プリプロセッサマクロ
- `HAVE_{FUNC}` を定義し,trueを返す.
-
-have_var(var, header) ::
-
- ヘッダファイルheaderをインクルードして変数varの存在をチェッ
- クする.varが標準ではリンクされないライブラリ内のものであ
- る時には先にhave_libraryでそのライブラリをチェックしておく
- 事.チェックに成功すると,プリプロセッサマクロ
- `HAVE_{VAR}` を定義し,trueを返す.
-
-have_header(header) ::
-
- ヘッダファイルの存在をチェックする.チェックに成功すると,
- プリプロセッサマクロ `HAVE_{HEADER_H}` を定義し,trueを返す.
- (スラッシュやドットはアンダースコアに置換される)
-
-find_header(header, path...) ::
-
- ヘッダファイルheaderの存在を -Ipath を追加しながらチェック
- する.チェックに成功すると,プリプロセッサマクロ
- `HAVE_{HEADER_H}` を定義し,trueを返す.
- (スラッシュやドットはアンダースコアに置換される)
-
-have_struct_member(type, member[, header[, opt]]) ::
-
- ヘッダファイルheaderをインクルードして型typeが定義され,
- なおかつメンバmemberが存在するかをチェックする.チェックに
- 成功すると,プリプロセッサマクロ `HAVE_{TYPE}_{MEMBER}` を
- 定義し,trueを返す.
-
-have_type(type, header, opt) ::
-
- ヘッダファイルheaderをインクルードして型typeが存在するかを
- チェックする.チェックに成功すると,プリプロセッサマクロ
- `HAVE_TYPE_{TYPE}` を定義し,trueを返す.
-
-check_sizeof(type, header) ::
-
- ヘッダファイルheaderをインクルードして型typeのchar単位サイ
- ズを調べる.チェックに成功すると,プリプロセッサマクロ
- `SIZEOF_{TYPE}` を定義し,そのサイズを返す.定義されていな
- いときはnilを返す.
-
-create_makefile(target[, target_prefix]) ::
-
- 拡張ライブラリ用のMakefileを生成する.この関数を呼ばなけれ
- ばそのライブラリはコンパイルされない.targetはモジュール名
- を表す.
-
-find_executable(command, path) ::
-
- コマンドcommandをFile::PATH_SEPARATORで区切られたパス名の
- リストpathから探す.pathがnilまたは省略された場合は,環境
- 変数PATHの値を使用する.実行可能なコマンドが見つかった場合
- はパスを含むファイル名,見つからなかった場合はnilを返す.
-
-with_config(withval[, default=nil]) ::
-
- コマンドライン上の--with-<withval>で指定されたオプション値
- を得る.
-
-enable_config(config, *defaults) ::
-disable_config(config, *defaults) ::
-
- コマンドライン上の--enable-<config>または
- --disable-<config>で指定された真偽値を得る.
- --enable-<config>が指定されていた場合はtrue,
- --disable-<config>が指定されていた場合はfalseを返す.
- どちらも指定されていない場合は,ブロックつきで呼び出されて
- いる場合は*defaultsをyieldした結果,ブロックなしなら
- *defaultsを返す.
-
-dir_config(target[, default_dir]) ::
-dir_config(target[, default_include, default_lib]) ::
-
- コマンドライン上の--with-<target>-dir, --with-<target>-include,
- --with-<target>-libのいずれかで指定されるディレクトリを
- $CFLAGS や $LDFLAGS に追加する.--with-<target>-dir=/pathは
- --with-<target>-include=/path/include --with-<target>-lib=/path/lib
- と等価である.追加された include ディレクトリと lib ディレ
- クトリの配列を返す. ([include_dir, lib_dir])
-
-pkg_config(pkg, option=nil) ::
-
- pkg-configコマンドからパッケージpkgの情報を [cflags, ldflags, libs]
- の配列として得る.$CFLAGS, $LDFLAGS, $libs にはそれぞれの値が
- 追加される.
-
- pkg-configの実際のコマンドは,以下の順で試される.
-
- 1. コマンドラインで--with-{pkg}-config={command}オプションが
- 指定された場合: {command} {option}
- 2. {pkg}-config {option}
- 3. pkg-config {option} {pkg}
-
- optionが指定された場合は、上記の配列の代わりにそのオプションを
- 指定して得られた出力をstripしたものを返す.
-
-= Appendix D. 世代別GC
-
-Ruby 2.1から世代別GCに対応しました。我々はこれをRGenGCと呼んでいます。
-RGenGCは、過去の拡張ライブラリに(ほぼ)互換性を保つように開発されている
-ため、拡張ライブラリ側の対応はほぼ不要です。
-
-ただし、対応をすることで性能を向上することができる可能性があります。もし
-拡張ライブラリに高い性能が必要である場合は対応を検討して下さい。
-
-とくにRARRAY_PTR()/RHASH_TBL()のようなマクロを用いてポインタに直接アクセ
-スするようなコードは書かないようにして下さい。代わりに、rb_ary_aref(),
-rb_ary_store() などの、適切な API 関数を利用するようにして下さい。
-
-そのほか、対応についての詳細は README.ext の「Appendix D. Generational
-GC」を参照して下さい。
-
-/*
- * Local variables:
- * fill-column: 60
- * end:
- */
+doc/extension.ja.rdocに移動しました
diff --git a/README.ja b/README.ja
deleted file mode 100644
index 9ab2f3ca0e..0000000000
--- a/README.ja
+++ /dev/null
@@ -1,192 +0,0 @@
-= Rubyとは
-
-Rubyはシンプルかつ強力なオブジェクト指向スクリプト言語です.
-Rubyは最初から純粋なオブジェクト指向言語として設計されていま
-すから,オブジェクト指向プログラミングを手軽に行う事が出来ま
-す.もちろん通常の手続き型のプログラミングも可能です.
-
-Rubyはテキスト処理関係の能力などに優れ,Perlと同じくらい強力
-です.さらにシンプルな文法と,例外処理やイテレータなどの機構
-によって,より分かりやすいプログラミングが出来ます.
-
-
-== Rubyの特長
-
-* シンプルな文法
-* 普通のオブジェクト指向機能(クラス,メソッドコールなど)
-* 特殊なオブジェクト指向機能(Mixin, 特異メソッドなど)
-* 演算子オーバーロード
-* 例外処理機能
-* イテレータとクロージャ
-* ガーベージコレクタ
-* ダイナミックローディング (アーキテクチャによる)
-* 移植性が高い.多くのUnix-like/POSIX互換プラットフォーム上で
- 動くだけでなく,Windows, Mac OS X,BeOSなどの上でも動く
- cf. http://bugs.ruby-lang.org/projects/ruby-trunk/wiki/SupportedPlatformsJa
-
-== 入手法
-
-=== FTPで
-
-以下の場所においてあります.
-
-ftp://ftp.ruby-lang.org/pub/ruby/
-
-=== Subversionで
-
-開発先端のソースコードは次のコマンドで取得できます.
-
- $ svn co http://svn.ruby-lang.org/repos/ruby/trunk/ ruby
-
-他に開発中のブランチの一覧は次のコマンドで見られます.
-
- $ svn ls http://svn.ruby-lang.org/repos/ruby/branches/
-
-=== Gitで
-
-SubversionのミラーをGitHubに公開しています.
-以下のコマンドでリポジトリを取得できます.
-
- $ git clone git://github.com/ruby/ruby.git
-
-== ホームページ
-
-RubyのホームページのURLは
-
-http://www.ruby-lang.org/
-
-です.
-
-
-== メーリングリスト
-
-Rubyのメーリングリストがあります。参加希望の方は
-
-mailto:ruby-list-ctl@ruby-lang.org
-
-まで本文に
-
- subscribe YourFirstName YourFamilyName
-
-と書いて送って下さい。
-
-Ruby開発者向けメーリングリストもあります。こちらではrubyのバ
-グ、将来の仕様拡張など実装上の問題について議論されています。
-参加希望の方は
-
-mailto:ruby-dev-ctl@ruby-lang.org
-
-までruby-listと同様の方法でメールしてください。
-
-Ruby拡張モジュールについて話し合うruby-extメーリングリストと
-数学関係の話題について話し合うruby-mathメーリングリストと
-英語で話し合うruby-talkメーリングリストもあります。参加方法
-はどれも同じです。
-
-
-== コンパイル・インストール
-
-以下の手順で行ってください.
-
-1. もし +configure+ ファイルが見つからない、もしくは
- +configure.in+ より古いようなら、 +autoconf+ を実行して
- 新しく +configure+ を生成する
-
-2. +configure+ を実行して +Makefile+ などを生成する
-
- 環境によってはデフォルトのCコンパイラ用オプションが付き
- ます. +configure+ オプションで <tt>optflags=..</tt> <tt>warnflags=..</tt> 等
- で上書きできます.
-
-3. (必要ならば)+defines.h+ を編集する
-
- 多分,必要無いと思います.
-
-4. (必要ならば)+ext/Setup+ に静的にリンクする拡張モジュールを
- 指定する
-
- +ext/Setup+ に記述したモジュールは静的にリンクされます.
-
- ダイナミックローディングをサポートしていないアーキテク
- チャでは +Setup+ の1行目の「<tt>option nodynamic</tt>」という行のコ
- メントを外す必要があります.また,このアーキテクチャで
- 拡張モジュールを利用するためには,あらかじめ静的にリン
- クしておく必要があります.
-
-5. +make+ を実行してコンパイルする
-
-6. <tt>make check</tt>でテストを行う.
-
- 「<tt>check succeeded</tt>」と表示されれば成功です.ただしテスト
- に成功しても完璧だと保証されている訳ではありません.
-
-7. <tt>make install</tt>
-
- 以下のディレクトリを作って,そこにファイルをインストー
- ルします.
-
- * <tt>${DESTDIR}${prefix}/bin</tt>
- * <tt>${DESTDIR}${prefix}/include/ruby-${MAJOR}.${MINOR}.${TEENY}</tt>
- * <tt>${DESTDIR}${prefix}/include/ruby-${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}</tt>
- * <tt>${DESTDIR}${prefix}/lib</tt>
- * <tt>${DESTDIR}${prefix}/lib/ruby</tt>
- * <tt>${DESTDIR}${prefix}/lib/ruby/${MAJOR}.${MINOR}.${TEENY}</tt>
- * <tt>${DESTDIR}${prefix}/lib/ruby/${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}</tt>
- * <tt>${DESTDIR}${prefix}/lib/ruby/site_ruby</tt>
- * <tt>${DESTDIR}${prefix}/lib/ruby/site_ruby/${MAJOR}.${MINOR}.${TEENY}</tt>
- * <tt>${DESTDIR}${prefix}/lib/ruby/site_ruby/${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}</tt>
- * <tt>${DESTDIR}${prefix}/lib/ruby/vendor_ruby</tt>
- * <tt>${DESTDIR}${prefix}/lib/ruby/vendor_ruby/${MAJOR}.${MINOR}.${TEENY}</tt>
- * <tt>${DESTDIR}${prefix}/lib/ruby/vendor_ruby/${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}</tt>
- * <tt>${DESTDIR}${prefix}/lib/ruby/gems/${MAJOR}.${MINOR}.${TEENY}</tt>
- * <tt>${DESTDIR}${prefix}/share/man/man1</tt>
- * <tt>${DESTDIR}${prefix}/share/ri/${MAJOR}.${MINOR}.${TEENY}/system</tt>
-
- RubyのAPIバージョンが'_x.y.z_'であれば,<tt>${MAJOR}</tt>は
- '_x_'で,<tt>${MINOR}</tt>は'_y_',<tt>${TEENY}</tt>は'_z_'です.
-
- <b>注意</b>: APIバージョンの +teeny+ は,Rubyプログラムのバージョ
- ンとは異なることがあります.
-
- +root+ で作業する必要があるかもしれません.
-
-もし,コンパイル時にエラーが発生した場合にはエラーのログとマ
-シン,OSの種類を含むできるだけ詳しいレポートを作者に送ってく
-ださると他の方のためにもなります.
-
-
-== 移植
-
-UNIXであれば +configure+ がほとんどの差異を吸収してくれるはずで
-すが,思わぬ見落としがあった場合(あるに違いない),作者にその
-ことをレポートすれば,解決できるかも知れません.
-
-アーキテクチャにもっとも依存するのはGC部です.RubyのGCは対象
-のアーキテクチャが<tt>setjmp()</tt>または<tt>getcontext()</tt>によって全てのレ
-ジスタを +jmp_buf+ や +ucontext_t+ に格納することと, +jmp_buf+ や
-+ucontext_t+ とスタックが32bitアラインメントされていることを仮定
-しています.特に前者が成立しない場合の対応は非常に困難でしょう.
-後者の解決は比較的簡単で, +gc.c+ でスタックをマークしている
-部分にアラインメントのバイト数だけずらしてマークするコードを
-追加するだけで済みます.<tt>defined(\_\_mc68000\_\_)</tt>で括られてい
-る部分を参考にしてください.
-
-レジスタウィンドウを持つCPUでは,レジスタウィンドウをスタッ
-クにフラッシュするアセンブラコードを追加する必要があるかも知
-れません.
-
-
-== 配布条件
-
-+COPYING.ja+ ファイルを参照してください。
-
-
-== 著者
-
-コメント,バグレポートその他は mailto:matz@ruby-lang.org まで.
--------------------------------------------------------
-created at: Thu Aug 3 11:57:36 JST 1995
---
-Local variables:
-mode: rdoc
-end:
diff --git a/README.ja.md b/README.ja.md
new file mode 100644
index 0000000000..eee54a9171
--- /dev/null
+++ b/README.ja.md
@@ -0,0 +1,171 @@
+# Rubyとは
+
+Rubyはシンプルかつ強力なオブジェクト指向スクリプト言語です. Rubyは純粋なオブジェクト指向言語として設計されているので,
+オブジェクト指向プログラミングを手軽に行う事が出来ます.もちろん普通の手続き型のプログラミングも可能です.
+
+Rubyはテキスト処理関係の能力などに優れ,Perlと同じくらい強力です.さらにシンプルな文法と,
+例外処理やイテレータなどの機構によって,より分かりやすいプログラミングが出来ます.
+
+## Rubyの特長
+
+* シンプルな文法
+* 普通のオブジェクト指向機能(クラス,メソッドコールなど)
+* 特殊なオブジェクト指向機能(Mixin, 特異メソッドなど)
+* 演算子オーバーロード
+* 例外処理機能
+* イテレータとクロージャ
+* ガーベージコレクタ
+* ダイナミックローディング (アーキテクチャによる)
+* 移植性が高い.多くのUnix-like/POSIX互換プラットフォーム上で動くだけでなく,Windows, Mac OS
+ X,BeOSなどの上でも動く cf.
+ http://bugs.ruby-lang.org/projects/ruby-trunk/wiki/SupportedPlatformsJa
+
+
+## 入手法
+
+### FTPで
+
+以下の場所においてあります.
+
+ftp://ftp.ruby-lang.org/pub/ruby/
+
+### Subversionで
+
+開発先端のソースコードは次のコマンドで取得できます.
+
+ $ svn co http://svn.ruby-lang.org/repos/ruby/trunk/ ruby
+
+他に開発中のブランチの一覧は次のコマンドで見られます.
+
+ $ svn ls http://svn.ruby-lang.org/repos/ruby/branches/
+
+### Gitで
+
+SubversionのミラーをGitHubに公開しています. 以下のコマンドでリポジトリを取得できます.
+
+ $ git clone git://github.com/ruby/ruby.git
+
+## ホームページ
+
+RubyのホームページのURLは
+
+http://www.ruby-lang.org/
+
+です.
+
+## メーリングリスト
+
+Rubyのメーリングリストがあります.参加希望の方は
+
+mailto:ruby-list-request@ruby-lang.org
+
+まで本文に
+
+ subscribe
+
+と書いて送って下さい.
+
+Ruby開発者向けメーリングリストもあります.こちらではrubyのバグ,将来の仕様拡張など実装上の問題について議論されています. 参加希望の方は
+
+mailto:ruby-dev-request@ruby-lang.org
+
+までruby-listと同様の方法でメールしてください.
+
+Ruby拡張モジュールについて話し合うruby-extメーリングリストと数学関係の話題について話し合うruby-mathメーリングリストと
+英語でrubyについて話し合うruby-talkメーリングリストもあります.参加方法はどれも同じです.
+
+## コンパイル・インストール
+
+以下の手順で行ってください.
+
+1. もし `configure` ファイルが見つからない,もしくは `configure.in` より古いようなら, `autoconf` を実行して
+ 新しく `configure` を生成する
+
+2. `configure` を実行して `Makefile` などを生成する
+
+ 環境によってはデフォルトのCコンパイラ用オプションが付きます. `configure` オプションで `optflags=..`
+ `warnflags=..` 等で上書きできます.
+
+3. (必要ならば)`defines.h` を編集する
+
+ 多分,必要無いと思います.
+
+4. (必要ならば)`ext/Setup` に静的にリンクする拡張モジュールを指定する
+
+ `ext/Setup` に記述したモジュールは静的にリンクされます.
+
+ ダイナミックローディングをサポートしていないアーキテクチャでは `Setup` の1行目の「`option nodynamic`」という行のコ
+ メントを外す必要があります.また,このアーキテクチャで拡張モジュールを利用するためには,あらかじめ静的にリンクをしておく必要があります.
+
+5. `make` を実行してコンパイルする
+
+6. `make check`でテストを行う.
+
+ 「`check succeeded`」と表示されれば成功です.ただしテストに成功しても完璧だと保証されている訳ではありません.
+
+7. `make install`
+
+ 以下のディレクトリを作って,そこにファイルをインストー ルします.
+
+ * `${DESTDIR}${prefix}/bin`
+ * `${DESTDIR}${prefix}/include/ruby-${MAJOR}.${MINOR}.${TEENY}`
+ * `${DESTDIR}${prefix}/include/ruby-${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}`
+ * `${DESTDIR}${prefix}/lib`
+ * `${DESTDIR}${prefix}/lib/ruby`
+ * `${DESTDIR}${prefix}/lib/ruby/${MAJOR}.${MINOR}.${TEENY}`
+ * `${DESTDIR}${prefix}/lib/ruby/${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}`
+ * `${DESTDIR}${prefix}/lib/ruby/site_ruby`
+ * `${DESTDIR}${prefix}/lib/ruby/site_ruby/${MAJOR}.${MINOR}.${TEENY}`
+ * `${DESTDIR}${prefix}/lib/ruby/site_ruby/${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}`
+ * `${DESTDIR}${prefix}/lib/ruby/vendor_ruby`
+ * `${DESTDIR}${prefix}/lib/ruby/vendor_ruby/${MAJOR}.${MINOR}.${TEENY}`
+ * `${DESTDIR}${prefix}/lib/ruby/vendor_ruby/${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}`
+ * `${DESTDIR}${prefix}/lib/ruby/gems/${MAJOR}.${MINOR}.${TEENY}`
+ * `${DESTDIR}${prefix}/share/man/man1`
+ * `${DESTDIR}${prefix}/share/ri/${MAJOR}.${MINOR}.${TEENY}/system`
+
+
+ RubyのAPIバージョンが'*x.y.z*'であれば,`${MAJOR}`は
+ '*x*'で,`${MINOR}`は'*y*',`${TEENY}`は'*z*'です.
+
+ **注意**: APIバージョンの `teeny` は,Rubyプログラムのバージョンとは異なることがあります.
+
+ `root` で作業する必要があるかもしれません.
+
+
+もし,コンパイル時にエラーが発生した場合にはエラーのログとマシン,OSの種類を含むできるだけ詳しいレポートを作者に送って下さると他の方のためにもなります.
+
+## 移植
+
+UNIXであれば `configure` がほとんどの差異を吸収してくれるはずですが,思わぬ見落としがあった場合(ある事が多い),作者にその
+ことを報告すれば,解決できる可能性があります.
+
+アーキテクチャにもっとも依存するのはGC部です.RubyのGCは対象
+のアーキテクチャが`setjmp()`または`getcontext()`によって全てのレジスタを `jmp_buf` や `ucontext_t`
+に格納することと, `jmp_buf` や `ucontext_t` とスタックが32bitアラインメントされていることを仮定
+しています.特に前者が成立しない場合の対応は非常に困難でしょう. 後者の解決は比較的簡単で, `gc.c` でスタックをマークしている
+部分にアラインメントのバイト数だけずらしてマークするコードを追加するだけで済みます.`defined(__mc68000__)`で括られてい
+る部分を参考にしてください.
+
+レジスタウィンドウを持つCPUでは,レジスタウィンドウをスタックにフラッシュするアセンブラコードを追加する必要があるかもしれません.
+
+## 配布条件
+
+`COPYING.ja` ファイルを参照してください.
+
+## フィードバック
+
+Rubyに関する質問は Ruby-Talk(英語)や Ruby-List(日本語) (https://www.ruby-lang.org/ja/community/mailing-lists) や,
+stackoverflow (http://ja.stackoverflow.com/) などのWebサイトに投稿してください.
+
+バグ報告は http://bugs.ruby-lang.org で受け付けています.
+
+
+## 著者
+
+Rubyのオリジナル版は,1995年にまつもとゆきひろ氏によって設計・開発されました.
+
+<mailto:matz@ruby-lang.org>
+
+---
+created at: Thu Aug 3 11:57:36 JST 1995
diff --git a/README.md b/README.md
new file mode 100644
index 0000000000..14fb7aa213
--- /dev/null
+++ b/README.md
@@ -0,0 +1,164 @@
+# What's Ruby
+
+Ruby is the interpreted scripting language for quick and easy object-oriented
+programming. It has many features to process text files and to do system
+management tasks (as in Perl). It is simple, straight-forward, and
+extensible.
+
+## Features of Ruby
+
+* Simple Syntax
+* **Normal** Object-oriented Features (e.g. class, method calls)
+* **Advanced** Object-oriented Features (e.g. Mix-in, Singleton-method)
+* Operator Overloading
+* Exception Handling
+* Iterators and Closures
+* Garbage Collection
+* Dynamic Loading of Object Files (on some architectures)
+* Highly Portable (works on many Unix-like/POSIX compatible platforms as
+ well as Windows, Mac OS X, BeOS, etc.) cf.
+ http://bugs.ruby-lang.org/projects/ruby-trunk/wiki/SupportedPlatforms
+
+
+## How to get Ruby
+
+For a complete list of ways to install Ruby, including using third-party tools
+like rvm, see:
+
+http://www.ruby-lang.org/en/downloads/
+
+The Ruby distribution files can be found on the following FTP site:
+
+ftp://ftp.ruby-lang.org/pub/ruby/
+
+The trunk of the Ruby source tree can be checked out with the following
+command:
+
+ $ svn co http://svn.ruby-lang.org/repos/ruby/trunk/ ruby
+
+Or if you are using git then use the following command:
+
+ $ git clone git://github.com/ruby/ruby.git
+
+There are some other branches under development. Try the following command
+to see the list of branches:
+
+ $ svn ls http://svn.ruby-lang.org/repos/ruby/branches/
+
+Or if you are using git then use the following command:
+
+ $ git ls-remote git://github.com/ruby/ruby.git
+
+## Ruby home page
+
+The URL of the Ruby home page is:
+
+http://www.ruby-lang.org/
+
+## Mailing list
+
+There is a mailing list to talk about Ruby. To subscribe this list, please
+send the following phrase:
+
+ subscribe
+
+in the mail body (not subject) to the address
+<mailto:ruby-talk-request@ruby-lang.org>.
+
+## How to compile and install
+
+This is what you need to do to compile and install Ruby:
+
+1. If you want to use Microsoft Visual C++ to compile ruby, read
+ win32/README.win32 instead of this document.
+
+2. If `./configure` does not exist or is older than configure.in, run
+ `autoconf` to (re)generate configure.
+
+3. Run `./configure`, which will generate `config.h` and `Makefile`.
+
+ Some C compiler flags may be added by default depending on your
+ environment. Specify `optflags=..` and `warnflags=..` as necessary to
+ override them.
+
+4. Edit `defines.h` if you need. Usually this step will not be needed.
+
+5. Remove comment mark(`#`) before the module names from `ext/Setup` (or add
+ module names if not present), if you want to link modules statically.
+
+ If you don't want to compile non static extension modules (probably on
+ architectures which do not allow dynamic loading), remove comment mark
+ from the line "`#option nodynamic`" in `ext/Setup`.
+
+ Usually this step will not be needed.
+
+6. Run `make`.
+
+7. Optionally, run '`make check`' to check whether the compiled Ruby
+ interpreter works well. If you see the message "`check succeeded`", your
+ ruby works as it should (hopefully).
+
+8. Run '`make install`'
+
+ This command will create following directories and install files onto
+ them.
+
+ * `${DESTDIR}${prefix}/bin`
+ * `${DESTDIR}${prefix}/include/ruby-${MAJOR}.${MINOR}.${TEENY}`
+ * `${DESTDIR}${prefix}/include/ruby-${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}`
+ * `${DESTDIR}${prefix}/lib`
+ * `${DESTDIR}${prefix}/lib/ruby`
+ * `${DESTDIR}${prefix}/lib/ruby/${MAJOR}.${MINOR}.${TEENY}`
+ * `${DESTDIR}${prefix}/lib/ruby/${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}`
+ * `${DESTDIR}${prefix}/lib/ruby/site_ruby`
+ * `${DESTDIR}${prefix}/lib/ruby/site_ruby/${MAJOR}.${MINOR}.${TEENY}`
+ * `${DESTDIR}${prefix}/lib/ruby/site_ruby/${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}`
+ * `${DESTDIR}${prefix}/lib/ruby/vendor_ruby`
+ * `${DESTDIR}${prefix}/lib/ruby/vendor_ruby/${MAJOR}.${MINOR}.${TEENY}`
+ * `${DESTDIR}${prefix}/lib/ruby/vendor_ruby/${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}`
+ * `${DESTDIR}${prefix}/lib/ruby/gems/${MAJOR}.${MINOR}.${TEENY}`
+ * `${DESTDIR}${prefix}/share/man/man1`
+ * `${DESTDIR}${prefix}/share/ri/${MAJOR}.${MINOR}.${TEENY}/system`
+
+
+ If Ruby's API version is '*x.y.z*', the `${MAJOR}` is '*x*', the
+ `${MINOR}` is '*y*', and the `${TEENY}` is '*z*'.
+
+ **NOTE**: teeny of the API version may be different from one of Ruby's
+ program version
+
+ You may have to be a super user to install ruby.
+
+
+If you fail to compile ruby, please send the detailed error report with the
+error log and machine/OS type, to help others.
+
+Some extension libraries may not get compiled because of lack of necessary
+external libraries and/or headers, then you will need to run '`make distclean-ext`'
+to remove old configuration after installing them in such case.
+
+## Copying
+
+See the file `COPYING`.
+
+## Feedback
+
+Questions about the Ruby language can be asked on the Ruby-Talk mailing list
+(http://www.ruby-lang.org/en/community/mailing-lists) or on websites like
+(http://stackoverflow.com).
+
+Bug reports should be filed at http://bugs.ruby-lang.org. Read [HowToReport] for more information.
+
+[HowToReport]: https://bugs.ruby-lang.org/projects/ruby/wiki/HowToReport
+
+##Contributing
+
+See the file `CONTRIBUTING.md`
+
+
+## The Author
+
+Ruby was originally designed and developed by Yukihiro Matsumoto (Matz) in
+1995.
+
+<mailto:matz@ruby-lang.org>
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644
index 0000000000..30fccd52fe
--- /dev/null
+++ b/aclocal.m4
@@ -0,0 +1,46 @@
+# -*- autoconf -*-
+
+AC_DEFUN([_COLORIZE_RESULT_PREPARE], [
+ msg_checking= msg_result_yes= msg_result_no= msg_result_other= msg_reset=
+ AS_IF([test "x${CONFIGURE_TTY}" = xyes -o -t 1], [
+ msg_begin="`tput smso 2>/dev/null`"
+ AS_CASE(["$msg_begin"], ['@<:@'*m],
+ [msg_begin="`echo "$msg_begin" | sed ['s/[0-9]*m$//']`"
+ msg_checking="${msg_begin}33m"
+ AS_IF([test ${TEST_COLORS:+set}], [
+ msg_result_yes=[`expr ":$TEST_COLORS:" : ".*:pass=\([^:]*\):"`]
+ msg_result_no=[`expr ":$TEST_COLORS:" : ".*:fail=\([^:]*\):"`]
+ msg_result_other=[`expr ":$TEST_COLORS:" : ".*:skip=\([^:]*\):"`]
+ ])
+ msg_result_yes="${msg_begin}${msg_result_yes:-32;1}m"
+ msg_result_no="${msg_begin}${msg_result_no:-31;1}m"
+ msg_result_other="${msg_begin}${msg_result_other:-33;1}m"
+ msg_reset="${msg_begin}m"
+ ])
+ AS_UNSET(msg_begin)
+ ])
+ AS_REQUIRE_SHELL_FN([colorize_result],
+ [AS_FUNCTION_DESCRIBE([colorize_result], [MSG], [Colorize result])],
+ [AS_CASE(["$[]1"],
+ [yes], [AS_ECHO(["${msg_result_yes}$[]1${msg_reset}]")],
+ [no], [AS_ECHO(["${msg_result_no}$[]1${msg_reset}]")],
+ [AS_ECHO(["${msg_result_other}$[]1${msg_reset}]")])])
+])
+
+AC_DEFUN([COLORIZE_RESULT], [AC_REQUIRE([_COLORIZE_RESULT_PREPARE])dnl
+ AS_LITERAL_IF([$1],
+ [m4_case([$1],
+ [yes], [AS_ECHO(["${msg_result_yes}$1${msg_reset}"])],
+ [no], [AS_ECHO(["${msg_result_no}$1${msg_reset}"])],
+ [AS_ECHO(["${msg_result_other}$1${msg_reset}"])])],
+ [colorize_result "$1"]) dnl
+])
+
+AC_DEFUN([AC_CHECKING],[dnl
+AC_REQUIRE([_COLORIZE_RESULT_PREPARE])dnl
+AS_MESSAGE([checking ${msg_checking}$1${msg_reset}...])])
+
+AC_DEFUN([AC_MSG_RESULT], [dnl
+{ _AS_ECHO_LOG([result: $1])
+COLORIZE_RESULT([$1]); dnl
+}])
diff --git a/addr2line.c b/addr2line.c
index f936694724..c8faf48d62 100644
--- a/addr2line.c
+++ b/addr2line.c
@@ -55,11 +55,8 @@ void *alloca();
# endif /* HAVE_ALLOCA_H */
#endif /* __GNUC__ */
-#ifdef HAVE_DL_ITERATE_PHDR
-# ifndef _GNU_SOURCE
-# define _GNU_SOURCE
-# endif
-# include <link.h>
+#ifdef HAVE_DLADDR
+# include <dlfcn.h>
#endif
#define DW_LNS_copy 0x01
@@ -88,6 +85,13 @@ void *alloca();
# define ElfW(x) Elf32##_##x
# endif
#endif
+#ifndef ELF_ST_TYPE
+# if SIZEOF_VOIDP == 8
+# define ELF_ST_TYPE ELF64_ST_TYPE
+# else
+# define ELF_ST_TYPE ELF32_ST_TYPE
+# endif
+#endif
#ifndef PATH_MAX
#define PATH_MAX 4096
#endif
@@ -97,13 +101,22 @@ int kprintf(const char *fmt, ...);
typedef struct {
const char *dirname;
const char *filename;
+ const char *path; /* object path */
int line;
+ uintptr_t base_addr;
+ uintptr_t saddr;
+ const char *sname; /* function name */
+} line_info_t;
+typedef struct obj_info obj_info_t;
+struct obj_info {
+ const char *path; /* object path */
int fd;
void *mapped;
size_t mapped_size;
- unsigned long base_addr;
-} line_info_t;
+ uintptr_t base_addr;
+ obj_info_t *next;
+};
/* Avoid consuming stack as this module may be used from signal handler */
static char binary_filename[PATH_MAX];
@@ -196,34 +209,15 @@ fill_filename(int file, char *include_directories, char *filenames,
}
}
-static int
-get_path_from_symbol(const char *symbol, const char **p, size_t *len)
-{
- if (symbol[0] == '0') {
- /* libexecinfo */
- *p = strchr(symbol, '/');
- if (*p == NULL) return 0;
- *len = strlen(*p);
- }
- else {
- /* glibc */
- const char *q;
- *p = symbol;
- q = strchr(symbol, '(');
- if (q == NULL) return 0;
- *len = q - symbol;
- }
- return 1;
-}
-
static void
-fill_line(int num_traces, void **traces,
- unsigned long addr, int file, int line,
- char *include_directories, char *filenames, line_info_t *lines)
+fill_line(int num_traces, void **traces, uintptr_t addr, int file, int line,
+ char *include_directories, char *filenames,
+ obj_info_t *obj, line_info_t *lines, int offset)
{
int i;
- for (i = 0; i < num_traces; i++) {
- unsigned long a = (unsigned long)traces[i] - lines[i].base_addr;
+ addr += obj->base_addr;
+ for (i = offset; i < num_traces; i++) {
+ uintptr_t a = (uintptr_t)traces[i];
/* We assume one line code doesn't result >100 bytes of native code.
We may want more reliable way eventually... */
if (addr < a && a < addr + 100) {
@@ -234,8 +228,8 @@ fill_line(int num_traces, void **traces,
}
static void
-parse_debug_line_cu(int num_traces, void **traces,
- char **debug_line, line_info_t *lines)
+parse_debug_line_cu(int num_traces, void **traces, char **debug_line,
+ obj_info_t *obj, line_info_t *lines, int offset)
{
char *p, *cu_end, *cu_start, *include_directories, *filenames;
unsigned long unit_length;
@@ -281,7 +275,7 @@ parse_debug_line_cu(int num_traces, void **traces,
is_stmt = default_is_stmt = *(unsigned char *)p;
p++;
- line_base = *(char *)p;
+ line_base = *(signed char *)p;
p++;
line_range = *(unsigned char *)p;
@@ -309,7 +303,8 @@ parse_debug_line_cu(int num_traces, void **traces,
#define FILL_LINE() \
do { \
fill_line(num_traces, traces, addr, file, line, \
- include_directories, filenames, lines); \
+ include_directories, filenames, \
+ obj, lines, offset); \
/*basic_block = prologue_end = epilogue_begin = 0;*/ \
} while (0)
@@ -408,11 +403,12 @@ parse_debug_line_cu(int num_traces, void **traces,
static void
parse_debug_line(int num_traces, void **traces,
- char *debug_line, unsigned long size, line_info_t *lines)
+ char *debug_line, unsigned long size,
+ obj_info_t *obj, line_info_t *lines, int offset)
{
char *debug_line_end = debug_line + size;
while (debug_line < debug_line_end) {
- parse_debug_line_cu(num_traces, traces, &debug_line, lines);
+ parse_debug_line_cu(num_traces, traces, &debug_line, obj, lines, offset);
}
if (debug_line != debug_line_end) {
kprintf("Unexpected size of .debug_line in %s\n",
@@ -421,19 +417,27 @@ parse_debug_line(int num_traces, void **traces,
}
/* read file and fill lines */
+static uintptr_t
+fill_lines(int num_traces, void **traces, int check_debuglink,
+ obj_info_t **objp, line_info_t *lines, int offset);
+
static void
-fill_lines(int num_traces, void **traces, char **syms, int check_debuglink,
- line_info_t *current_line, line_info_t *lines);
+append_obj(obj_info_t **objp) {
+ obj_info_t *newobj = calloc(1, sizeof(obj_info_t));
+ if (*objp) (*objp)->next = newobj;
+ *objp = newobj;
+}
static void
-follow_debuglink(char *debuglink, int num_traces, void **traces, char **syms,
- line_info_t *current_line, line_info_t *lines)
+follow_debuglink(char *debuglink, int num_traces, void **traces,
+ obj_info_t **objp, line_info_t *lines, int offset)
{
/* Ideally we should check 4 paths to follow gnu_debuglink,
but we handle only one case for now as this format is used
by some linux distributions. See GDB's info for detail. */
static const char global_debug_dir[] = "/usr/lib/debug";
char *p, *subdir;
+ obj_info_t *o1 = *objp, *o2;
p = strrchr(binary_filename, '/');
if (!p) {
@@ -444,22 +448,22 @@ follow_debuglink(char *debuglink, int num_traces, void **traces, char **syms,
subdir = (char *)alloca(strlen(binary_filename) + 1);
strcpy(subdir, binary_filename);
strcpy(binary_filename, global_debug_dir);
- strncat(binary_filename, subdir,
- PATH_MAX - strlen(binary_filename) - 1);
- strncat(binary_filename, debuglink,
- PATH_MAX - strlen(binary_filename) - 1);
-
- munmap(current_line->mapped, current_line->mapped_size);
- close(current_line->fd);
- fill_lines(num_traces, traces, syms, 0, current_line, lines);
+ strlcat(binary_filename, subdir, PATH_MAX);
+ strlcat(binary_filename, debuglink, PATH_MAX);
+
+ append_obj(objp);
+ o2 = *objp;
+ o2->base_addr = o1->base_addr;
+ o2->path = o1->path;
+ fill_lines(num_traces, traces, 0, objp, lines, offset);
}
/* read file and fill lines */
-static void
-fill_lines(int num_traces, void **traces, char **syms, int check_debuglink,
- line_info_t *current_line, line_info_t *lines)
+static uintptr_t
+fill_lines(int num_traces, void **traces, int check_debuglink,
+ obj_info_t **objp, line_info_t *lines, int offset)
{
- int i;
+ int i, j;
char *shstr;
char *section_name;
ElfW(Ehdr) *ehdr;
@@ -468,23 +472,27 @@ fill_lines(int num_traces, void **traces, char **syms, int check_debuglink,
int fd;
off_t filesize;
char *file;
+ ElfW(Shdr) *symtab_shdr = NULL, *strtab_shdr = NULL;
+ ElfW(Shdr) *dynsym_shdr = NULL, *dynstr_shdr = NULL;
+ obj_info_t *obj = *objp;
+ uintptr_t dladdr_fbase = 0;
fd = open(binary_filename, O_RDONLY);
if (fd < 0) {
- return;
+ goto fail;
}
filesize = lseek(fd, 0, SEEK_END);
if (filesize < 0) {
int e = errno;
close(fd);
kprintf("lseek: %s\n", strerror(e));
- return;
+ goto fail;
}
#if SIZEOF_OFF_T > SIZEOF_SIZE_T
if (filesize > (off_t)SIZE_MAX) {
close(fd);
kprintf("Too large file %s\n", binary_filename);
- return;
+ goto fail;
}
#endif
lseek(fd, 0, SEEK_SET);
@@ -494,7 +502,7 @@ fill_lines(int num_traces, void **traces, char **syms, int check_debuglink,
int e = errno;
close(fd);
kprintf("mmap: %s\n", strerror(e));
- return;
+ goto fail;
}
ehdr = (ElfW(Ehdr) *)file;
@@ -504,21 +512,12 @@ fill_lines(int num_traces, void **traces, char **syms, int check_debuglink,
* it match non-elf file.
*/
close(fd);
- return;
+ goto fail;
}
- current_line->fd = fd;
- current_line->mapped = file;
- current_line->mapped_size = (size_t)filesize;
-
- for (i = 0; i < num_traces; i++) {
- const char *path;
- size_t len;
- if (get_path_from_symbol(syms[i], &path, &len) &&
- !strncmp(path, binary_filename, len)) {
- lines[i].line = -1;
- }
- }
+ obj->fd = fd;
+ obj->mapped = file;
+ obj->mapped_size = (size_t)filesize;
shdr = (ElfW(Shdr) *)(file + ehdr->e_shoff);
@@ -527,11 +526,88 @@ fill_lines(int num_traces, void **traces, char **syms, int check_debuglink,
for (i = 0; i < ehdr->e_shnum; i++) {
section_name = shstr + shdr[i].sh_name;
- if (!strcmp(section_name, ".debug_line")) {
- debug_line_shdr = shdr + i;
+ switch (shdr[i].sh_type) {
+ case SHT_STRTAB:
+ if (!strcmp(section_name, ".strtab")) {
+ strtab_shdr = shdr + i;
+ }
+ else if (!strcmp(section_name, ".dynstr")) {
+ dynstr_shdr = shdr + i;
+ }
+ break;
+ case SHT_SYMTAB:
+ /* if (!strcmp(section_name, ".symtab")) */
+ symtab_shdr = shdr + i;
+ break;
+ case SHT_DYNSYM:
+ /* if (!strcmp(section_name, ".dynsym")) */
+ dynsym_shdr = shdr + i;
break;
- } else if (!strcmp(section_name, ".gnu_debuglink")) {
- gnu_debuglink_shdr = shdr + i;
+ case SHT_PROGBITS:
+ if (!strcmp(section_name, ".debug_line")) {
+ debug_line_shdr = shdr + i;
+ }
+ else if (!strcmp(section_name, ".gnu_debuglink")) {
+ gnu_debuglink_shdr = shdr + i;
+ }
+ break;
+ }
+ }
+
+ if (offset == -1) {
+ /* main executable */
+ offset = 0;
+ if (dynsym_shdr && dynstr_shdr) {
+ char *strtab = file + dynstr_shdr->sh_offset;
+ ElfW(Sym) *symtab = (ElfW(Sym) *)(file + dynsym_shdr->sh_offset);
+ int symtab_count = (int)(dynsym_shdr->sh_size / sizeof(ElfW(Sym)));
+ for (j = 0; j < symtab_count; j++) {
+ ElfW(Sym) *sym = &symtab[j];
+ Dl_info info;
+ void *h, *s;
+ if (ELF_ST_TYPE(sym->st_info) != STT_FUNC || sym->st_size <= 0) continue;
+ h = dlopen(NULL, RTLD_NOW|RTLD_LOCAL);
+ if (!h) continue;
+ s = dlsym(h, strtab + sym->st_name);
+ if (!s) continue;
+ if (dladdr(s, &info)) {
+ dladdr_fbase = (uintptr_t)info.dli_fbase;
+ break;
+ }
+ }
+ if (ehdr->e_type == ET_EXEC) {
+ obj->base_addr = 0;
+ }
+ else {
+ /* PIE (position-independent executable) */
+ obj->base_addr = dladdr_fbase;
+ }
+ }
+ }
+
+ if (!symtab_shdr) {
+ symtab_shdr = dynsym_shdr;
+ strtab_shdr = dynstr_shdr;
+ }
+
+ if (symtab_shdr && strtab_shdr) {
+ char *strtab = file + strtab_shdr->sh_offset;
+ ElfW(Sym) *symtab = (ElfW(Sym) *)(file + symtab_shdr->sh_offset);
+ int symtab_count = (int)(symtab_shdr->sh_size / sizeof(ElfW(Sym)));
+ for (j = 0; j < symtab_count; j++) {
+ ElfW(Sym) *sym = &symtab[j];
+ uintptr_t saddr = (uintptr_t)sym->st_value + obj->base_addr;
+ if (ELF_ST_TYPE(sym->st_info) != STT_FUNC || sym->st_size <= 0) continue;
+ for (i = offset; i < num_traces; i++) {
+ uintptr_t d = (uintptr_t)traces[i] - saddr;
+ if (lines[i].line > 0 || d <= 0 || d > (uintptr_t)sym->st_size)
+ continue;
+ /* fill symbol name and addr from .symtab */
+ lines[i].sname = strtab + sym->st_name;
+ lines[i].saddr = saddr;
+ lines[i].path = obj->path;
+ lines[i].base_addr = obj->base_addr;
+ }
}
}
@@ -540,111 +616,161 @@ fill_lines(int num_traces, void **traces, char **syms, int check_debuglink,
let's check .gnu_debuglink section instead. */
if (gnu_debuglink_shdr && check_debuglink) {
follow_debuglink(file + gnu_debuglink_shdr->sh_offset,
- num_traces, traces, syms,
- current_line, lines);
+ num_traces, traces,
+ objp, lines, offset);
}
- return;
+ goto finish;
}
parse_debug_line(num_traces, traces,
file + debug_line_shdr->sh_offset,
debug_line_shdr->sh_size,
- lines);
+ obj, lines, offset);
+finish:
+ return dladdr_fbase;
+fail:
+ return (uintptr_t)-1;
}
-#ifdef HAVE_DL_ITERATE_PHDR
-
-typedef struct {
- int num_traces;
- char **syms;
- line_info_t *lines;
-} fill_base_addr_state_t;
-
-static int
-fill_base_addr(struct dl_phdr_info *info, size_t size, void *data)
+#define HAVE_MAIN_EXE_PATH
+#if defined(__FreeBSD__)
+# include <sys/sysctl.h>
+#endif
+/* ssize_t main_exe_path(void)
+ *
+ * store the path of the main executable to `binary_filename`,
+ * and returns strlen(binary_filename).
+ * it is NUL terminated.
+ */
+#if defined(__linux__)
+ssize_t
+main_exe_path(void)
{
- int i;
- fill_base_addr_state_t *st = (fill_base_addr_state_t *)data;
- for (i = 0; i < st->num_traces; i++) {
- const char *path;
- size_t len;
- size_t name_len = strlen(info->dlpi_name);
-
- if (get_path_from_symbol(st->syms[i], &path, &len) &&
- (len == name_len || (len > name_len && path[len-name_len-1] == '/')) &&
- !strncmp(path+len-name_len, info->dlpi_name, name_len)) {
- st->lines[i].base_addr = info->dlpi_addr;
- }
+# define PROC_SELF_EXE "/proc/self/exe"
+ ssize_t len = readlink(PROC_SELF_EXE, binary_filename, PATH_MAX);
+ binary_filename[len] = 0;
+ return len;
+}
+#elif defined(__FreeBSD__)
+ssize_t
+main_exe_path(void)
+{
+ int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1};
+ size_t len = PATH_MAX;
+ int err = sysctl(mib, 4, binary_filename, &len, NULL, 0);
+ if (err) {
+ kprintf("Can't get the path of ruby");
+ return -1;
}
- return 0;
+ len--; /* sysctl sets strlen+1 */
+ return len;
}
-
-#endif /* HAVE_DL_ITERATE_PHDR */
+#else
+#undef HAVE_MAIN_EXE_PATH
+#endif
void
-rb_dump_backtrace_with_lines(int num_traces, void **trace, char **syms)
+rb_dump_backtrace_with_lines(int num_traces, void **traces)
{
int i;
/* async-signal unsafe */
- line_info_t *lines = (line_info_t *)calloc(num_traces,
- sizeof(line_info_t));
-
- /* Note that line info of shared objects might not be shown
- if we don't have dl_iterate_phdr */
-#ifdef HAVE_DL_ITERATE_PHDR
- fill_base_addr_state_t fill_base_addr_state;
-
- fill_base_addr_state.num_traces = num_traces;
- fill_base_addr_state.syms = syms;
- fill_base_addr_state.lines = lines;
- /* maybe async-signal unsafe */
- dl_iterate_phdr(fill_base_addr, &fill_base_addr_state);
-#endif /* HAVE_DL_ITERATE_PHDR */
-
- for (i = 0; i < num_traces; i++) {
- const char *path;
- size_t len;
- if (lines[i].line) {
- continue;
- }
-
- if (!get_path_from_symbol(syms[i], &path, &len)) {
- continue;
+ line_info_t *lines = (line_info_t *)calloc(num_traces, sizeof(line_info_t));
+ obj_info_t *obj = NULL;
+ /* 2 is NULL + main executable */
+ void **dladdr_fbases = (void **)calloc(num_traces+2, sizeof(void *));
+#ifdef HAVE_MAIN_EXE_PATH
+ char *main_path = NULL; /* used on printing backtrace */
+ ssize_t len;
+ if ((len = main_exe_path()) > 0) {
+ main_path = (char *)alloca(len + 1);
+ if (main_path) {
+ uintptr_t addr;
+ memcpy(main_path, binary_filename, len+1);
+ append_obj(&obj);
+ obj->path = main_path;
+ addr = fill_lines(num_traces, traces, 1, &obj, lines, -1);
+ if (addr != (uintptr_t)-1) {
+ dladdr_fbases[0] = (void *)addr;
+ }
}
-
- strncpy(binary_filename, path, len);
- binary_filename[len] = '\0';
-
- fill_lines(num_traces, trace, syms, 1, &lines[i], lines);
}
+#endif
+ /* fill source lines by reading dwarf */
for (i = 0; i < num_traces; i++) {
- line_info_t *line = &lines[i];
-
- if (line->line > 0) {
- if (line->filename) {
- if (line->dirname && line->dirname[0]) {
- kprintf("%s %s/%s:%d\n", syms[i], line->dirname, line->filename, line->line);
+ Dl_info info;
+ if (lines[i].line) continue;
+ if (dladdr(traces[i], &info)) {
+ const char *path;
+ void **p;
+
+ /* skip symbols which is in already checked objects */
+ /* if the binary is strip-ed, this may effect */
+ for (p=dladdr_fbases; *p; p++) {
+ if (*p == info.dli_fbase) {
+ lines[i].path = info.dli_fname;
+ lines[i].sname = info.dli_sname;
+ goto next_line;
}
- else {
- kprintf("%s %s:%d\n", syms[i], line->filename, line->line);
- }
- } else {
- kprintf("%s ???:%d\n", syms[i], line->line);
}
- } else {
- kprintf("%s\n", syms[i]);
+ *p = info.dli_fbase;
+
+ append_obj(&obj);
+ obj->base_addr = (uintptr_t)info.dli_fbase;
+ path = info.dli_fname;
+ obj->path = path;
+ lines[i].path = path;
+ strcpy(binary_filename, path);
+ fill_lines(num_traces, traces, 1, &obj, lines, i);
}
+next_line:
+ continue;
}
+ /* output */
for (i = 0; i < num_traces; i++) {
line_info_t *line = &lines[i];
- if (line->fd) {
- munmap(line->mapped, line->mapped_size);
- close(line->fd);
+ uintptr_t addr = (uintptr_t)traces[i];
+ uintptr_t d = addr - line->saddr;
+ if (!line->path) {
+ kprintf("[0x%lx]\n", addr);
+ }
+ else if (!line->saddr || !line->sname) {
+ kprintf("%s [0x%lx]\n", line->path, addr);
+ }
+ else if (line->line <= 0) {
+ kprintf("%s(%s+0x%lx) [0x%lx]\n", line->path, line->sname,
+ d, addr);
+ }
+ else if (!line->filename) {
+ kprintf("%s(%s+0x%lx) [0x%lx] ???:%d\n", line->path, line->sname,
+ d, addr, line->line);
+ }
+ else if (line->dirname && line->dirname[0]) {
+ kprintf("%s(%s+0x%lx) [0x%lx] %s/%s:%d\n", line->path, line->sname,
+ d, addr, line->dirname, line->filename, line->line);
+ }
+ else {
+ kprintf("%s(%s+0x%lx) [0x%lx] %s:%d\n", line->path, line->sname,
+ d, addr, line->filename, line->line);
+ }
+ /* FreeBSD's backtrace may show _start and so on */
+ if (line->sname && strcmp("main", line->sname) == 0)
+ break;
+ }
+
+ /* free */
+ while (obj) {
+ obj_info_t *o = obj;
+ obj = o->next;
+ if (o->fd) {
+ munmap(o->mapped, o->mapped_size);
+ close(o->fd);
}
+ free(o);
}
free(lines);
+ free(dladdr_fbases);
}
/* From FreeBSD's lib/libstand/printf.c */
diff --git a/addr2line.h b/addr2line.h
index 3782d89e07..d99f010934 100644
--- a/addr2line.h
+++ b/addr2line.h
@@ -14,7 +14,7 @@
#ifdef USE_ELF
void
-rb_dump_backtrace_with_lines(int num_traces, void **traces, char **syms);
+rb_dump_backtrace_with_lines(int num_traces, void **traces);
#endif /* USE_ELF */
diff --git a/array.c b/array.c
index ff77a3ed94..de81ee7fab 100644
--- a/array.c
+++ b/array.c
@@ -11,11 +11,9 @@
**********************************************************************/
-#include "ruby/ruby.h"
+#include "internal.h"
#include "ruby/util.h"
#include "ruby/st.h"
-#include "ruby/encoding.h"
-#include "internal.h"
#include "probes.h"
#include "id.h"
@@ -31,70 +29,6 @@ static ID id_cmp, id_div, id_power;
#define ARY_DEFAULT_SIZE 16
#define ARY_MAX_SIZE (LONG_MAX / (int)sizeof(VALUE))
-void
-rb_mem_clear(register VALUE *mem, register long size)
-{
- while (size--) {
- *mem++ = Qnil;
- }
-}
-
-static void
-ary_mem_clear(VALUE ary, long beg, long size)
-{
- RARRAY_PTR_USE(ary, ptr, {
- rb_mem_clear(ptr + beg, size);
- });
-}
-
-static inline void
-memfill(register VALUE *mem, register long size, register VALUE val)
-{
- while (size--) {
- *mem++ = val;
- }
-}
-
-static void
-ary_memfill(VALUE ary, long beg, long size, VALUE val)
-{
- RARRAY_PTR_USE(ary, ptr, {
- memfill(ptr + beg, size, val);
- RB_OBJ_WRITTEN(ary, Qundef, val);
- });
-}
-
-static void
-ary_memcpy(VALUE ary, long beg, long argc, const VALUE *argv)
-{
-#if 1
- if (OBJ_PROMOTED(ary)) {
- if (argc > (int)(128/sizeof(VALUE)) /* is magic number (cache line size) */) {
- rb_gc_writebarrier_remember_promoted(ary);
- RARRAY_PTR_USE(ary, ptr, {
- MEMCPY(ptr+beg, argv, VALUE, argc);
- });
- }
- else {
- int i;
- RARRAY_PTR_USE(ary, ptr, {
- for (i=0; i<argc; i++) {
- RB_OBJ_WRITE(ary, &ptr[i+beg], argv[i]);
- }
- });
- }
- }
- else {
- RARRAY_PTR_USE(ary, ptr, {
- MEMCPY(ptr+beg, argv, VALUE, argc);
- });
- }
-#else
- /* giveup write barrier (traditional way) */
- MEMCPY(RARRAY_PTR(ary)+beg, argv, VALUE, argc);
-#endif
-}
-
# define ARY_SHARED_P(ary) \
(assert(!FL_TEST((ary), ELTS_SHARED) || !FL_TEST((ary), RARRAY_EMBED_FLAG)), \
FL_TEST((ary),ELTS_SHARED)!=0)
@@ -195,6 +129,74 @@ ary_memcpy(VALUE ary, long beg, long argc, const VALUE *argv)
FL_SET((ary), RARRAY_SHARED_ROOT_FLAG); \
} while (0)
+#define ARY_SET(a, i, v) RARRAY_ASET((assert(!ARY_SHARED_P(a)), (a)), (i), (v))
+
+void
+rb_mem_clear(register VALUE *mem, register long size)
+{
+ while (size--) {
+ *mem++ = Qnil;
+ }
+}
+
+static void
+ary_mem_clear(VALUE ary, long beg, long size)
+{
+ RARRAY_PTR_USE(ary, ptr, {
+ rb_mem_clear(ptr + beg, size);
+ });
+}
+
+static inline void
+memfill(register VALUE *mem, register long size, register VALUE val)
+{
+ while (size--) {
+ *mem++ = val;
+ }
+}
+
+static void
+ary_memfill(VALUE ary, long beg, long size, VALUE val)
+{
+ RARRAY_PTR_USE(ary, ptr, {
+ memfill(ptr + beg, size, val);
+ RB_OBJ_WRITTEN(ary, Qundef, val);
+ });
+}
+
+static void
+ary_memcpy0(VALUE ary, long beg, long argc, const VALUE *argv, VALUE buff_owner_ary)
+{
+#if 1
+ assert(!ARY_SHARED_P(buff_owner_ary));
+
+ if (argc > (int)(128/sizeof(VALUE)) /* is magic number (cache line size) */) {
+ rb_gc_writebarrier_remember(buff_owner_ary);
+ RARRAY_PTR_USE(ary, ptr, {
+ MEMCPY(ptr+beg, argv, VALUE, argc);
+ });
+ }
+ else {
+ int i;
+ RARRAY_PTR_USE(ary, ptr, {
+ for (i=0; i<argc; i++) {
+ RB_OBJ_WRITE(buff_owner_ary, &ptr[i+beg], argv[i]);
+ }
+ });
+ }
+#else
+ /* giveup write barrier (traditional way) */
+ RARRAY_PTR(buff_owner_ary);
+ MEMCPY(RARRAY_PTR(ary)+beg, argv, VALUE, argc);
+#endif
+}
+
+static void
+ary_memcpy(VALUE ary, long beg, long argc, const VALUE *argv)
+{
+ ary_memcpy0(ary, beg, argc, argv, ary);
+}
+
static void
ary_resize_capa(VALUE ary, long capacity)
{
@@ -343,21 +345,28 @@ rb_ary_modify(VALUE ary)
ARY_SET_CAPA(ary, len);
ARY_SET_PTR(ary, ptr);
}
+
+ rb_gc_writebarrier_remember(ary);
}
}
-static void
+static VALUE
ary_ensure_room_for_push(VALUE ary, long add_len)
{
- long new_len = RARRAY_LEN(ary) + add_len;
+ long old_len = RARRAY_LEN(ary);
+ long new_len = old_len + add_len;
long capa;
+ if (old_len > ARY_MAX_SIZE - add_len) {
+ rb_raise(rb_eIndexError, "index %ld too big", new_len);
+ }
if (ARY_SHARED_P(ary)) {
if (new_len > RARRAY_EMBED_LEN_MAX) {
VALUE shared = ARY_SHARED(ary);
if (ARY_SHARED_OCCUPIED(shared)) {
if (RARRAY_CONST_PTR(ary) - RARRAY_CONST_PTR(shared) + new_len <= RARRAY_LEN(shared)) {
rb_ary_modify_check(ary);
+ return shared;
}
else {
/* if array is shared, then it is likely it participate in push/shift pattern */
@@ -366,8 +375,8 @@ ary_ensure_room_for_push(VALUE ary, long add_len)
if (new_len > capa - (capa >> 6)) {
ary_double_capa(ary, new_len);
}
+ return ary;
}
- return;
}
}
}
@@ -376,6 +385,8 @@ ary_ensure_room_for_push(VALUE ary, long add_len)
if (new_len > capa) {
ary_double_capa(ary, new_len);
}
+
+ return ary;
}
/*
@@ -442,10 +453,7 @@ ary_alloc(VALUE klass)
static VALUE
empty_ary_alloc(VALUE klass)
{
- if (RUBY_DTRACE_ARRAY_CREATE_ENABLED()) {
- RUBY_DTRACE_ARRAY_CREATE(0, rb_sourcefile(), rb_sourceline());
- }
-
+ RUBY_DTRACE_CREATE_HOOK(ARRAY, 0);
return ary_alloc(klass);
}
@@ -461,21 +469,16 @@ ary_new(VALUE klass, long capa)
rb_raise(rb_eArgError, "array size too big");
}
- if (RUBY_DTRACE_ARRAY_CREATE_ENABLED()) {
- RUBY_DTRACE_ARRAY_CREATE(capa, rb_sourcefile(), rb_sourceline());
- }
+ RUBY_DTRACE_CREATE_HOOK(ARRAY, capa);
+ ary = ary_alloc(klass);
if (capa > RARRAY_EMBED_LEN_MAX) {
ptr = ALLOC_N(VALUE, capa);
- ary = ary_alloc(klass);
FL_UNSET_EMBED(ary);
ARY_SET_PTR(ary, ptr);
ARY_SET_CAPA(ary, capa);
ARY_SET_HEAP_LEN(ary, 0);
}
- else {
- ary = ary_alloc(klass);
- }
return ary;
}
@@ -493,7 +496,7 @@ rb_ary_new(void)
}
VALUE
-rb_ary_new_from_args(long n, ...)
+(rb_ary_new_from_args)(long n, ...)
{
va_list ar;
VALUE ary;
@@ -503,7 +506,7 @@ rb_ary_new_from_args(long n, ...)
va_start(ar, n);
for (i=0; i<n; i++) {
- RARRAY_ASET(ary, i, va_arg(ar, VALUE));
+ ARY_SET(ary, i, va_arg(ar, VALUE));
}
va_end(ar);
@@ -531,6 +534,15 @@ rb_ary_tmp_new(long capa)
return ary_new(0, capa);
}
+VALUE
+rb_ary_tmp_new_fill(long capa)
+{
+ VALUE ary = ary_new(0, capa);
+ ary_memfill(ary, 0, capa, Qnil);
+ ARY_SET_LEN(ary, capa);
+ return ary;
+}
+
void
rb_ary_free(VALUE ary)
{
@@ -576,7 +588,7 @@ ary_make_shared(VALUE ary)
}
else {
long capa = ARY_CAPA(ary), len = RARRAY_LEN(ary);
- NEWOBJ_OF(shared, struct RArray, 0, T_ARRAY); /* keep shared ary as non-WB-protected */
+ NEWOBJ_OF(shared, struct RArray, 0, T_ARRAY | (RGENGC_WB_PROTECTED_ARRAY ? FL_WB_PROTECTED : 0));
FL_UNSET_EMBED(shared);
ARY_SET_LEN((VALUE)shared, capa);
@@ -652,16 +664,16 @@ rb_ary_s_try_convert(VALUE dummy, VALUE ary)
/*
* call-seq:
- * Array.new(size=0, obj=nil)
+ * Array.new(size=0, default=nil)
* Array.new(array)
* Array.new(size) {|index| block }
*
* Returns a new array.
*
* In the first form, if no arguments are sent, the new array will be empty.
- * When a +size+ and an optional +obj+ are sent, an array is created with
- * +size+ copies of +obj+. Take notice that all elements will reference the
- * same object +obj+.
+ * When a +size+ and an optional +default+ are sent, an array is created with
+ * +size+ copies of +default+. Take notice that all elements will reference the
+ * same object +default+.
*
* The second form creates a copy of the array passed as a parameter (the
* array is generated by calling to_ary on the parameter).
@@ -735,12 +747,14 @@ rb_ary_initialize(int argc, VALUE *argv, VALUE ary)
}
len = NUM2LONG(size);
+ /* NUM2LONG() may call size.to_int, ary can be frozen, modified, etc */
if (len < 0) {
rb_raise(rb_eArgError, "negative array size");
}
if (len > ARY_MAX_SIZE) {
rb_raise(rb_eArgError, "array size too big");
}
+ /* recheck after argument conversion */
rb_ary_modify(ary);
ary_resize_capa(ary, len);
if (rb_block_given_p()) {
@@ -808,7 +822,7 @@ rb_ary_store(VALUE ary, long idx, VALUE val)
if (idx >= len) {
ARY_SET_LEN(ary, idx + 1);
}
- RARRAY_ASET(ary, idx, val);
+ ARY_SET(ary, idx, val);
}
static VALUE
@@ -852,7 +866,7 @@ enum ary_take_pos_flags
};
static VALUE
-ary_take_first_or_last(int argc, VALUE *argv, VALUE ary, enum ary_take_pos_flags last)
+ary_take_first_or_last(int argc, const VALUE *argv, VALUE ary, enum ary_take_pos_flags last)
{
VALUE nv;
long n;
@@ -891,33 +905,20 @@ VALUE
rb_ary_push(VALUE ary, VALUE item)
{
long idx = RARRAY_LEN(ary);
-
- ary_ensure_room_for_push(ary, 1);
- RARRAY_ASET(ary, idx, item);
- ARY_SET_LEN(ary, idx + 1);
- return ary;
-}
-
-static VALUE
-rb_ary_push_1(VALUE ary, VALUE item)
-{
- long idx = RARRAY_LEN(ary);
-
- if (idx >= ARY_CAPA(ary)) {
- ary_double_capa(ary, idx);
- }
- RARRAY_ASET(ary, idx, item);
+ VALUE target_ary = ary_ensure_room_for_push(ary, 1);
+ RARRAY_PTR_USE(ary, ptr, {
+ RB_OBJ_WRITE(target_ary, &ptr[idx], item);
+ });
ARY_SET_LEN(ary, idx + 1);
return ary;
}
VALUE
-rb_ary_cat(VALUE ary, const VALUE *ptr, long len)
+rb_ary_cat(VALUE ary, const VALUE *argv, long len)
{
long oldlen = RARRAY_LEN(ary);
-
- ary_ensure_room_for_push(ary, len);
- ary_memcpy(ary, oldlen, len, ptr);
+ VALUE target_ary = ary_ensure_room_for_push(ary, len);
+ ary_memcpy0(ary, oldlen, len, argv, target_ary);
ARY_SET_LEN(ary, oldlen + len);
return ary;
}
@@ -1014,11 +1015,11 @@ rb_ary_shift(VALUE ary)
}
assert(!ARY_EMBED_P(ary)); /* ARY_EMBED_LEN_MAX < ARY_DEFAULT_SIZE */
- RARRAY_ASET(ary, 0, Qnil);
+ ARY_SET(ary, 0, Qnil);
ary_make_shared(ary);
}
else if (ARY_SHARED_OCCUPIED(ARY_SHARED(ary))) {
- RARRAY_ASET(ary, 0, Qnil);
+ RARRAY_PTR_USE(ary, ptr, ptr[0] = Qnil);
}
ARY_INCREASE_PTR(ary, 1); /* shift ptr */
ARY_INCREASE_LEN(ary, -1);
@@ -1064,21 +1065,28 @@ rb_ary_shift_m(int argc, VALUE *argv, VALUE ary)
n = RARRAY_LEN(result);
if (ARY_SHARED_P(ary)) {
if (ARY_SHARED_OCCUPIED(ARY_SHARED(ary))) {
+ setup_occupied_shared:
ary_mem_clear(ary, 0, n);
}
ARY_INCREASE_PTR(ary, n);
}
else {
- RARRAY_PTR_USE(ary, ptr, {
- MEMMOVE(ptr, ptr + n, VALUE, RARRAY_LEN(ary)-n);
- }); /* WB: no new reference */
+ if (RARRAY_LEN(ary) < ARY_DEFAULT_SIZE) {
+ RARRAY_PTR_USE(ary, ptr, {
+ MEMMOVE(ptr, ptr+n, VALUE, RARRAY_LEN(ary)-n);
+ }); /* WB: no new reference */
+ }
+ else {
+ ary_make_shared(ary);
+ goto setup_occupied_shared;
+ }
}
ARY_INCREASE_LEN(ary, -n);
return result;
}
-static void
+static VALUE
ary_ensure_room_for_unshift(VALUE ary, int argc)
{
long len = RARRAY_LEN(ary);
@@ -1086,6 +1094,10 @@ ary_ensure_room_for_unshift(VALUE ary, int argc)
long capa;
const VALUE *head, *sharedp;
+ if (len > ARY_MAX_SIZE - argc) {
+ rb_raise(rb_eIndexError, "index %ld too big", new_len);
+ }
+
if (ARY_SHARED_P(ary)) {
VALUE shared = ARY_SHARED(ary);
capa = RARRAY_LEN(shared);
@@ -1120,12 +1132,16 @@ ary_ensure_room_for_unshift(VALUE ary, int argc)
head = sharedp + argc + room;
}
ARY_SET_PTR(ary, head - argc);
+ assert(ARY_SHARED_OCCUPIED(ARY_SHARED(ary)));
+ return ARY_SHARED(ary);
}
else {
/* sliding items */
RARRAY_PTR_USE(ary, ptr, {
MEMMOVE(ptr + argc, ptr, VALUE, len);
});
+
+ return ary;
}
}
@@ -1145,14 +1161,15 @@ static VALUE
rb_ary_unshift_m(int argc, VALUE *argv, VALUE ary)
{
long len = RARRAY_LEN(ary);
+ VALUE target_ary;
if (argc == 0) {
rb_ary_modify_check(ary);
return ary;
}
- ary_ensure_room_for_unshift(ary, argc);
- ary_memcpy(ary, 0, argc, argv);
+ target_ary = ary_ensure_room_for_unshift(ary, argc);
+ ary_memcpy0(ary, 0, argc, argv, target_ary);
ARY_SET_LEN(ary, len + argc);
return ary;
}
@@ -1239,7 +1256,7 @@ rb_ary_subseq(VALUE ary, long beg, long len)
*/
VALUE
-rb_ary_aref(int argc, VALUE *argv, VALUE ary)
+rb_ary_aref(int argc, const VALUE *argv, VALUE ary)
{
VALUE arg;
long beg, len;
@@ -1285,7 +1302,7 @@ rb_ary_aref(int argc, VALUE *argv, VALUE ary)
* a.at(-1) #=> "e"
*/
-static VALUE
+VALUE
rb_ary_at(VALUE ary, VALUE pos)
{
return rb_ary_entry(ary, NUM2LONG(pos));
@@ -1334,7 +1351,7 @@ rb_ary_first(int argc, VALUE *argv, VALUE ary)
*/
VALUE
-rb_ary_last(int argc, VALUE *argv, VALUE ary)
+rb_ary_last(int argc, const VALUE *argv, VALUE ary)
{
if (argc == 0) {
long len = RARRAY_LEN(ary);
@@ -1563,20 +1580,24 @@ rb_ary_splice(VALUE ary, long beg, long len, VALUE rpl)
olen = RARRAY_LEN(ary); /* ary may be resized in rpl.to_ary too */
}
if (beg >= olen) {
+ VALUE target_ary;
if (beg > ARY_MAX_SIZE - rlen) {
rb_raise(rb_eIndexError, "index %ld too big", beg);
}
- ary_ensure_room_for_push(ary, rlen-len); /* len is 0 or negative */
+ target_ary = ary_ensure_room_for_push(ary, rlen-len); /* len is 0 or negative */
len = beg + rlen;
ary_mem_clear(ary, olen, beg - olen);
if (rlen > 0) {
- ary_memcpy(ary, beg, rlen, RARRAY_CONST_PTR(rpl));
+ ary_memcpy0(ary, beg, rlen, RARRAY_CONST_PTR(rpl), target_ary);
}
ARY_SET_LEN(ary, len);
}
else {
long alen;
+ if (olen - len > ARY_MAX_SIZE - rlen) {
+ rb_raise(rb_eIndexError, "index %ld too big", olen + rlen - len);
+ }
rb_ary_modify(ary);
alen = olen + rlen - len;
if (alen >= ARY_CAPA(ary)) {
@@ -1593,6 +1614,7 @@ rb_ary_splice(VALUE ary, long beg, long len, VALUE rpl)
MEMMOVE(RARRAY_PTR(ary) + beg, RARRAY_CONST_PTR(rpl), VALUE, rlen);
}
}
+ RB_GC_GUARD(rpl);
}
void
@@ -1728,7 +1750,9 @@ fixnum:
* Inserts the given values before the element with the given +index+.
*
* Negative indices count backwards from the end of the array, where +-1+ is
- * the last element.
+ * the last element. If a negative index is used, the given values will be
+ * inserted after that element, so using an index of +-1+ will insert the
+ * values at the end of the array.
*
* a = %w{ a b c d }
* a.insert(2, 99) #=> ["a", "b", 99, "c", "d"]
@@ -1742,8 +1766,8 @@ rb_ary_insert(int argc, VALUE *argv, VALUE ary)
rb_check_arity(argc, 1, UNLIMITED_ARGUMENTS);
rb_ary_modify_check(ary);
- if (argc == 1) return ary;
pos = NUM2LONG(argv[0]);
+ if (argc == 1) return ary;
if (pos == -1) {
pos = RARRAY_LEN(ary);
}
@@ -1769,9 +1793,9 @@ ary_enum_length(VALUE ary, VALUE args, VALUE eobj)
* ary.each -> Enumerator
*
* Calls the given block once for each element in +self+, passing that element
- * as a parameter.
+ * as a parameter. Returns the array itself.
*
- * An Enumerator is returned if no block is given.
+ * If no block is given, an Enumerator is returned.
*
* a = [ "a", "b", "c" ]
* a.each {|x| print x, " -- " }
@@ -1782,10 +1806,9 @@ ary_enum_length(VALUE ary, VALUE args, VALUE eobj)
*/
VALUE
-rb_ary_each(VALUE array)
+rb_ary_each(VALUE ary)
{
long i;
- volatile VALUE ary = array;
RETURN_SIZED_ENUMERATOR(ary, 0, 0, ary_enum_length);
for (i=0; i<RARRAY_LEN(ary); i++) {
@@ -2142,10 +2165,11 @@ rb_ary_to_h(VALUE ary)
long i;
VALUE hash = rb_hash_new();
for (i=0; i<RARRAY_LEN(ary); i++) {
- VALUE key_value_pair = rb_check_array_type(rb_ary_elt(ary, i));
+ const VALUE elt = rb_ary_elt(ary, i);
+ const VALUE key_value_pair = rb_check_array_type(elt);
if (NIL_P(key_value_pair)) {
- rb_raise(rb_eTypeError, "wrong element type %s at %ld (expected array)",
- rb_builtin_class_name(rb_ary_elt(ary, i)), i);
+ rb_raise(rb_eTypeError, "wrong element type %"PRIsVALUE" at %ld (expected array)",
+ rb_obj_class(elt), i);
}
if (RARRAY_LEN(key_value_pair) != 2) {
rb_raise(rb_eArgError, "wrong array length at %ld (expected 2, was %ld)",
@@ -2417,9 +2441,9 @@ sort_2(const void *ap, const void *bp, void *dummy)
* Comparisons for the sort will be done using the <code><=></code> operator
* or using an optional code block.
*
- * The block must implement a comparison between +a+ and +b+, and return
- * +-1+, when +a+ follows +b+, +0+ when +a+ and +b+ are equivalent, or ++1+
- * if +b+ follows +a+.
+ * The block must implement a comparison between +a+ and +b+ and return
+ * an integer less than 0 when +b+ follows +a+, +0+ when +a+ and +b+
+ * are equivalent, or an integer greater than 0 when +a+ follows +b+.
*
* See also Enumerable#sort_by.
*
@@ -2450,8 +2474,8 @@ rb_ary_sort_bang(VALUE ary)
if (ARY_EMBED_P(tmp)) {
if (ARY_SHARED_P(ary)) { /* ary might be destructively operated in the given block */
rb_ary_unshare(ary);
+ FL_SET_EMBED(ary);
}
- FL_SET_EMBED(ary);
ary_memcpy(ary, 0, ARY_EMBED_LEN(tmp), ARY_EMBED_PTR(tmp));
ARY_SET_LEN(ary, ARY_EMBED_LEN(tmp));
}
@@ -2498,9 +2522,9 @@ rb_ary_sort_bang(VALUE ary)
* Comparisons for the sort will be done using the <code><=></code> operator
* or using an optional code block.
*
- * The block must implement a comparison between +a+ and +b+, and return
- * +-1+, when +a+ follows +b+, +0+ when +a+ and +b+ are equivalent, or ++1+
- * if +b+ follows +a+.
+ * The block must implement a comparison between +a+ and +b+ and return
+ * an integer less than 0 when +b+ follows +a+, +0+ when +a+ and +b+
+ * are equivalent, or an integer greater than 0 when +a+ follows +b+.
*
*
* See also Enumerable#sort_by.
@@ -2518,6 +2542,8 @@ rb_ary_sort(VALUE ary)
return ary;
}
+static VALUE rb_ary_bsearch_index(VALUE ary);
+
/*
* call-seq:
* ary.bsearch {|x| block } -> elem
@@ -2574,6 +2600,30 @@ rb_ary_sort(VALUE ary)
static VALUE
rb_ary_bsearch(VALUE ary)
{
+ VALUE index_result = rb_ary_bsearch_index(ary);
+
+ if (FIXNUM_P(index_result)) {
+ return rb_ary_entry(ary, FIX2LONG(index_result));
+ }
+ return index_result;
+}
+
+/*
+ * call-seq:
+ * ary.bsearch_index {|x| block } -> int or nil
+ *
+ * By using binary search, finds an index of a value from this array which
+ * meets the given condition in O(log n) where n is the size of the array.
+ *
+ * It supports two modes, depending on the nature of the block and they are
+ * exactly the same as in the case of #bsearch method with the only difference
+ * being that this method returns the index of the element instead of the
+ * element itself. For more details consult the documentation for #bsearch.
+ */
+
+static VALUE
+rb_ary_bsearch_index(VALUE ary)
+{
long low = 0, high = RARRAY_LEN(ary), mid;
int smaller = 0, satisfied = 0;
VALUE v, val;
@@ -2584,8 +2634,8 @@ rb_ary_bsearch(VALUE ary)
val = rb_ary_entry(ary, mid);
v = rb_yield(val);
if (FIXNUM_P(v)) {
- if (FIX2INT(v) == 0) return val;
- smaller = FIX2INT(v) < 0;
+ if (v == INT2FIX(0)) return INT2FIX(mid);
+ smaller = (SIGNED_VALUE)v < 0; /* Fixnum preserves its sign-bit */
}
else if (v == Qtrue) {
satisfied = 1;
@@ -2596,16 +2646,16 @@ rb_ary_bsearch(VALUE ary)
}
else if (rb_obj_is_kind_of(v, rb_cNumeric)) {
const VALUE zero = INT2FIX(0);
- switch (rb_cmpint(rb_funcallv(v, id_cmp, 1, &zero), v, INT2FIX(0))) {
- case 0: return val;
- case 1: smaller = 1; break;
- case -1: smaller = 0;
+ switch (rb_cmpint(rb_funcallv(v, id_cmp, 1, &zero), v, zero)) {
+ case 0: return INT2FIX(mid);
+ case 1: smaller = 1; break;
+ case -1: smaller = 0;
}
}
else {
- rb_raise(rb_eTypeError, "wrong argument type %s"
- " (must be numeric, true, false or nil)",
- rb_obj_classname(v));
+ rb_raise(rb_eTypeError, "wrong argument type %"PRIsVALUE
+ " (must be numeric, true, false or nil)",
+ rb_obj_class(v));
}
if (smaller) {
high = mid;
@@ -2614,9 +2664,8 @@ rb_ary_bsearch(VALUE ary)
low = mid + 1;
}
}
- if (low == RARRAY_LEN(ary)) return Qnil;
if (!satisfied) return Qnil;
- return rb_ary_entry(ary, low);
+ return INT2FIX(low);
}
@@ -2667,9 +2716,9 @@ rb_ary_sort_by_bang(VALUE ary)
* If no block is given, an Enumerator is returned instead.
*
* a = [ "a", "b", "c", "d" ]
- * a.collect { |x| x + "!" } #=> ["a!", "b!", "c!", "d!"]
- * a.map.with_index{ |x, i| x * i } #=> ["", "b", "cc", "ddd"]
- * a #=> ["a", "b", "c", "d"]
+ * a.collect { |x| x + "!" } #=> ["a!", "b!", "c!", "d!"]
+ * a.map.with_index { |x, i| x * i } #=> ["", "b", "cc", "ddd"]
+ * a #=> ["a", "b", "c", "d"]
*/
static VALUE
@@ -2722,7 +2771,7 @@ rb_ary_collect_bang(VALUE ary)
}
VALUE
-rb_get_values_at(VALUE obj, long olen, int argc, VALUE *argv, VALUE (*func) (VALUE, long))
+rb_get_values_at(VALUE obj, long olen, int argc, const VALUE *argv, VALUE (*func) (VALUE, long))
{
VALUE result = rb_ary_new2(argc);
long beg, len, i, j;
@@ -2806,6 +2855,50 @@ rb_ary_select(VALUE ary)
return result;
}
+struct select_bang_arg {
+ VALUE ary;
+ long len[2];
+};
+
+static VALUE
+select_bang_i(VALUE a)
+{
+ volatile struct select_bang_arg *arg = (void *)a;
+ VALUE ary = arg->ary;
+ long i1, i2;
+
+ for (i1 = i2 = 0; i1 < RARRAY_LEN(ary); arg->len[0] = ++i1) {
+ VALUE v = RARRAY_AREF(ary, i1);
+ if (!RTEST(rb_yield(v))) continue;
+ if (i1 != i2) {
+ rb_ary_store(ary, i2, v);
+ }
+ arg->len[1] = ++i2;
+ }
+ return (i1 == i2) ? Qnil : ary;
+}
+
+static VALUE
+select_bang_ensure(VALUE a)
+{
+ volatile struct select_bang_arg *arg = (void *)a;
+ VALUE ary = arg->ary;
+ long len = RARRAY_LEN(ary);
+ long i1 = arg->len[0], i2 = arg->len[1];
+
+ if (i2 < len && i2 < i1) {
+ long tail = 0;
+ if (i1 < len) {
+ tail = len - i1;
+ RARRAY_PTR_USE(ary, ptr, {
+ MEMMOVE(ptr + i2, ptr + i1, VALUE, tail);
+ });
+ }
+ ARY_SET_LEN(ary, i2 + tail);
+ }
+ return ary;
+}
+
/*
* call-seq:
* ary.select! {|item| block } -> ary or nil
@@ -2814,6 +2907,8 @@ rb_ary_select(VALUE ary)
* Invokes the given block passing in successive elements from +self+,
* deleting elements for which the block returns a +false+ value.
*
+ * The array may not be changed instantly every time the block is called.
+ *
* If changes were made, it will return +self+, otherwise it returns +nil+.
*
* See also Array#keep_if
@@ -2825,23 +2920,14 @@ rb_ary_select(VALUE ary)
static VALUE
rb_ary_select_bang(VALUE ary)
{
- long i1, i2;
+ struct select_bang_arg args;
RETURN_SIZED_ENUMERATOR(ary, 0, 0, ary_enum_length);
rb_ary_modify(ary);
- for (i1 = i2 = 0; i1 < RARRAY_LEN(ary); i1++) {
- VALUE v = RARRAY_AREF(ary, i1);
- if (!RTEST(rb_yield(v))) continue;
- if (i1 != i2) {
- rb_ary_store(ary, i2, v);
- }
- i2++;
- }
- if (i1 == i2) return Qnil;
- if (i2 < i1)
- ARY_SET_LEN(ary, i2);
- return ary;
+ args.ary = ary;
+ args.len[0] = args.len[1] = 0;
+ return rb_ensure(select_bang_i, (VALUE)&args, select_bang_ensure, (VALUE)&args);
}
/*
@@ -3077,30 +3163,39 @@ ary_reject(VALUE orig, VALUE result)
for (i = 0; i < RARRAY_LEN(orig); i++) {
VALUE v = RARRAY_AREF(orig, i);
if (!RTEST(rb_yield(v))) {
- rb_ary_push_1(result, v);
+ rb_ary_push(result, v);
}
}
return result;
}
static VALUE
-ary_reject_bang(VALUE ary)
+reject_bang_i(VALUE a)
{
- long i;
- VALUE result = Qnil;
+ volatile struct select_bang_arg *arg = (void *)a;
+ VALUE ary = arg->ary;
+ long i1, i2;
- rb_ary_modify_check(ary);
- for (i = 0; i < RARRAY_LEN(ary); ) {
- VALUE v = RARRAY_AREF(ary, i);
- if (RTEST(rb_yield(v))) {
- rb_ary_delete_at(ary, i);
- result = ary;
- }
- else {
- i++;
+ for (i1 = i2 = 0; i1 < RARRAY_LEN(ary); arg->len[0] = ++i1) {
+ VALUE v = RARRAY_AREF(ary, i1);
+ if (RTEST(rb_yield(v))) continue;
+ if (i1 != i2) {
+ rb_ary_store(ary, i2, v);
}
+ arg->len[1] = ++i2;
}
- return result;
+ return (i1 == i2) ? Qnil : ary;
+}
+
+static VALUE
+ary_reject_bang(VALUE ary)
+{
+ struct select_bang_arg args;
+
+ rb_ary_modify_check(ary);
+ args.ary = ary;
+ args.len[0] = args.len[1] = 0;
+ return rb_ensure(reject_bang_i, (VALUE)&args, select_bang_ensure, (VALUE)&args);
}
/*
@@ -3108,11 +3203,10 @@ ary_reject_bang(VALUE ary)
* ary.reject! { |item| block } -> ary or nil
* ary.reject! -> Enumerator
*
- * Equivalent to Array#delete_if, deleting elements from +self+ for which the
- * block evaluates to +true+, but returns +nil+ if no changes were made.
+ * Deletes every element of +self+ for which the block evaluates to +true+,
+ * if no changes were made returns +nil+.
*
- * The array is changed instantly every time the block is called, not after
- * the iteration is over.
+ * The array may not be changed instantly every time the block is called.
*
* See also Enumerable#reject and Array#delete_if.
*
@@ -3132,7 +3226,7 @@ rb_ary_reject_bang(VALUE ary)
* ary.reject -> Enumerator
*
* Returns a new array containing the items in +self+ for which the given
- * block is not +true+.
+ * block is not +true+. The ordering of non-rejected elements is maintained.
*
* See also Array#delete_if
*
@@ -3240,8 +3334,10 @@ rb_ary_zip(int argc, VALUE *argv, VALUE ary)
if (rb_block_given_p()) {
int arity = rb_block_arity();
- if (arity > 1 && argc+1 < 0x100) {
- VALUE *tmp = ALLOCA_N(VALUE, argc+1);
+ if (arity > 1) {
+ VALUE work, *tmp;
+
+ tmp = ALLOCV_N(VALUE, work, argc+1);
for (i=0; i<RARRAY_LEN(ary); i++) {
tmp[0] = RARRAY_AREF(ary, i);
@@ -3250,6 +3346,8 @@ rb_ary_zip(int argc, VALUE *argv, VALUE ary)
}
rb_yield_values2(argc+1, tmp);
}
+
+ if (work) ALLOCV_END(work);
}
else {
for (i=0; i<RARRAY_LEN(ary); i++) {
@@ -3488,7 +3586,7 @@ rb_ary_fill(int argc, VALUE *argv, VALUE ary)
for (i=beg; i<end; i++) {
v = rb_yield(LONG2NUM(i));
if (i>=RARRAY_LEN(ary)) break;
- RARRAY_ASET(ary, i, v);
+ ARY_SET(ary, i, v);
}
}
else {
@@ -3510,6 +3608,13 @@ rb_ary_fill(int argc, VALUE *argv, VALUE ary)
* c #=> [ "a", "b", "c", "d", "e", "f" ]
* a #=> [ "a", "b", "c" ]
*
+ * Note that
+ * x += y
+ * is the same as
+ * x = x + y
+ * This means that it produces a new array. As a consequence,
+ * repeated use of <code>+=</code> on arrays can be quite inefficient.
+ *
* See also Array#concat.
*/
@@ -3622,7 +3727,7 @@ rb_ary_times(VALUE ary, VALUE times)
/*
* call-seq:
- * ary.assoc(obj) -> new_ary or nil
+ * ary.assoc(obj) -> element_ary or nil
*
* Searches through an array whose elements are also arrays comparing +obj+
* with the first element of each contained array using <code>obj.==</code>.
@@ -3657,7 +3762,7 @@ rb_ary_assoc(VALUE ary, VALUE key)
/*
* call-seq:
- * ary.rassoc(obj) -> new_ary or nil
+ * ary.rassoc(obj) -> element_ary or nil
*
* Searches through the array whose elements are also arrays.
*
@@ -3741,7 +3846,7 @@ rb_ary_equal(VALUE ary1, VALUE ary2)
{
if (ary1 == ary2) return Qtrue;
if (!RB_TYPE_P(ary2, T_ARRAY)) {
- if (!rb_respond_to(ary2, rb_intern("to_ary"))) {
+ if (!rb_respond_to(ary2, idTo_ary)) {
return Qfalse;
}
return rb_equal(ary2, ary1);
@@ -3790,6 +3895,8 @@ rb_ary_eql(VALUE ary1, VALUE ary2)
*
* Two arrays with the same content will have the same hash code (and will
* compare using #eql?).
+ *
+ * See also Object#hash.
*/
static VALUE
@@ -3825,9 +3932,15 @@ VALUE
rb_ary_includes(VALUE ary, VALUE item)
{
long i;
+ VALUE e;
for (i=0; i<RARRAY_LEN(ary); i++) {
- if (rb_equal(RARRAY_AREF(ary, i), item)) {
+ e = RARRAY_AREF(ary, i);
+ switch (rb_equal_opt(e, item)) {
+ case Qundef:
+ if (rb_equal(e, item)) return Qtrue;
+ break;
+ case Qtrue:
return Qtrue;
}
}
@@ -3862,21 +3975,26 @@ recursive_cmp(VALUE ary1, VALUE ary2, int recur)
* Comparison --- Returns an integer (+-1+, +0+, or <code>+1</code>) if this
* array is less than, equal to, or greater than +other_ary+.
*
- * +nil+ is returned if the two values are incomparable.
- *
* Each object in each array is compared (using the <=> operator).
*
- * Arrays are compared in an "element-wise" manner; the first two elements
- * that are not equal will determine the return value for the whole
- * comparison.
+ * Arrays are compared in an "element-wise" manner; the first element of +ary+
+ * is compared with the first one of +other_ary+ using the <=> operator, then
+ * each of the second elements, etc...
+ * As soon as the result of any such comparison is non zero (i.e. the two
+ * corresponding elements are not equal), that result is returned for the
+ * whole array comparison.
*
- * If all the values are equal, then the return is based on a comparison of
+ * If all the elements are equal, then the result is based on a comparison of
* the array lengths. Thus, two arrays are "equal" according to Array#<=> if,
* and only if, they have the same length and the value of each element is
* equal to the value of the corresponding element in the other array.
*
+ * +nil+ is returned if the +other_ary+ is not an array or if the comparison
+ * of two elements returned +nil+.
+ *
* [ "a", "a", "c" ] <=> [ "a", "b", "c" ] #=> -1
* [ 1, 2, 3, 4, 5, 6 ] <=> [ 1, 2 ] #=> +1
+ * [ 1, 2 ] <=> [ 1, :two ] #=> nil
*
*/
@@ -3956,6 +4074,7 @@ ary_recycle_hash(VALUE hash)
RHASH(hash)->ntbl = 0;
st_free_table(tbl);
}
+ RB_GC_GUARD(hash);
}
/*
@@ -3979,7 +4098,7 @@ static VALUE
rb_ary_diff(VALUE ary1, VALUE ary2)
{
VALUE ary3;
- volatile VALUE hash;
+ VALUE hash;
long i;
hash = ary_make_hash(to_ary(ary2));
@@ -4097,6 +4216,8 @@ push_value(st_data_t key, st_data_t val, st_data_t ary)
*
* It compares values using their #hash and #eql? methods for efficiency.
*
+ * +self+ is traversed in order, and the first occurrence is kept.
+ *
* Returns +nil+ if no changes are made (that is, no duplicates are found).
*
* a = [ "a", "a", "b", "b", "c" ]
@@ -4152,6 +4273,8 @@ rb_ary_uniq_bang(VALUE ary)
*
* It compares values using their #hash and #eql? methods for efficiency.
*
+ * +self+ is traversed in order, and the first occurrence is kept.
+ *
* a = [ "a", "a", "b", "b", "c" ]
* a.uniq # => ["a", "b", "c"]
*
@@ -4303,11 +4426,15 @@ flatten(VALUE ary, int level, int *modified)
while (1) {
while (i < RARRAY_LEN(ary)) {
elt = RARRAY_AREF(ary, i++);
+ if (level >= 0 && RARRAY_LEN(stack) / 2 >= level) {
+ rb_ary_push(result, elt);
+ continue;
+ }
tmp = rb_check_array_type(elt);
if (RBASIC(result)->klass) {
rb_raise(rb_eRuntimeError, "flatten reentered");
}
- if (NIL_P(tmp) || (level >= 0 && RARRAY_LEN(stack) / 2 >= level)) {
+ if (NIL_P(tmp)) {
rb_ary_push(result, elt);
}
else {
@@ -4336,7 +4463,7 @@ flatten(VALUE ary, int level, int *modified)
st_free_table(memo);
- RBASIC_SET_CLASS(result, rb_class_of(ary));
+ RBASIC_SET_CLASS(result, rb_obj_class(ary));
return result;
}
@@ -4434,7 +4561,13 @@ static ID id_random;
*
* Shuffles elements in +self+ in place.
*
+ * a = [ 1, 2, 3 ] #=> [1, 2, 3]
+ * a.shuffle! #=> [2, 3, 1]
+ * a #=> [2, 3, 1]
+ *
* The optional +rng+ argument will be used as the random number generator.
+ *
+ * a.shuffle!(random: Random.new(1)) #=> [1, 3, 2]
*/
static VALUE
@@ -4481,6 +4614,7 @@ rb_ary_shuffle_bang(int argc, VALUE *argv, VALUE ary)
*
* a = [ 1, 2, 3 ] #=> [1, 2, 3]
* a.shuffle #=> [2, 3, 1]
+ * a #=> [1, 2, 3]
*
* The optional +rng+ argument will be used as the random number generator.
*
@@ -4691,8 +4825,26 @@ rb_ary_cycle(int argc, VALUE *argv, VALUE ary)
#define tmpary_discard(a) (ary_discard(a), RBASIC_SET_CLASS_RAW(a, rb_cArray))
/*
- * Recursively compute permutations of +r+ elements of the set
- * <code>[0..n-1]</code>.
+ * Build a ruby array of the corresponding values and yield it to the
+ * associated block.
+ * Return the class of +values+ for reentry check.
+ */
+static int
+yield_indexed_values(const VALUE values, const long r, const long *const p)
+{
+ const VALUE result = rb_ary_new2(r);
+ VALUE *const result_array = RARRAY_PTR(result);
+ const VALUE *const values_array = RARRAY_CONST_PTR(values);
+ long i;
+
+ for (i = 0; i < r; i++) result_array[i] = values_array[p[i]];
+ ARY_SET_LEN(result, r);
+ rb_yield(result);
+ return !RBASIC(values)->klass;
+}
+
+/*
+ * Compute permutations of +r+ elements of the set <code>[0..n-1]</code>.
*
* When we have a complete permutation of array indexes, copy the values
* at those indexes into a new array and yield that array.
@@ -4700,38 +4852,40 @@ rb_ary_cycle(int argc, VALUE *argv, VALUE ary)
* n: the size of the set
* r: the number of elements in each permutation
* p: the array (of size r) that we're filling in
- * index: what index we're filling in now
* used: an array of booleans: whether a given index is already used
* values: the Ruby array that holds the actual values to permute
*/
static void
-permute0(long n, long r, long *p, long index, char *used, VALUE values)
+permute0(const long n, const long r, long *const p, char *const used, const VALUE values)
{
- long i,j;
- for (i = 0; i < n; i++) {
- if (used[i] == 0) {
+ long i = 0, index = 0;
+
+ for (;;) {
+ const char *const unused = memchr(&used[i], 0, n-i);
+ if (!unused) {
+ if (!index) break;
+ i = p[--index]; /* pop index */
+ used[i++] = 0; /* index unused */
+ }
+ else {
+ i = unused - used;
p[index] = i;
+ used[i] = 1; /* mark index used */
+ ++index;
if (index < r-1) { /* if not done yet */
- used[i] = 1; /* mark index used */
- permute0(n, r, p, index+1, /* recurse */
- used, values);
- used[i] = 0; /* index unused */
+ p[index] = i = 0;
+ continue;
}
- else {
- /* We have a complete permutation of array indexes */
- /* Build a ruby array of the corresponding values */
- /* And yield it to the associated block */
- VALUE result = rb_ary_new2(r);
- VALUE *result_array = RARRAY_PTR(result);
- const VALUE *values_array = RARRAY_PTR(values);
-
- for (j = 0; j < r; j++) result_array[j] = values_array[p[j]];
- ARY_SET_LEN(result, r);
- rb_yield(result);
- if (RBASIC(values)->klass) {
+ for (i = 0; i < n; ++i) {
+ if (used[i]) continue;
+ p[index] = i;
+ if (!yield_indexed_values(values, r, p)) {
rb_raise(rb_eRuntimeError, "permute reentered");
}
}
+ i = p[--index]; /* pop index */
+ used[i] = 0; /* index unused */
+ p[index] = ++i;
}
}
}
@@ -4826,23 +4980,42 @@ rb_ary_permutation(int argc, VALUE *argv, VALUE ary)
}
}
else { /* this is the general case */
- volatile VALUE t0 = tmpbuf(n,sizeof(long));
- long *p = (long*)RSTRING_PTR(t0);
- volatile VALUE t1 = tmpbuf(n,sizeof(char));
- char *used = (char*)RSTRING_PTR(t1);
+ volatile VALUE t0;
+ long *p = ALLOCV_N(long, t0, r+roomof(n, sizeof(long)));
+ char *used = (char*)(p + r);
VALUE ary0 = ary_make_shared_copy(ary); /* private defensive copy of ary */
RBASIC_CLEAR_CLASS(ary0);
MEMZERO(used, char, n); /* initialize array */
- permute0(n, r, p, 0, used, ary0); /* compute and yield permutations */
- tmpbuf_discard(t0);
- tmpbuf_discard(t1);
+ permute0(n, r, p, used, ary0); /* compute and yield permutations */
+ ALLOCV_END(t0);
RBASIC_SET_CLASS_RAW(ary0, rb_cArray);
}
return ary;
}
+static void
+combinate0(const long len, const long n, long *const stack, const VALUE values)
+{
+ long lev = 0;
+
+ MEMZERO(stack+1, long, n);
+ stack[0] = -1;
+ for (;;) {
+ for (lev++; lev < n; lev++) {
+ stack[lev+1] = stack[lev]+1;
+ }
+ if (!yield_indexed_values(values, n, stack+1)) {
+ rb_raise(rb_eRuntimeError, "combination reentered");
+ }
+ do {
+ if (lev == 0) return;
+ stack[lev--]++;
+ } while (stack[lev+1]+n == len+lev+1);
+ }
+}
+
static VALUE
rb_ary_combination_size(VALUE ary, VALUE args, VALUE eobj)
{
@@ -4880,7 +5053,7 @@ rb_ary_combination_size(VALUE ary, VALUE args, VALUE eobj)
static VALUE
rb_ary_combination(VALUE ary, VALUE num)
{
- long n, i, len;
+ long i, n, len;
n = NUM2LONG(num);
RETURN_SIZED_ENUMERATOR(ary, 1, &num, rb_ary_combination_size);
@@ -4892,42 +5065,25 @@ rb_ary_combination(VALUE ary, VALUE num)
rb_yield(rb_ary_new2(0));
}
else if (n == 1) {
- for (i = 0; i < len; i++) {
+ for (i = 0; i < RARRAY_LEN(ary); i++) {
rb_yield(rb_ary_new3(1, RARRAY_AREF(ary, i)));
}
}
else {
- volatile VALUE t0 = tmpbuf(n+1, sizeof(long));
- long *stack = (long*)RSTRING_PTR(t0);
- volatile VALUE cc = tmpary(n);
- VALUE *chosen = RARRAY_PTR(cc);
- long lev = 0;
-
- MEMZERO(stack, long, n);
- stack[0] = -1;
- for (;;) {
- chosen[lev] = RARRAY_AREF(ary, stack[lev+1]);
- for (lev++; lev < n; lev++) {
- chosen[lev] = RARRAY_AREF(ary, stack[lev+1] = stack[lev]+1);
- }
- rb_yield(rb_ary_new4(n, chosen));
- if (RBASIC(t0)->klass) {
- rb_raise(rb_eRuntimeError, "combination reentered");
- }
- do {
- if (lev == 0) goto done;
- stack[lev--]++;
- } while (stack[lev+1]+n == len+lev+1);
- }
- done:
- tmpbuf_discard(t0);
- tmpary_discard(cc);
+ VALUE ary0 = ary_make_shared_copy(ary); /* private defensive copy of ary */
+ volatile VALUE t0;
+ long *stack = ALLOCV_N(long, t0, n+1);
+
+ RBASIC_CLEAR_CLASS(ary0);
+ combinate0(len, n, stack, ary0);
+ ALLOCV_END(t0);
+ RBASIC_SET_CLASS_RAW(ary0, rb_cArray);
}
return ary;
}
/*
- * Recursively compute repeated permutations of +r+ elements of the set
+ * Compute repeated permutations of +r+ elements of the set
* <code>[0..n-1]</code>.
*
* When we have a complete repeated permutation of array indexes, copy the
@@ -4936,33 +5092,28 @@ rb_ary_combination(VALUE ary, VALUE num)
* n: the size of the set
* r: the number of elements in each permutation
* p: the array (of size r) that we're filling in
- * index: what index we're filling in now
* values: the Ruby array that holds the actual values to permute
*/
static void
-rpermute0(long n, long r, long *p, long index, VALUE values)
+rpermute0(const long n, const long r, long *const p, const VALUE values)
{
- long i, j;
- for (i = 0; i < n; i++) {
- p[index] = i;
- if (index < r-1) { /* if not done yet */
- rpermute0(n, r, p, index+1, values); /* recurse */
+ long i = 0, index = 0;
+
+ p[index] = i;
+ for (;;) {
+ if (++index < r-1) {
+ p[index] = i = 0;
+ continue;
}
- else {
- /* We have a complete permutation of array indexes */
- /* Build a ruby array of the corresponding values */
- /* And yield it to the associated block */
- VALUE result = rb_ary_new2(r);
- VALUE *result_array = RARRAY_PTR(result);
- const VALUE *values_array = RARRAY_PTR(values);
-
- for (j = 0; j < r; j++) result_array[j] = values_array[p[j]];
- ARY_SET_LEN(result, r);
- rb_yield(result);
- if (RBASIC(values)->klass) {
+ for (i = 0; i < n; ++i) {
+ p[index] = i;
+ if (!yield_indexed_values(values, r, p)) {
rb_raise(rb_eRuntimeError, "repeated permute reentered");
}
}
+ do {
+ if (index <= 0) return;
+ } while ((i = ++p[--index]) >= n);
}
}
@@ -5025,39 +5176,38 @@ rb_ary_repeated_permutation(VALUE ary, VALUE num)
}
}
else { /* this is the general case */
- volatile VALUE t0 = tmpbuf(r, sizeof(long));
- long *p = (long*)RSTRING_PTR(t0);
+ volatile VALUE t0;
+ long *p = ALLOCV_N(long, t0, r);
VALUE ary0 = ary_make_shared_copy(ary); /* private defensive copy of ary */
RBASIC_CLEAR_CLASS(ary0);
- rpermute0(n, r, p, 0, ary0); /* compute and yield repeated permutations */
- tmpbuf_discard(t0);
+ rpermute0(n, r, p, ary0); /* compute and yield repeated permutations */
+ ALLOCV_END(t0);
RBASIC_SET_CLASS_RAW(ary0, rb_cArray);
}
return ary;
}
static void
-rcombinate0(long n, long r, long *p, long index, long rest, VALUE values)
+rcombinate0(const long n, const long r, long *const p, const long rest, const VALUE values)
{
- long j;
- if (rest > 0) {
- for (; index < n; ++index) {
- p[r-rest] = index;
- rcombinate0(n, r, p, index, rest-1, values);
+ long i = 0, index = 0;
+
+ p[index] = i;
+ for (;;) {
+ if (++index < r-1) {
+ p[index] = i;
+ continue;
}
- }
- else {
- VALUE result = rb_ary_new2(r);
- VALUE *result_array = RARRAY_PTR(result);
- const VALUE *values_array = RARRAY_PTR(values);
-
- for (j = 0; j < r; ++j) result_array[j] = values_array[p[j]];
- ARY_SET_LEN(result, r);
- rb_yield(result);
- if (RBASIC(values)->klass) {
- rb_raise(rb_eRuntimeError, "repeated combination reentered");
+ for (; i < n; ++i) {
+ p[index] = i;
+ if (!yield_indexed_values(values, r, p)) {
+ rb_raise(rb_eRuntimeError, "repeated combination reentered");
+ }
}
+ do {
+ if (index <= 0) return;
+ } while ((i = ++p[--index]) >= n);
}
}
@@ -5114,7 +5264,7 @@ rb_ary_repeated_combination(VALUE ary, VALUE num)
rb_yield(rb_ary_new2(0));
}
else if (n == 1) {
- for (i = 0; i < len; i++) {
+ for (i = 0; i < RARRAY_LEN(ary); i++) {
rb_yield(rb_ary_new3(1, RARRAY_AREF(ary, i)));
}
}
@@ -5122,13 +5272,13 @@ rb_ary_repeated_combination(VALUE ary, VALUE num)
/* yield nothing */
}
else {
- volatile VALUE t0 = tmpbuf(n, sizeof(long));
- long *p = (long*)RSTRING_PTR(t0);
+ volatile VALUE t0;
+ long *p = ALLOCV_N(long, t0, n);
VALUE ary0 = ary_make_shared_copy(ary); /* private defensive copy of ary */
RBASIC_CLEAR_CLASS(ary0);
- rcombinate0(len, n, p, 0, n, ary0); /* compute and yield repeated combinations */
- tmpbuf_discard(t0);
+ rcombinate0(len, n, p, n, ary0); /* compute and yield repeated combinations */
+ ALLOCV_END(t0);
RBASIC_SET_CLASS_RAW(ary0, rb_cArray);
}
return ary;
@@ -5271,7 +5421,7 @@ rb_ary_take(VALUE obj, VALUE n)
/*
* call-seq:
- * ary.take_while { |arr| block } -> new_ary
+ * ary.take_while { |obj| block } -> new_ary
* ary.take_while -> Enumerator
*
* Passes elements to the block until the block returns +nil+ or +false+, then
@@ -5330,7 +5480,7 @@ rb_ary_drop(VALUE ary, VALUE n)
/*
* call-seq:
- * ary.drop_while { |arr| block } -> new_ary
+ * ary.drop_while { |obj| block } -> new_ary
* ary.drop_while -> Enumerator
*
* Drops elements up to, but not including, the first element for which the
@@ -5359,6 +5509,57 @@ rb_ary_drop_while(VALUE ary)
}
/*
+ * call-seq:
+ * ary.any? [{ |obj| block }] -> true or false
+ *
+ * See also Enumerable#any?
+ */
+
+static VALUE
+rb_ary_any_p(VALUE ary)
+{
+ long i, len = RARRAY_LEN(ary);
+ const VALUE *ptr = RARRAY_CONST_PTR(ary);
+
+ if (!len) return Qfalse;
+ if (!rb_block_given_p()) {
+ for (i = 0; i < len; ++i) if (RTEST(ptr[i])) return Qtrue;
+ }
+ else {
+ for (i = 0; i < RARRAY_LEN(ary); ++i) {
+ if (RTEST(rb_yield(RARRAY_AREF(ary, i)))) return Qtrue;
+ }
+ }
+ return Qfalse;
+}
+
+/*
+ * call-seq:
+ * ary.dig(idx, ...) -> object
+ *
+ * Extracts the nested value specified by the sequence of <i>idx</i>
+ * objects by calling +dig+ at each step, returning +nil+ if any
+ * intermediate step is +nil+.
+ *
+ * a = [[1, [2, 3]]]
+ *
+ * a.dig(0, 1, 1) #=> 3
+ * a.dig(1, 2, 3) #=> nil
+ * a.dig(0, 0, 0) #=> NoMethodError, undefined method `dig' for 1:Fixnum
+ * [42, {foo: :bar}].dig(1, :foo) #=> :bar
+ */
+
+VALUE
+rb_ary_dig(int argc, VALUE *argv, VALUE self)
+{
+ rb_check_arity(argc, 1, UNLIMITED_ARGUMENTS);
+ self = rb_ary_at(self, *argv);
+ if (!--argc) return self;
+ ++argv;
+ return rb_obj_dig(argc, argv, self, Qnil);
+}
+
+/*
* Arrays are ordered, integer-indexed collections of any object.
*
* Array indexing starts at 0, as in C or Java. A negative index is assumed
@@ -5391,7 +5592,8 @@ rb_ary_drop_while(VALUE ary)
* This method is safe to use with mutable objects such as hashes, strings or
* other arrays:
*
- * Array.new(4) { Hash.new } #=> [{}, {}, {}, {}]
+ * Array.new(4) { Hash.new } #=> [{}, {}, {}, {}]
+ * Array.new(4) {|i| i.to_s } #=> ["0", "1", "2", "3"]
*
* This is also a quick way to build up multi-dimensional arrays:
*
@@ -5707,6 +5909,9 @@ Init_Array(void)
rb_define_method(rb_cArray, "drop", rb_ary_drop, 1);
rb_define_method(rb_cArray, "drop_while", rb_ary_drop_while, 0);
rb_define_method(rb_cArray, "bsearch", rb_ary_bsearch, 0);
+ rb_define_method(rb_cArray, "bsearch_index", rb_ary_bsearch_index, 0);
+ rb_define_method(rb_cArray, "any?", rb_ary_any_p, 0);
+ rb_define_method(rb_cArray, "dig", rb_ary_dig, -1);
id_cmp = rb_intern("<=>");
id_random = rb_intern("random");
diff --git a/benchmark/bm_app_aobench.rb b/benchmark/bm_app_aobench.rb
index 807349089f..2bd6acfaf8 100644
--- a/benchmark/bm_app_aobench.rb
+++ b/benchmark/bm_app_aobench.rb
@@ -1,7 +1,6 @@
-# AO rebder benchmark
+# AO render benchmark
# Original program (C) Syoyo Fujita in Javascript (and other languages)
-# http://lucille.atso-net.jp/blog/?p=642
-# http://lucille.atso-net.jp/blog/?p=711
+# https://code.google.com/p/aobench/
# Ruby(yarv2llvm) version by Hideki Miura
#
@@ -230,7 +229,7 @@ class Scene
w.times do |x|
rad = Vec.new(0.0, 0.0, 0.0)
- # Subsmpling
+ # Subsampling
nsubsamples.times do |v|
nsubsamples.times do |u|
diff --git a/benchmark/bm_app_lc_fizzbuzz.rb b/benchmark/bm_app_lc_fizzbuzz.rb
new file mode 100644
index 0000000000..f09574bbeb
--- /dev/null
+++ b/benchmark/bm_app_lc_fizzbuzz.rb
@@ -0,0 +1,52 @@
+#
+# FizzBuzz program using only lambda calculus
+#
+# This program is quoted from
+# "Understanding Computation" by Tom Stuart
+# http://computationbook.com/
+#
+# You can understand why this program works fine by reading this book.
+#
+
+solution = -> k { -> f { -> f { -> x { f[-> y { x[x][y] }] }[-> x { f[-> y { x[x][y] }] }] }[-> f { -> l { -> x { -> g { -> b { b }[-> p { p[-> x { -> y { x } }] }[l]][x][-> y { g[f[-> l { -> p { p[-> x { -> y { y } }] }[-> p { p[-> x { -> y { y } }] }[l]] }[l]][x][g]][-> l { -> p { p[-> x { -> y { x } }] }[-> p { p[-> x { -> y { y } }] }[l]] }[l]][y] }] } } } }][k][-> x { -> y { -> f { f[x][y] } } }[-> x { -> y { x } }][-> x { -> y { x } }]][-> l { -> x { -> l { -> x { -> x { -> y { -> f { f[x][y] } } }[-> x { -> y { y } }][-> x { -> y { -> f { f[x][y] } } }[x][l]] } }[l][f[x]] } }] } }[-> f { -> x { f[-> y { x[x][y] }] }[-> x { f[-> y { x[x][y] }] }] }[-> f { -> m { -> n { -> b { b }[-> m { -> n { -> n { n[-> x { -> x { -> y { y } } }][-> x { -> y { x } }] }[-> m { -> n { n[-> n { -> p { p[-> x { -> y { x } }] }[n[-> p { -> x { -> y { -> f { f[x][y] } } }[-> p { p[-> x { -> y { y } }] }[p]][-> n { -> p { -> x { p[n[p][x]] } } }[-> p { p[-> x { -> y { y } }] }[p]]] }][-> x { -> y { -> f { f[x][y] } } }[-> p { -> x { x } }][-> p { -> x { x } }]]] }][m] } }[m][n]] } }[m][n]][-> x { -> l { -> x { -> x { -> y { -> f { f[x][y] } } }[-> x { -> y { y } }][-> x { -> y { -> f { f[x][y] } } }[x][l]] } }[f[-> n { -> p { -> x { p[n[p][x]] } } }[m]][n]][m][x] }][-> x { -> y { -> f { f[x][y] } } }[-> x { -> y { x } }][-> x { -> y { x } }]] } } }][-> p { -> x { p[x] } }][-> p { -> x { p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[x]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] } }]][-> n { -> b { b }[-> n { n[-> x { -> x { -> y { y } } }][-> x { -> y { x } }] }[-> f { -> x { f[-> y { x[x][y] }] }[-> x { f[-> y { x[x][y] }] }] }[-> f { -> m { -> n { -> b { b }[-> m { -> n { -> n { n[-> x { -> x { -> y { y } } }][-> x { -> y { x } }] }[-> m { -> n { n[-> n { -> p { p[-> x { -> y { x } }] }[n[-> p { -> x { -> y { -> f { f[x][y] } } }[-> p { p[-> x { -> y { y } }] }[p]][-> n { -> p { -> x { p[n[p][x]] } } }[-> p { p[-> x { -> y { y } }] }[p]]] }][-> x { -> y { -> f { f[x][y] } } }[-> p { -> x { x } }][-> p { -> x { x } }]]] }][m] } }[m][n]] } }[n][m]][-> x { f[-> m { -> n { n[-> n { -> p { p[-> x { -> y { x } }] }[n[-> p { -> x { -> y { -> f { f[x][y] } } }[-> p { p[-> x { -> y { y } }] }[p]][-> n { -> p { -> x { p[n[p][x]] } } }[-> p { p[-> x { -> y { y } }] }[p]]] }][-> x { -> y { -> f { f[x][y] } } }[-> p { -> x { x } }][-> p { -> x { x } }]]] }][m] } }[m][n]][n][x] }][m] } } }][n][-> p { -> x { p[p[p[p[p[p[p[p[p[p[p[p[p[p[p[x]]]]]]]]]]]]]]] } }]]][-> l { -> x { -> x { -> y { -> f { f[x][y] } } }[-> x { -> y { y } }][-> x { -> y { -> f { f[x][y] } } }[x][l]] } }[-> l { -> x { -> x { -> y { -> f { f[x][y] } } }[-> x { -> y { y } }][-> x { -> y { -> f { f[x][y] } } }[x][l]] } }[-> l { -> x { -> x { -> y { -> f { f[x][y] } } }[-> x { -> y { y } }][-> x { -> y { -> f { f[x][y] } } }[x][l]] } }[-> l { -> x { -> x { -> y { -> f { f[x][y] } } }[-> x { -> y { y } }][-> x { -> y { -> f { f[x][y] } } }[x][l]] } }[-> l { -> x { -> x { -> y { -> f { f[x][y] } } }[-> x { -> y { y } }][-> x { -> y { -> f { f[x][y] } } }[x][l]] } }[-> l { -> x { -> x { -> y { -> f { f[x][y] } } }[-> x { -> y { y } }][-> x { -> y { -> f { f[x][y] } } }[x][l]] } }[-> l { -> x { -> x { -> y { -> f { f[x][y] } } }[-> x { -> y { y } }][-> x { -> y { -> f { f[x][y] } } }[x][l]] } }[-> l { -> x { -> x { -> y { -> f { f[x][y] } } }[-> x { -> y { y } }][-> x { -> y { -> f { f[x][y] } } }[x][l]] } }[-> x { -> y { -> f { f[x][y] } } }[-> x { -> y { x } }][-> x { -> y { x } }]][-> n { -> p { -> x { p[n[p][x]] } } }[-> n { -> p { -> x { p[n[p][x]] } } }[-> n { -> p { -> x { p[n[p][x]] } } }[-> n { -> p { -> x { p[n[p][x]] } } }[-> m { -> n { n[-> m { -> n { n[-> n { -> p { -> x { p[n[p][x]] } } }][m] } }[m]][-> p { -> x { x } }] } }[-> p { -> x { p[p[x]] } }][-> p { -> x { p[p[p[p[p[x]]]]] } }]]]]]]][-> n { -> p { -> x { p[n[p][x]] } } }[-> n { -> p { -> x { p[n[p][x]] } } }[-> n { -> p { -> x { p[n[p][x]] } } }[-> n { -> p { -> x { p[n[p][x]] } } }[-> m { -> n { n[-> m { -> n { n[-> n { -> p { -> x { p[n[p][x]] } } }][m] } }[m]][-> p { -> x { x } }] } }[-> p { -> x { p[p[x]] } }][-> p { -> x { p[p[p[p[p[x]]]]] } }]]]]]]][-> n { -> p { -> x { p[n[p][x]] } } }[-> n { -> p { -> x { p[n[p][x]] } } }[-> n { -> p { -> x { p[n[p][x]] } } }[-> m { -> n { n[-> m { -> n { n[-> n { -> p { -> x { p[n[p][x]] } } }][m] } }[m]][-> p { -> x { x } }] } }[-> p { -> x { p[p[x]] } }][-> p { -> x { p[p[p[p[p[x]]]]] } }]]]]]][-> m { -> n { n[-> m { -> n { n[-> n { -> p { -> x { p[n[p][x]] } } }][m] } }[m]][-> p { -> x { x } }] } }[-> p { -> x { p[p[x]] } }][-> p { -> x { p[p[p[p[p[x]]]]] } }]]][-> n { -> p { -> x { p[n[p][x]] } } }[-> n { -> p { -> x { p[n[p][x]] } } }[-> n { -> p { -> x { p[n[p][x]] } } }[-> n { -> p { -> x { p[n[p][x]] } } }[-> m { -> n { n[-> m { -> n { n[-> n { -> p { -> x { p[n[p][x]] } } }][m] } }[m]][-> p { -> x { x } }] } }[-> p { -> x { p[p[x]] } }][-> p { -> x { p[p[p[p[p[x]]]]] } }]]]]]]][-> n { -> p { -> x { p[n[p][x]] } } }[-> n { -> p { -> x { p[n[p][x]] } } }[-> n { -> p { -> x { p[n[p][x]] } } }[-> n { -> p { -> x { p[n[p][x]] } } }[-> m { -> n { n[-> m { -> n { n[-> n { -> p { -> x { p[n[p][x]] } } }][m] } }[m]][-> p { -> x { x } }] } }[-> p { -> x { p[p[x]] } }][-> p { -> x { p[p[p[p[p[x]]]]] } }]]]]]]][-> n { -> p { -> x { p[n[p][x]] } } }[-> n { -> p { -> x { p[n[p][x]] } } }[-> m { -> n { n[-> m { -> n { n[-> n { -> p { -> x { p[n[p][x]] } } }][m] } }[m]][-> p { -> x { x } }] } }[-> p { -> x { p[p[x]] } }][-> p { -> x { p[p[p[p[p[x]]]]] } }]]]]][-> n { -> p { -> x { p[n[p][x]] } } }[-> m { -> n { n[-> m { -> n { n[-> n { -> p { -> x { p[n[p][x]] } } }][m] } }[m]][-> p { -> x { x } }] } }[-> p { -> x { p[p[x]] } }][-> p { -> x { p[p[p[p[p[x]]]]] } }]]]][-> b { b }[-> n { n[-> x { -> x { -> y { y } } }][-> x { -> y { x } }] }[-> f { -> x { f[-> y { x[x][y] }] }[-> x { f[-> y { x[x][y] }] }] }[-> f { -> m { -> n { -> b { b }[-> m { -> n { -> n { n[-> x { -> x { -> y { y } } }][-> x { -> y { x } }] }[-> m { -> n { n[-> n { -> p { p[-> x { -> y { x } }] }[n[-> p { -> x { -> y { -> f { f[x][y] } } }[-> p { p[-> x { -> y { y } }] }[p]][-> n { -> p { -> x { p[n[p][x]] } } }[-> p { p[-> x { -> y { y } }] }[p]]] }][-> x { -> y { -> f { f[x][y] } } }[-> p { -> x { x } }][-> p { -> x { x } }]]] }][m] } }[m][n]] } }[n][m]][-> x { f[-> m { -> n { n[-> n { -> p { p[-> x { -> y { x } }] }[n[-> p { -> x { -> y { -> f { f[x][y] } } }[-> p { p[-> x { -> y { y } }] }[p]][-> n { -> p { -> x { p[n[p][x]] } } }[-> p { p[-> x { -> y { y } }] }[p]]] }][-> x { -> y { -> f { f[x][y] } } }[-> p { -> x { x } }][-> p { -> x { x } }]]] }][m] } }[m][n]][n][x] }][m] } } }][n][-> p { -> x { p[p[p[x]]] } }]]][-> l { -> x { -> x { -> y { -> f { f[x][y] } } }[-> x { -> y { y } }][-> x { -> y { -> f { f[x][y] } } }[x][l]] } }[-> l { -> x { -> x { -> y { -> f { f[x][y] } } }[-> x { -> y { y } }][-> x { -> y { -> f { f[x][y] } } }[x][l]] } }[-> l { -> x { -> x { -> y { -> f { f[x][y] } } }[-> x { -> y { y } }][-> x { -> y { -> f { f[x][y] } } }[x][l]] } }[-> l { -> x { -> x { -> y { -> f { f[x][y] } } }[-> x { -> y { y } }][-> x { -> y { -> f { f[x][y] } } }[x][l]] } }[-> x { -> y { -> f { f[x][y] } } }[-> x { -> y { x } }][-> x { -> y { x } }]][-> n { -> p { -> x { p[n[p][x]] } } }[-> n { -> p { -> x { p[n[p][x]] } } }[-> n { -> p { -> x { p[n[p][x]] } } }[-> n { -> p { -> x { p[n[p][x]] } } }[-> m { -> n { n[-> m { -> n { n[-> n { -> p { -> x { p[n[p][x]] } } }][m] } }[m]][-> p { -> x { x } }] } }[-> p { -> x { p[p[x]] } }][-> p { -> x { p[p[p[p[p[x]]]]] } }]]]]]]][-> n { -> p { -> x { p[n[p][x]] } } }[-> n { -> p { -> x { p[n[p][x]] } } }[-> n { -> p { -> x { p[n[p][x]] } } }[-> n { -> p { -> x { p[n[p][x]] } } }[-> m { -> n { n[-> m { -> n { n[-> n { -> p { -> x { p[n[p][x]] } } }][m] } }[m]][-> p { -> x { x } }] } }[-> p { -> x { p[p[x]] } }][-> p { -> x { p[p[p[p[p[x]]]]] } }]]]]]]][-> n { -> p { -> x { p[n[p][x]] } } }[-> n { -> p { -> x { p[n[p][x]] } } }[-> m { -> n { n[-> m { -> n { n[-> n { -> p { -> x { p[n[p][x]] } } }][m] } }[m]][-> p { -> x { x } }] } }[-> p { -> x { p[p[x]] } }][-> p { -> x { p[p[p[p[p[x]]]]] } }]]]]][-> n { -> p { -> x { p[n[p][x]] } } }[-> m { -> n { n[-> m { -> n { n[-> n { -> p { -> x { p[n[p][x]] } } }][m] } }[m]][-> p { -> x { x } }] } }[-> p { -> x { p[p[x]] } }][-> p { -> x { p[p[p[p[p[x]]]]] } }]]]][-> b { b }[-> n { n[-> x { -> x { -> y { y } } }][-> x { -> y { x } }] }[-> f { -> x { f[-> y { x[x][y] }] }[-> x { f[-> y { x[x][y] }] }] }[-> f { -> m { -> n { -> b { b }[-> m { -> n { -> n { n[-> x { -> x { -> y { y } } }][-> x { -> y { x } }] }[-> m { -> n { n[-> n { -> p { p[-> x { -> y { x } }] }[n[-> p { -> x { -> y { -> f { f[x][y] } } }[-> p { p[-> x { -> y { y } }] }[p]][-> n { -> p { -> x { p[n[p][x]] } } }[-> p { p[-> x { -> y { y } }] }[p]]] }][-> x { -> y { -> f { f[x][y] } } }[-> p { -> x { x } }][-> p { -> x { x } }]]] }][m] } }[m][n]] } }[n][m]][-> x { f[-> m { -> n { n[-> n { -> p { p[-> x { -> y { x } }] }[n[-> p { -> x { -> y { -> f { f[x][y] } } }[-> p { p[-> x { -> y { y } }] }[p]][-> n { -> p { -> x { p[n[p][x]] } } }[-> p { p[-> x { -> y { y } }] }[p]]] }][-> x { -> y { -> f { f[x][y] } } }[-> p { -> x { x } }][-> p { -> x { x } }]]] }][m] } }[m][n]][n][x] }][m] } } }][n][-> p { -> x { p[p[p[p[p[x]]]]] } }]]][-> l { -> x { -> x { -> y { -> f { f[x][y] } } }[-> x { -> y { y } }][-> x { -> y { -> f { f[x][y] } } }[x][l]] } }[-> l { -> x { -> x { -> y { -> f { f[x][y] } } }[-> x { -> y { y } }][-> x { -> y { -> f { f[x][y] } } }[x][l]] } }[-> l { -> x { -> x { -> y { -> f { f[x][y] } } }[-> x { -> y { y } }][-> x { -> y { -> f { f[x][y] } } }[x][l]] } }[-> l { -> x { -> x { -> y { -> f { f[x][y] } } }[-> x { -> y { y } }][-> x { -> y { -> f { f[x][y] } } }[x][l]] } }[-> x { -> y { -> f { f[x][y] } } }[-> x { -> y { x } }][-> x { -> y { x } }]][-> n { -> p { -> x { p[n[p][x]] } } }[-> n { -> p { -> x { p[n[p][x]] } } }[-> n { -> p { -> x { p[n[p][x]] } } }[-> n { -> p { -> x { p[n[p][x]] } } }[-> m { -> n { n[-> m { -> n { n[-> n { -> p { -> x { p[n[p][x]] } } }][m] } }[m]][-> p { -> x { x } }] } }[-> p { -> x { p[p[x]] } }][-> p { -> x { p[p[p[p[p[x]]]]] } }]]]]]]][-> n { -> p { -> x { p[n[p][x]] } } }[-> n { -> p { -> x { p[n[p][x]] } } }[-> n { -> p { -> x { p[n[p][x]] } } }[-> n { -> p { -> x { p[n[p][x]] } } }[-> m { -> n { n[-> m { -> n { n[-> n { -> p { -> x { p[n[p][x]] } } }][m] } }[m]][-> p { -> x { x } }] } }[-> p { -> x { p[p[x]] } }][-> p { -> x { p[p[p[p[p[x]]]]] } }]]]]]]][-> n { -> p { -> x { p[n[p][x]] } } }[-> n { -> p { -> x { p[n[p][x]] } } }[-> n { -> p { -> x { p[n[p][x]] } } }[-> m { -> n { n[-> m { -> n { n[-> n { -> p { -> x { p[n[p][x]] } } }][m] } }[m]][-> p { -> x { x } }] } }[-> p { -> x { p[p[x]] } }][-> p { -> x { p[p[p[p[p[x]]]]] } }]]]]]][-> m { -> n { n[-> m { -> n { n[-> n { -> p { -> x { p[n[p][x]] } } }][m] } }[m]][-> p { -> x { x } }] } }[-> p { -> x { p[p[x]] } }][-> p { -> x { p[p[p[p[p[x]]]]] } }]]][-> f { -> x { f[-> y { x[x][y] }] }[-> x { f[-> y { x[x][y] }] }] }[-> f { -> n { -> l { -> x { -> f { -> x { f[-> y { x[x][y] }] }[-> x { f[-> y { x[x][y] }] }] }[-> f { -> l { -> x { -> g { -> b { b }[-> p { p[-> x { -> y { x } }] }[l]][x][-> y { g[f[-> l { -> p { p[-> x { -> y { y } }] }[-> p { p[-> x { -> y { y } }] }[l]] }[l]][x][g]][-> l { -> p { p[-> x { -> y { x } }] }[-> p { p[-> x { -> y { y } }] }[l]] }[l]][y] }] } } } }][l][-> l { -> x { -> x { -> y { -> f { f[x][y] } } }[-> x { -> y { y } }][-> x { -> y { -> f { f[x][y] } } }[x][l]] } }[-> x { -> y { -> f { f[x][y] } } }[-> x { -> y { x } }][-> x { -> y { x } }]][x]][-> l { -> x { -> x { -> y { -> f { f[x][y] } } }[-> x { -> y { y } }][-> x { -> y { -> f { f[x][y] } } }[x][l]] } }] } }[-> b { b }[-> m { -> n { -> n { n[-> x { -> x { -> y { y } } }][-> x { -> y { x } }] }[-> m { -> n { n[-> n { -> p { p[-> x { -> y { x } }] }[n[-> p { -> x { -> y { -> f { f[x][y] } } }[-> p { p[-> x { -> y { y } }] }[p]][-> n { -> p { -> x { p[n[p][x]] } } }[-> p { p[-> x { -> y { y } }] }[p]]] }][-> x { -> y { -> f { f[x][y] } } }[-> p { -> x { x } }][-> p { -> x { x } }]]] }][m] } }[m][n]] } }[n][-> n { -> p { p[-> x { -> y { x } }] }[n[-> p { -> x { -> y { -> f { f[x][y] } } }[-> p { p[-> x { -> y { y } }] }[p]][-> n { -> p { -> x { p[n[p][x]] } } }[-> p { p[-> x { -> y { y } }] }[p]]] }][-> x { -> y { -> f { f[x][y] } } }[-> p { -> x { x } }][-> p { -> x { x } }]]] }[-> m { -> n { n[-> m { -> n { n[-> n { -> p { -> x { p[n[p][x]] } } }][m] } }[m]][-> p { -> x { x } }] } }[-> p { -> x { p[p[x]] } }][-> p { -> x { p[p[p[p[p[x]]]]] } }]]]][-> x { -> y { -> f { f[x][y] } } }[-> x { -> y { x } }][-> x { -> y { x } }]][-> x { f[-> f { -> x { f[-> y { x[x][y] }] }[-> x { f[-> y { x[x][y] }] }] }[-> f { -> m { -> n { -> b { b }[-> m { -> n { -> n { n[-> x { -> x { -> y { y } } }][-> x { -> y { x } }] }[-> m { -> n { n[-> n { -> p { p[-> x { -> y { x } }] }[n[-> p { -> x { -> y { -> f { f[x][y] } } }[-> p { p[-> x { -> y { y } }] }[p]][-> n { -> p { -> x { p[n[p][x]] } } }[-> p { p[-> x { -> y { y } }] }[p]]] }][-> x { -> y { -> f { f[x][y] } } }[-> p { -> x { x } }][-> p { -> x { x } }]]] }][m] } }[m][n]] } }[n][m]][-> x { -> n { -> p { -> x { p[n[p][x]] } } }[f[-> m { -> n { n[-> n { -> p { p[-> x { -> y { x } }] }[n[-> p { -> x { -> y { -> f { f[x][y] } } }[-> p { p[-> x { -> y { y } }] }[p]][-> n { -> p { -> x { p[n[p][x]] } } }[-> p { p[-> x { -> y { y } }] }[p]]] }][-> x { -> y { -> f { f[x][y] } } }[-> p { -> x { x } }][-> p { -> x { x } }]]] }][m] } }[m][n]][n]][x] }][-> p { -> x { x } }] } } }][n][-> m { -> n { n[-> m { -> n { n[-> n { -> p { -> x { p[n[p][x]] } } }][m] } }[m]][-> p { -> x { x } }] } }[-> p { -> x { p[p[x]] } }][-> p { -> x { p[p[p[p[p[x]]]]] } }]]][x] }]][-> f { -> x { f[-> y { x[x][y] }] }[-> x { f[-> y { x[x][y] }] }] }[-> f { -> m { -> n { -> b { b }[-> m { -> n { -> n { n[-> x { -> x { -> y { y } } }][-> x { -> y { x } }] }[-> m { -> n { n[-> n { -> p { p[-> x { -> y { x } }] }[n[-> p { -> x { -> y { -> f { f[x][y] } } }[-> p { p[-> x { -> y { y } }] }[p]][-> n { -> p { -> x { p[n[p][x]] } } }[-> p { p[-> x { -> y { y } }] }[p]]] }][-> x { -> y { -> f { f[x][y] } } }[-> p { -> x { x } }][-> p { -> x { x } }]]] }][m] } }[m][n]] } }[n][m]][-> x { f[-> m { -> n { n[-> n { -> p { p[-> x { -> y { x } }] }[n[-> p { -> x { -> y { -> f { f[x][y] } } }[-> p { p[-> x { -> y { y } }] }[p]][-> n { -> p { -> x { p[n[p][x]] } } }[-> p { p[-> x { -> y { y } }] }[p]]] }][-> x { -> y { -> f { f[x][y] } } }[-> p { -> x { x } }][-> p { -> x { x } }]]] }][m] } }[m][n]][n][x] }][m] } } }][n][-> m { -> n { n[-> m { -> n { n[-> n { -> p { -> x { p[n[p][x]] } } }][m] } }[m]][-> p { -> x { x } }] } }[-> p { -> x { p[p[x]] } }][-> p { -> x { p[p[p[p[p[x]]]]] } }]]] } }][n]]]] }]
+
+FIRST = -> l { LEFT[RIGHT[l]] }
+IF = -> b { b }
+LEFT = -> p { p[-> x { -> y { x } } ] }
+RIGHT = -> p { p[-> x { -> y { y } } ] }
+IS_EMPTY = LEFT
+REST = -> l { RIGHT[RIGHT[l]] }
+
+def to_integer(proc)
+ proc[-> n { n + 1 }][0]
+end
+
+def to_boolean(proc)
+ IF[proc][true][false]
+end
+
+def to_array(proc)
+ array = []
+
+ until to_boolean(IS_EMPTY[proc])
+ array.push(FIRST[proc])
+ proc = REST[proc]
+ end
+
+ array
+end
+
+def to_char(c)
+ '0123456789BFiuz'.slice(to_integer(c))
+end
+
+def to_string(s)
+ to_array(s).map { |c| to_char(c) }.join
+end
+
+answer = to_array(solution).map do |p|
+ to_string(p)
+end
+
+answer_ary = answer.to_a
+# puts answer_ary
diff --git a/benchmark/bm_array_shift.rb b/benchmark/bm_array_shift.rb
new file mode 100644
index 0000000000..798bb9e3f4
--- /dev/null
+++ b/benchmark/bm_array_shift.rb
@@ -0,0 +1,14 @@
+require 'benchmark'
+
+Benchmark.bm do |x|
+ [10_000,1_000_000,100_000_000].each do |n|
+ ary = Array.new(n,0)
+ GC.start
+ x.report("#{n}:shift"){ ary.shift }
+ (0..4).each do |i|
+ ary = Array.new(n,0)
+ GC.start
+ x.report("#{n}:shift(#{i})"){ ary.shift(i) }
+ end
+ end
+end
diff --git a/benchmark/bm_hash_aref_dsym.rb b/benchmark/bm_hash_aref_dsym.rb
new file mode 100644
index 0000000000..af4f8c36d4
--- /dev/null
+++ b/benchmark/bm_hash_aref_dsym.rb
@@ -0,0 +1,4 @@
+h = {}
+syms = ('a'..'z').map { |s| s.to_sym }
+syms.each { |s| h[s] = 1 }
+200_000.times { syms.each { |s| h[s] } }
diff --git a/benchmark/bm_hash_aref_dsym_long.rb b/benchmark/bm_hash_aref_dsym_long.rb
new file mode 100644
index 0000000000..9d7759379e
--- /dev/null
+++ b/benchmark/bm_hash_aref_dsym_long.rb
@@ -0,0 +1,21 @@
+# [ruby-core:70129] [Bug #11396]
+collection_size = 200000
+sample_size = 10000
+
+values = (1..collection_size).to_a.map do |x|
+ "THIS IS A LONGER STRING THAT IS ALSO UNIQUE #{x}"
+end
+
+symbol_hash = {}
+
+values.each do |x|
+ symbol_hash[x.to_sym] = 1
+end
+
+# use the same samples each time to minimize deviations
+rng = Random.new(0)
+symbol_sample_array = values.sample(sample_size, random: rng).map(&:to_sym)
+
+3000.times do
+ symbol_sample_array.each { |x| symbol_hash[x] }
+end
diff --git a/benchmark/bm_hash_aref_fix.rb b/benchmark/bm_hash_aref_fix.rb
new file mode 100644
index 0000000000..1346890582
--- /dev/null
+++ b/benchmark/bm_hash_aref_fix.rb
@@ -0,0 +1,4 @@
+h = {}
+nums = (1..26).to_a
+nums.each { |i| h[i] = i }
+200_000.times { nums.each { |s| h[s] } }
diff --git a/benchmark/bm_hash_aref_flo.rb b/benchmark/bm_hash_aref_flo.rb
new file mode 100644
index 0000000000..2217274c82
--- /dev/null
+++ b/benchmark/bm_hash_aref_flo.rb
@@ -0,0 +1,4 @@
+h = {}
+strs = [*1..10000].map! {|i| i.fdiv(10)}
+strs.each { |s| h[s] = s }
+50.times { strs.each { |s| h[s] } }
diff --git a/benchmark/bm_hash_aref_miss.rb b/benchmark/bm_hash_aref_miss.rb
new file mode 100644
index 0000000000..b0913dd4bb
--- /dev/null
+++ b/benchmark/bm_hash_aref_miss.rb
@@ -0,0 +1,5 @@
+h = {}
+strs = ('a'..'z').to_a.map!(&:freeze)
+strs.each { |s| h[s] = s }
+strs = ('A'..'Z').to_a
+200_000.times { strs.each { |s| h[s] } }
diff --git a/benchmark/bm_hash_aref_str.rb b/benchmark/bm_hash_aref_str.rb
new file mode 100644
index 0000000000..19439b061b
--- /dev/null
+++ b/benchmark/bm_hash_aref_str.rb
@@ -0,0 +1,4 @@
+h = {}
+strs = ('a'..'z').to_a.map!(&:freeze)
+strs.each { |s| h[s] = s }
+200_000.times { strs.each { |s| h[s] } }
diff --git a/benchmark/bm_hash_aref_sym.rb b/benchmark/bm_hash_aref_sym.rb
new file mode 100644
index 0000000000..f75d163fe6
--- /dev/null
+++ b/benchmark/bm_hash_aref_sym.rb
@@ -0,0 +1,9 @@
+h = {}
+syms = ('a'..'z').to_a
+begin
+ syms = eval("%i[#{syms.join(' ')}]")
+rescue SyntaxError # <= 1.9.3
+ syms.map!(&:to_sym)
+end
+syms.each { |s| h[s] = s }
+200_000.times { syms.each { |s| h[s] } }
diff --git a/benchmark/bm_hash_aref_sym_long.rb b/benchmark/bm_hash_aref_sym_long.rb
new file mode 100644
index 0000000000..9dab8df7be
--- /dev/null
+++ b/benchmark/bm_hash_aref_sym_long.rb
@@ -0,0 +1,13 @@
+h = {}
+syms = %w[puts warn syswrite write stat bacon lettuce tomato
+some symbols in this array may already be interned others should not be
+hash browns make good breakfast but not cooked using prime numbers
+shift for division entries delete_if keys exist?
+]
+begin
+ syms = eval("%i[#{syms.join(' ')}]")
+rescue SyntaxError # <= 1.9.3
+ syms.map!(&:to_sym)
+end
+syms.each { |s| h[s] = s }
+200_000.times { syms.each { |s| h[s] } }
diff --git a/benchmark/bm_hash_ident_flo.rb b/benchmark/bm_hash_ident_flo.rb
new file mode 100644
index 0000000000..0c7edfed3e
--- /dev/null
+++ b/benchmark/bm_hash_ident_flo.rb
@@ -0,0 +1,4 @@
+h = {}.compare_by_identity
+strs = (1..10000).to_a.map!(&:to_f)
+strs.each { |s| h[s] = s }
+50.times { strs.each { |s| h[s] } }
diff --git a/benchmark/bm_hash_ident_num.rb b/benchmark/bm_hash_ident_num.rb
new file mode 100644
index 0000000000..b226736c6f
--- /dev/null
+++ b/benchmark/bm_hash_ident_num.rb
@@ -0,0 +1,4 @@
+h = {}.compare_by_identity
+nums = (1..26).to_a
+nums.each { |n| h[n] = n }
+200_000.times { nums.each { |n| h[n] } }
diff --git a/benchmark/bm_hash_ident_obj.rb b/benchmark/bm_hash_ident_obj.rb
new file mode 100644
index 0000000000..4b3b58edec
--- /dev/null
+++ b/benchmark/bm_hash_ident_obj.rb
@@ -0,0 +1,4 @@
+h = {}.compare_by_identity
+objs = 26.times.map { Object.new }
+objs.each { |o| h[o] = o }
+200_000.times { objs.each { |o| h[o] } }
diff --git a/benchmark/bm_hash_ident_str.rb b/benchmark/bm_hash_ident_str.rb
new file mode 100644
index 0000000000..8582b38e31
--- /dev/null
+++ b/benchmark/bm_hash_ident_str.rb
@@ -0,0 +1,4 @@
+h = {}.compare_by_identity
+strs = ('a'..'z').to_a
+strs.each { |s| h[s] = s }
+200_000.times { strs.each { |s| h[s] } }
diff --git a/benchmark/bm_hash_ident_sym.rb b/benchmark/bm_hash_ident_sym.rb
new file mode 100644
index 0000000000..4c81e3d28e
--- /dev/null
+++ b/benchmark/bm_hash_ident_sym.rb
@@ -0,0 +1,4 @@
+h = {}.compare_by_identity
+syms = ('a'..'z').to_a.map(&:to_sym)
+syms.each { |s| h[s] = s }
+200_000.times { syms.each { |s| h[s] } }
diff --git a/benchmark/bm_hash_shift_u16.rb b/benchmark/bm_hash_shift_u16.rb
new file mode 100644
index 0000000000..ec800d0342
--- /dev/null
+++ b/benchmark/bm_hash_shift_u16.rb
@@ -0,0 +1,10 @@
+h = {}
+
+(16384..65536).each do |i|
+ h[i] = nil
+end
+
+300000.times do
+ k, v = h.shift
+ h[k] = v
+end
diff --git a/benchmark/bm_hash_shift_u24.rb b/benchmark/bm_hash_shift_u24.rb
new file mode 100644
index 0000000000..de4e0fa696
--- /dev/null
+++ b/benchmark/bm_hash_shift_u24.rb
@@ -0,0 +1,10 @@
+h = {}
+
+(0xff4000..0xffffff).each do |i|
+ h[i] = nil
+end
+
+300000.times do
+ k, v = h.shift
+ h[k] = v
+end
diff --git a/benchmark/bm_hash_shift_u32.rb b/benchmark/bm_hash_shift_u32.rb
new file mode 100644
index 0000000000..656aa55583
--- /dev/null
+++ b/benchmark/bm_hash_shift_u32.rb
@@ -0,0 +1,10 @@
+h = {}
+
+(0xffff4000..0xffffffff).each do |i|
+ h[i] = nil
+end
+
+300000.times do
+ k, v = h.shift
+ h[k] = v
+end
diff --git a/benchmark/bm_hash_to_proc.rb b/benchmark/bm_hash_to_proc.rb
new file mode 100644
index 0000000000..2b675bf509
--- /dev/null
+++ b/benchmark/bm_hash_to_proc.rb
@@ -0,0 +1,9 @@
+h = {}
+
+10000.times do |i|
+ h[i] = nil
+end
+
+5000.times do |i|
+ [i].map(&h)
+end
diff --git a/benchmark/bm_io_nonblock_noex.rb b/benchmark/bm_io_nonblock_noex.rb
new file mode 100644
index 0000000000..da9357fdc6
--- /dev/null
+++ b/benchmark/bm_io_nonblock_noex.rb
@@ -0,0 +1,22 @@
+nr = 1_000_000
+i = 0
+msg = '.'
+buf = '.'
+noex = { exception: false }
+begin
+ r, w = IO.pipe
+ while i < nr
+ i += 1
+ w.write_nonblock(msg, noex)
+ r.read_nonblock(1, buf, noex)
+ end
+rescue ArgumentError # old Rubies
+ while i < nr
+ i += 1
+ w.write_nonblock(msg)
+ r.read_nonblock(1, buf)
+ end
+ensure
+ r.close
+ w.close
+end
diff --git a/benchmark/bm_io_nonblock_noex2.rb b/benchmark/bm_io_nonblock_noex2.rb
new file mode 100644
index 0000000000..56819d049b
--- /dev/null
+++ b/benchmark/bm_io_nonblock_noex2.rb
@@ -0,0 +1,21 @@
+nr = 1_000_000
+i = 0
+msg = '.'
+buf = '.'
+begin
+ r, w = IO.pipe
+ while i < nr
+ i += 1
+ w.write_nonblock(msg, exception: false)
+ r.read_nonblock(1, buf, exception: false)
+ end
+rescue ArgumentError # old Rubies
+ while i < nr
+ i += 1
+ w.write_nonblock(msg)
+ r.read_nonblock(1, buf)
+ end
+ensure
+ r.close
+ w.close
+end
diff --git a/benchmark/bm_marshal_dump_flo.rb b/benchmark/bm_marshal_dump_flo.rb
new file mode 100644
index 0000000000..9b8d0c6afb
--- /dev/null
+++ b/benchmark/bm_marshal_dump_flo.rb
@@ -0,0 +1,2 @@
+bug10761 = 10000.times.map { |x| x.to_f }
+100.times { Marshal.dump(bug10761) }
diff --git a/benchmark/bm_marshal_dump_load_geniv.rb b/benchmark/bm_marshal_dump_load_geniv.rb
new file mode 100644
index 0000000000..8252ad90fa
--- /dev/null
+++ b/benchmark/bm_marshal_dump_load_geniv.rb
@@ -0,0 +1,10 @@
+a = ''
+a.instance_eval do
+ @a = :a
+ @b = :b
+ @c = :c
+end
+100000.times do
+ a = Marshal.load(Marshal.dump(a))
+end
+#p(a.instance_eval { @a == :a && @b == :b && @c == :c })
diff --git a/benchmark/bm_marshal_dump_load_time.rb b/benchmark/bm_marshal_dump_load_time.rb
new file mode 100644
index 0000000000..e29743b791
--- /dev/null
+++ b/benchmark/bm_marshal_dump_load_time.rb
@@ -0,0 +1 @@
+100000.times { Marshal.load(Marshal.dump(Time.now)) }
diff --git a/benchmark/bm_require.rb b/benchmark/bm_require.rb
new file mode 100644
index 0000000000..b8abc88f41
--- /dev/null
+++ b/benchmark/bm_require.rb
@@ -0,0 +1,7 @@
+$:.push File.join(File.dirname(__FILE__), "bm_require.data")
+
+1.upto(10000) do |i|
+ require "c#{i}"
+end
+
+$:.pop
diff --git a/benchmark/bm_require_thread.rb b/benchmark/bm_require_thread.rb
new file mode 100644
index 0000000000..e54db6c6e5
--- /dev/null
+++ b/benchmark/bm_require_thread.rb
@@ -0,0 +1,15 @@
+$:.push File.join(File.dirname(__FILE__), "bm_require.data")
+
+i=0
+t = Thread.new do
+ while true
+ i = i+1 # dummy loop
+ end
+end
+
+1.upto(100) do |i|
+ require "c#{i}"
+end
+
+$:.pop
+t.kill
diff --git a/benchmark/bm_securerandom.rb b/benchmark/bm_securerandom.rb
new file mode 100644
index 0000000000..a082ea6d5b
--- /dev/null
+++ b/benchmark/bm_securerandom.rb
@@ -0,0 +1,5 @@
+require "securerandom"
+
+20_0000.times do
+ SecureRandom.random_number(100)
+end
diff --git a/benchmark/bm_so_meteor_contest.rb b/benchmark/bm_so_meteor_contest.rb
index 99cf6a91cc..17e9c046a8 100644
--- a/benchmark/bm_so_meteor_contest.rb
+++ b/benchmark/bm_so_meteor_contest.rb
@@ -32,7 +32,7 @@ class Rotation
@start_masks = Array.new(60)
# create the rotational masks by placing the base mask at the location and seeing if
- # 1) it overlaps the boundries and 2) it produces a prunable board. if either of these
+ # 1) it overlaps the boundaries and 2) it produces a prunable board. if either of these
# is true the piece cannot be placed
0.upto(59) do | offset |
mask = is_even(offset) ? (@even_mask << offset) : (@odd_mask << offset)
@@ -326,9 +326,9 @@ end
# The exact procedure is described in-code
def prunable( board, location, slotting = false)
collectors = []
- # loop accross the rows
+ # loop across the rows
(location / 6).to_i.upto(9) do | row_on |
- # obtain a set of regions representing the bits of the curent row.
+ # obtain a set of regions representing the bits of the current row.
regions = $regions[(board >> (row_on * 6)) & 0b11111]
converter = $converter[row_on]
@@ -370,7 +370,7 @@ def prunable( board, location, slotting = false)
end
# check the existing collectors, if any collector overlapped no bits in the region its [2] value will
- # be zero. The size of any such reaason is tested if it is not a muliple of five true is returned since
+ # be zero. The size of any such reaason is tested if it is not a multiple of five true is returned since
# the board is prunable. if it is a multiple of five it is removed.
# Collector that are still active have a new adjacent value [0] set based n the matched bits
# and have [2] cleared out for the next cycle.
@@ -382,7 +382,7 @@ def prunable( board, location, slotting = false)
collectors[collector_num] = nil
else
# if a collector matches all bits in the row then we can return unprunable early for the
- # follwing reasons:
+ # following reasons:
# 1) there can be no more unavailable bits bince we fill from the top left downward
# 2) all previous regions have been closed or joined so only this region can fail
# 3) this region must be good since there can never be only 1 region that is nuot
@@ -467,7 +467,7 @@ def find_top( rotation_skip)
end
# the normail find routine, iterates through the available pieces, checks all rotations at the current location
-# and adds any boards found. depth is acheived via recursion. the overall approach is described
+# and adds any boards found. depth is achieved via recursion. the overall approach is described
# here: http://www-128.ibm.com/developerworks/java/library/j-javaopt/
# parameters:
# start_location -- where to start looking for place for the next piece at
@@ -526,7 +526,7 @@ def save( board_string)
@boards_found += 1
# the exit motif is a time saver. Ideally the function should return, but those tests
- # take noticable time (performance).
+ # take noticeable time (performance).
if (@boards_found == @stop_count) then
print_results
exit(0)
diff --git a/benchmark/bm_vm1_gc_wb_ary.rb b/benchmark/bm_vm1_gc_wb_ary.rb
index ecfab51dbf..881528845b 100644
--- a/benchmark/bm_vm1_gc_wb_ary.rb
+++ b/benchmark/bm_vm1_gc_wb_ary.rb
@@ -1,10 +1,12 @@
-long_lived = []
-GC.start
-GC.start
+short_lived_ary = []
+
+if RUBY_VERSION >= "2.2.0"
+ GC.start(full_mark: false, immediate_mark: true, lazy_sweep: false)
+end
i = 0
short_lived = ''
while i<30_000_000 # while loop 1
- long_lived[0] = short_lived # write barrier
+ short_lived_ary[0] = short_lived # write barrier
i+=1
end
diff --git a/benchmark/bm_vm1_gc_wb_ary_promoted.rb b/benchmark/bm_vm1_gc_wb_ary_promoted.rb
new file mode 100644
index 0000000000..3c8279c956
--- /dev/null
+++ b/benchmark/bm_vm1_gc_wb_ary_promoted.rb
@@ -0,0 +1,14 @@
+long_lived = []
+
+if RUBY_VERSION > "2.2.0"
+ 3.times{ GC.start(full_mark: false, immediate_mark: true, lazy_sweep: false) }
+elsif
+ GC.start
+end
+
+i = 0
+short_lived = ''
+while i<30_000_000 # while loop 1
+ long_lived[0] = short_lived # write barrier
+ i+=1
+end
diff --git a/benchmark/bm_vm1_gc_wb_obj.rb b/benchmark/bm_vm1_gc_wb_obj.rb
index 017eff4f94..a4067af36b 100644
--- a/benchmark/bm_vm1_gc_wb_obj.rb
+++ b/benchmark/bm_vm1_gc_wb_obj.rb
@@ -1,13 +1,15 @@
class C
attr_accessor :foo
end
-long_lived = C.new
-GC.start
-GC.start
+short_lived_obj = C.new
+
+if RUBY_VERSION >= "2.2.0"
+ GC.start(full_mark: false, immediate_mark: true, lazy_sweep: false)
+end
i = 0
short_lived = ''
while i<30_000_000 # while loop 1
- long_lived.foo = short_lived # write barrier
+ short_lived_obj.foo = short_lived # write barrier
i+=1
end
diff --git a/benchmark/bm_vm1_gc_wb_obj_promoted.rb b/benchmark/bm_vm1_gc_wb_obj_promoted.rb
new file mode 100644
index 0000000000..eee07a0248
--- /dev/null
+++ b/benchmark/bm_vm1_gc_wb_obj_promoted.rb
@@ -0,0 +1,17 @@
+class C
+ attr_accessor :foo
+end
+long_lived = C.new
+
+if RUBY_VERSION >= "2.2.0"
+ 3.times{ GC.start(full_mark: false, immediate_mark: true, lazy_sweep: false) }
+elsif
+ GC.start
+end
+
+i = 0
+short_lived = ''
+while i<30_000_000 # while loop 1
+ long_lived.foo = short_lived # write barrier
+ i+=1
+end
diff --git a/benchmark/bm_vm2_case_lit.rb b/benchmark/bm_vm2_case_lit.rb
new file mode 100644
index 0000000000..c62b294e0e
--- /dev/null
+++ b/benchmark/bm_vm2_case_lit.rb
@@ -0,0 +1,19 @@
+i = 0
+@ret = [ "foo", true, false, :sym, 6, nil, 0.1, 0xffffffffffffffff ]
+def foo(i)
+ @ret[i % @ret.size]
+end
+
+while i<6_000_000 # while loop 2
+ case foo(i)
+ when "foo" then :foo
+ when true then true
+ when false then false
+ when :sym then :sym
+ when 6 then :fix
+ when nil then nil
+ when 0.1 then :float
+ when 0xffffffffffffffff then :big
+ end
+ i += 1
+end
diff --git a/benchmark/bm_vm2_newlambda.rb b/benchmark/bm_vm2_newlambda.rb
new file mode 100644
index 0000000000..6422c9b0d0
--- /dev/null
+++ b/benchmark/bm_vm2_newlambda.rb
@@ -0,0 +1,5 @@
+i = 0
+while i<6_000_000 # benchmark loop 2
+ i += 1
+ lambda {}
+end
diff --git a/benchmark/bm_vm2_string_literal.rb b/benchmark/bm_vm2_string_literal.rb
new file mode 100644
index 0000000000..1d73036849
--- /dev/null
+++ b/benchmark/bm_vm2_string_literal.rb
@@ -0,0 +1,5 @@
+i = 0
+while i<6_000_000 # benchmark loop 2
+ i += 1
+ x = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+end
diff --git a/benchmark/bm_vm2_struct_big_aref_hi.rb b/benchmark/bm_vm2_struct_big_aref_hi.rb
new file mode 100644
index 0000000000..22cb26b0a5
--- /dev/null
+++ b/benchmark/bm_vm2_struct_big_aref_hi.rb
@@ -0,0 +1,7 @@
+s = Struct.new(*('a'..'z').map { |x| x.to_sym })
+x = s.new
+i = 0
+while i<6_000_000 # benchmark loop 2
+ i += 1
+ x.z # x[25]
+end
diff --git a/benchmark/bm_vm2_struct_big_aref_lo.rb b/benchmark/bm_vm2_struct_big_aref_lo.rb
new file mode 100644
index 0000000000..5e61a7087e
--- /dev/null
+++ b/benchmark/bm_vm2_struct_big_aref_lo.rb
@@ -0,0 +1,7 @@
+s = Struct.new(*('a'..'z').map { |x| x.to_sym })
+x = s.new
+i = 0
+while i<6_000_000 # benchmark loop 2
+ i += 1
+ x.k # x[10]
+end
diff --git a/benchmark/bm_vm2_struct_big_aset.rb b/benchmark/bm_vm2_struct_big_aset.rb
new file mode 100644
index 0000000000..5a1c3d16f3
--- /dev/null
+++ b/benchmark/bm_vm2_struct_big_aset.rb
@@ -0,0 +1,7 @@
+s = Struct.new(*('a'..'z').map { |x| x.to_sym })
+x = s.new
+i = 0
+while i<6_000_000 # benchmark loop 2
+ i += 1
+ x.k = i # x[10] = i
+end
diff --git a/benchmark/bm_vm2_struct_big_href_hi.rb b/benchmark/bm_vm2_struct_big_href_hi.rb
new file mode 100644
index 0000000000..fff940a80a
--- /dev/null
+++ b/benchmark/bm_vm2_struct_big_href_hi.rb
@@ -0,0 +1,7 @@
+s = Struct.new(*('a'..'z').map { |x| x.to_sym })
+x = s.new
+i = 0
+while i<6_000_000 # benchmark loop 2
+ i += 1
+ x[:z]
+end
diff --git a/benchmark/bm_vm2_struct_big_href_lo.rb b/benchmark/bm_vm2_struct_big_href_lo.rb
new file mode 100644
index 0000000000..5e4085d59d
--- /dev/null
+++ b/benchmark/bm_vm2_struct_big_href_lo.rb
@@ -0,0 +1,7 @@
+s = Struct.new(*('a'..'z').map { |x| x.to_sym })
+x = s.new
+i = 0
+while i<6_000_000 # benchmark loop 2
+ i += 1
+ x[:k]
+end
diff --git a/benchmark/bm_vm2_struct_big_hset.rb b/benchmark/bm_vm2_struct_big_hset.rb
new file mode 100644
index 0000000000..9c0cee4141
--- /dev/null
+++ b/benchmark/bm_vm2_struct_big_hset.rb
@@ -0,0 +1,7 @@
+s = Struct.new(*('a'..'z').map { |x| x.to_sym })
+x = s.new
+i = 0
+while i<6_000_000 # benchmark loop 2
+ i += 1
+ x[:k] = i
+end
diff --git a/benchmark/bm_vm2_struct_small_aref.rb b/benchmark/bm_vm2_struct_small_aref.rb
new file mode 100644
index 0000000000..8eaa555b41
--- /dev/null
+++ b/benchmark/bm_vm2_struct_small_aref.rb
@@ -0,0 +1,7 @@
+s = Struct.new(:a, :b, :c)
+x = s.new
+i = 0
+while i<6_000_000 # benchmark loop 2
+ i += 1
+ x.a
+end
diff --git a/benchmark/bm_vm2_struct_small_aset.rb b/benchmark/bm_vm2_struct_small_aset.rb
new file mode 100644
index 0000000000..ecd0f95669
--- /dev/null
+++ b/benchmark/bm_vm2_struct_small_aset.rb
@@ -0,0 +1,7 @@
+s = Struct.new(:a, :b, :c)
+x = s.new
+i = 0
+while i<6_000_000 # benchmark loop 2
+ i += 1
+ x.a = i
+end
diff --git a/benchmark/bm_vm2_struct_small_href.rb b/benchmark/bm_vm2_struct_small_href.rb
new file mode 100644
index 0000000000..2c88fee6bf
--- /dev/null
+++ b/benchmark/bm_vm2_struct_small_href.rb
@@ -0,0 +1,7 @@
+s = Struct.new(:a, :b, :c)
+x = s.new
+i = 0
+while i<6_000_000 # benchmark loop 2
+ i += 1
+ x[:a]
+end
diff --git a/benchmark/bm_vm2_struct_small_hset.rb b/benchmark/bm_vm2_struct_small_hset.rb
new file mode 100644
index 0000000000..33c36d20f1
--- /dev/null
+++ b/benchmark/bm_vm2_struct_small_hset.rb
@@ -0,0 +1,7 @@
+s = Struct.new(:a, :b, :c)
+x = s.new
+i = 0
+while i<6_000_000 # benchmark loop 2
+ i += 1
+ x[:a] = 1
+end
diff --git a/benchmark/bm_vm3_gc.rb b/benchmark/bm_vm3_gc.rb
index 7db9829d44..e668026915 100755..100644
--- a/benchmark/bm_vm3_gc.rb
+++ b/benchmark/bm_vm3_gc.rb
@@ -1,4 +1,3 @@
-#! /usr/bin/ruby
5000.times do
100.times do
{"xxxx"=>"yyyy"}
diff --git a/benchmark/bm_vm_symbol_block_pass.rb b/benchmark/bm_vm_symbol_block_pass.rb
new file mode 100644
index 0000000000..1d433353e1
--- /dev/null
+++ b/benchmark/bm_vm_symbol_block_pass.rb
@@ -0,0 +1,13 @@
+class C
+ 1000.times {|i|
+ eval("def i#{i};end")
+ }
+end
+
+c = C.new
+m = C.instance_methods(false)
+5_000.times do
+ m.each do |n|
+ c.tap(&n)
+ end
+end
diff --git a/benchmark/bm_vm_thread_close.rb b/benchmark/bm_vm_thread_close.rb
new file mode 100644
index 0000000000..3e9a265ce8
--- /dev/null
+++ b/benchmark/bm_vm_thread_close.rb
@@ -0,0 +1,6 @@
+1000.times { Thread.new { sleep } }
+i = 0
+while i<100_000 # benchmark loop 3
+ i += 1
+ IO.pipe.each(&:close)
+end
diff --git a/benchmark/bm_vm_thread_pipe.rb b/benchmark/bm_vm_thread_pipe.rb
index 272d231eba..112a621905 100644
--- a/benchmark/bm_vm_thread_pipe.rb
+++ b/benchmark/bm_vm_thread_pipe.rb
@@ -1,4 +1,4 @@
-# Mesure small and plenty pipe read/write.
+# Measure small and plenty pipe read/write.
# A performance may depend on GVL implementation.
lmax = 100_000
diff --git a/benchmark/driver.rb b/benchmark/driver.rb
index cbc72cf604..defe3c30be 100644
--- a/benchmark/driver.rb
+++ b/benchmark/driver.rb
@@ -29,6 +29,25 @@ class BenchmarkDriver
end
end
+ def self.load(input, type, opt)
+ attrs = [:executables, :results]
+ case type
+ when 'yaml'
+ require 'yaml'
+ h = YAML.load(input)
+ when 'json'
+ require 'json'
+ h = JSON.load(input)
+ else
+ h = eval(input.read)
+ end
+ obj = allocate
+ obj.instance_variable_set("@execs", h[:executables] || h["executables"])
+ obj.instance_variable_set("@results", h[:results] || h["results"])
+ obj.instance_variable_set("@opt", opt)
+ obj
+ end
+
def output *args
puts(*args)
@output and @output.puts(*args)
@@ -117,6 +136,25 @@ class BenchmarkDriver
end
def show_results
+ case @opt[:format]
+ when :tsv
+ strformat = "\t%1$s"
+ numformat = "\t%1$*2$.3f"
+ minwidth = 0
+ name_width = 0
+ when :markdown
+ markdown = true
+ strformat = "|%1$-*2$s"
+ numformat = "|%1$*2$.3f"
+ when :plain
+ strformat = " %1$-*2$s"
+ numformat = " %1$*2$.3f"
+ end
+
+ name_width ||= @results.map {|v,*| v.size}.max
+ minwidth ||= 7
+ width = @execs.map{|(_, v)| [v.size, minwidth].max}
+
output
if @verbose
@@ -128,6 +166,29 @@ class BenchmarkDriver
message "Elapsed time: #{Time.now - @start_time} (sec)"
end
+ if rawdata_output = @opt[:rawdata_output]
+ h = {}
+ h[:cpuinfo] = File.read('/proc/cpuinfo') if File.exist?('/proc/cpuinfo')
+ h[:executables] = @execs
+ h[:results] = @results
+ if (type = File.extname(rawdata_output)).empty?
+ type = rawdata_output
+ rawdata_output = @output.path.sub(/\.[^.\/]+\z/, '') << '.' << rawdata_output
+ end
+ case type
+ when 'yaml'
+ require 'yaml'
+ h = YAML.dump(h)
+ when 'json'
+ require 'json'
+ h = JSON.pretty_generate(h)
+ else
+ require 'pp'
+ h = h.pretty_inspect
+ end
+ open(rawdata_output, 'w') {|f| f.puts h}
+ end
+
output '-----------------------------------------------------------'
output 'benchmark results:'
@@ -136,19 +197,24 @@ class BenchmarkDriver
end
output "Execution time (sec)"
- output "name\t#{@execs.map{|(_, v)| v}.join("\t")}"
+ output if markdown
+ output ["name".ljust(name_width), @execs.map.with_index{|(_, v), i| sprintf(strformat, v, width[i])}].join("").rstrip
+ output ["-"*name_width, width.map{|n|":".rjust(n, "-")}].join("|") if markdown
@results.each{|v, result|
rets = []
s = adjusted_results(v, result){|r|
- rets << sprintf("%.3f", r)
+ rets << sprintf(numformat, r, width[rets.size])
}
- output "#{v}#{s}\t#{rets.join("\t")}"
+ v += s if s
+ output [v.ljust(name_width), rets].join("")
}
if @execs.size > 1
output
output "Speedup ratio: compare with the result of `#{@execs[0][1]}' (greater is better)"
- output "name\t#{@execs[1..-1].map{|(_, v)| v}.join("\t")}"
+ output if markdown
+ output ["name".ljust(name_width), @execs[1..-1].map.with_index{|(_, v), i| sprintf(strformat, v, width[i])}].join("").rstrip
+ output ["-"*name_width, width[1..-1].map{|n|":".rjust(n, "-")}].join("|") if markdown
@results.each{|v, result|
rets = []
first_value = nil
@@ -157,13 +223,14 @@ class BenchmarkDriver
if r == 0
rets << "Error"
else
- rets << sprintf("%.3f", first_value/r)
+ rets << sprintf(numformat, first_value/r, width[rets.size+1])
end
else
first_value = r
end
}
- output "#{v}#{s}\t#{rets.join("\t")}"
+ v += s if s
+ output [v.ljust(name_width), rets].join("")
}
end
@@ -238,6 +305,12 @@ class BenchmarkDriver
result
end
+ unless defined?(File::NULL)
+ if File.exist?('/dev/null')
+ File::NULL = '/dev/null'
+ end
+ end
+
def measure executable, file
cmd = "#{executable} #{@ruby_arg} #{file}"
@@ -259,7 +332,14 @@ if __FILE__ == $0
:execs => [],
:dir => File.dirname(__FILE__),
:repeat => 1,
- :output => "bmlog-#{Time.now.strftime('%Y%m%d-%H%M%S')}.#{$$}",
+ :output => nil,
+ :raw_output => nil,
+ :format => :tsv,
+ }
+ formats = {
+ :tsv => ".tsv",
+ :markdown => ".md",
+ :plain => ".txt",
}
parser = OptionParser.new{|o|
@@ -287,15 +367,34 @@ if __FILE__ == $0
o.on('--ruby-arg [ARG]', "Optional argument for ruby"){|a|
opt[:ruby_arg] = a
}
- o.on('-q', '--quiet', "Run without notify information except result table."){|q|
- opt[:quiet] = q
+ o.on('--rawdata-output [FILE]', 'output rawdata'){|r|
+ opt[:rawdata_output] = r
+ }
+ o.on('--load-rawdata=FILE', 'input rawdata'){|r|
+ opt[:rawdata_input] = r
+ }
+ o.on('-f', "--format=FORMAT", "output format (#{formats.keys.join(",")})", formats.keys){|r|
+ opt[:format] = r
}
o.on('-v', '--verbose'){|v|
opt[:verbose] = v
}
+ o.on('-q', '--quiet', "Run without notify information except result table."){|q|
+ opt[:quiet] = q
+ opt[:verbose] = false
+ }
}
parser.parse!(ARGV)
- BenchmarkDriver.benchmark(opt)
+ opt[:output] ||= "bmlog-#{Time.now.strftime('%Y%m%d-%H%M%S')}.#{$$}#{formats[opt[:format]]}"
+
+ if input = opt[:rawdata_input]
+ b = open(input) {|f|
+ BenchmarkDriver.load(f, File.extname(input)[1..-1], opt)
+ }
+ b.show_results
+ else
+ BenchmarkDriver.benchmark(opt)
+ end
end
diff --git a/benchmark/prepare_require.rb b/benchmark/prepare_require.rb
new file mode 100644
index 0000000000..c4786f04ad
--- /dev/null
+++ b/benchmark/prepare_require.rb
@@ -0,0 +1,25 @@
+require "fileutils"
+
+def prepare
+ num_files = 10000
+
+ basename = File.dirname($0)
+ data_dir = File.join(basename, "bm_require.data")
+
+ # skip if all of files exists
+ if File.exist?(File.join(data_dir, "c#{num_files}.rb"))
+ return
+ end
+
+ FileUtils.mkdir_p(data_dir)
+
+ 1.upto(num_files) do |i|
+ f = File.open("#{data_dir}/c#{i}.rb", "w")
+ f.puts <<-END
+ class C#{i}
+ end
+ END
+ end
+end
+
+prepare
diff --git a/benchmark/prepare_require_thread.rb b/benchmark/prepare_require_thread.rb
new file mode 100644
index 0000000000..339ecb8b39
--- /dev/null
+++ b/benchmark/prepare_require_thread.rb
@@ -0,0 +1,2 @@
+load File.join(File.dirname(__FILE__), "prepare_require.rb")
+
diff --git a/benchmark/prepare_so_k_nucleotide.rb b/benchmark/prepare_so_k_nucleotide.rb
index f28f4460a1..d83aeb7a7e 100644
--- a/benchmark/prepare_so_k_nucleotide.rb
+++ b/benchmark/prepare_so_k_nucleotide.rb
@@ -1,2 +1,2 @@
-require File.join(File.dirname(__FILE__), 'make_fasta_output')
+require_relative 'make_fasta_output'
prepare_fasta_output(100_000)
diff --git a/benchmark/prepare_so_reverse_complement.rb b/benchmark/prepare_so_reverse_complement.rb
index 7f089109de..da3ec2df14 100644
--- a/benchmark/prepare_so_reverse_complement.rb
+++ b/benchmark/prepare_so_reverse_complement.rb
@@ -1,2 +1,2 @@
-require File.join(File.dirname(__FILE__), 'make_fasta_output')
+require_relative 'make_fasta_output'
prepare_fasta_output(2_500_000)
diff --git a/bignum.c b/bignum.c
index 6c2cda3937..38380f6c4e 100644
--- a/bignum.c
+++ b/bignum.c
@@ -9,10 +9,9 @@
**********************************************************************/
-#include "ruby/ruby.h"
+#include "internal.h"
#include "ruby/thread.h"
#include "ruby/util.h"
-#include "internal.h"
#ifdef HAVE_STRINGS_H
#include <strings.h>
@@ -45,17 +44,17 @@ const char ruby_digitmap[] = "0123456789abcdefghijklmnopqrstuvwxyz";
STATIC_ASSERT(sizeof_bdigit_dbl, sizeof(BDIGIT_DBL) == SIZEOF_BDIGIT_DBL);
STATIC_ASSERT(sizeof_bdigit_dbl_signed, sizeof(BDIGIT_DBL_SIGNED) == SIZEOF_BDIGIT_DBL);
-STATIC_ASSERT(sizeof_bdigit, SIZEOF_BDIGITS <= sizeof(BDIGIT));
-STATIC_ASSERT(sizeof_bdigit_and_dbl, SIZEOF_BDIGITS*2 <= SIZEOF_BDIGIT_DBL);
+STATIC_ASSERT(sizeof_bdigit, SIZEOF_BDIGIT <= sizeof(BDIGIT));
+STATIC_ASSERT(sizeof_bdigit_and_dbl, SIZEOF_BDIGIT*2 <= SIZEOF_BDIGIT_DBL);
STATIC_ASSERT(bdigit_signedness, 0 < (BDIGIT)-1);
STATIC_ASSERT(bdigit_dbl_signedness, 0 < (BDIGIT_DBL)-1);
STATIC_ASSERT(bdigit_dbl_signed_signedness, 0 > (BDIGIT_DBL_SIGNED)-1);
-STATIC_ASSERT(rbignum_embed_len_max, RBIGNUM_EMBED_LEN_MAX <= (RBIGNUM_EMBED_LEN_MASK >> RBIGNUM_EMBED_LEN_SHIFT));
+STATIC_ASSERT(rbignum_embed_len_max, BIGNUM_EMBED_LEN_MAX <= (BIGNUM_EMBED_LEN_MASK >> BIGNUM_EMBED_LEN_SHIFT));
-#if SIZEOF_BDIGITS < SIZEOF_LONG
-STATIC_ASSERT(sizeof_long_and_sizeof_bdigit, SIZEOF_LONG % SIZEOF_BDIGITS == 0);
+#if SIZEOF_BDIGIT < SIZEOF_LONG
+STATIC_ASSERT(sizeof_long_and_sizeof_bdigit, SIZEOF_LONG % SIZEOF_BDIGIT == 0);
#else
-STATIC_ASSERT(sizeof_long_and_sizeof_bdigit, SIZEOF_BDIGITS % SIZEOF_LONG == 0);
+STATIC_ASSERT(sizeof_long_and_sizeof_bdigit, SIZEOF_BDIGIT % SIZEOF_LONG == 0);
#endif
#ifdef WORDS_BIGENDIAN
@@ -71,8 +70,8 @@ STATIC_ASSERT(sizeof_long_and_sizeof_bdigit, SIZEOF_BDIGITS % SIZEOF_LONG == 0);
#define FILL_LOWBITS(d, numbits) ((d) | (LSHIFTX(((d)*0+1), (numbits))-1))
#define POW2_P(x) (((x)&((x)-1))==0)
-#define BDIGITS(x) (RBIGNUM_DIGITS(x))
-#define BITSPERDIG (SIZEOF_BDIGITS*CHAR_BIT)
+#define BDIGITS(x) (BIGNUM_DIGITS(x))
+#define BITSPERDIG (SIZEOF_BDIGIT*CHAR_BIT)
#define BIGRAD ((BDIGIT_DBL)1 << BITSPERDIG)
#define BIGRAD_HALF ((BDIGIT)(BIGRAD >> 1))
#define BDIGIT_MSB(d) (((d) & BIGRAD_HALF) != 0)
@@ -82,25 +81,24 @@ STATIC_ASSERT(sizeof_long_and_sizeof_bdigit, SIZEOF_BDIGITS % SIZEOF_LONG == 0);
#define BDIGMAX ((BDIGIT)(BIGRAD-1))
#define BDIGIT_DBL_MAX (~(BDIGIT_DBL)0)
-#if SIZEOF_BDIGITS == 2
+#if SIZEOF_BDIGIT == 2
# define swap_bdigit(x) swap16(x)
-#elif SIZEOF_BDIGITS == 4
+#elif SIZEOF_BDIGIT == 4
# define swap_bdigit(x) swap32(x)
-#elif SIZEOF_BDIGITS == 8
+#elif SIZEOF_BDIGIT == 8
# define swap_bdigit(x) swap64(x)
#endif
-#define BIGZEROP(x) (RBIGNUM_LEN(x) == 0 || \
+#define BIGZEROP(x) (BIGNUM_LEN(x) == 0 || \
(BDIGITS(x)[0] == 0 && \
- (RBIGNUM_LEN(x) == 1 || bigzero_p(x))))
-#define BIGSIZE(x) (RBIGNUM_LEN(x) == 0 ? (size_t)0 : \
- BDIGITS(x)[RBIGNUM_LEN(x)-1] ? \
- (size_t)(RBIGNUM_LEN(x)*SIZEOF_BDIGITS - nlz(BDIGITS(x)[RBIGNUM_LEN(x)-1])/CHAR_BIT) : \
+ (BIGNUM_LEN(x) == 1 || bigzero_p(x))))
+#define BIGSIZE(x) (BIGNUM_LEN(x) == 0 ? (size_t)0 : \
+ BDIGITS(x)[BIGNUM_LEN(x)-1] ? \
+ (size_t)(BIGNUM_LEN(x)*SIZEOF_BDIGIT - nlz(BDIGITS(x)[BIGNUM_LEN(x)-1])/CHAR_BIT) : \
rb_absint_size(x, NULL))
#define BIGDIVREM_EXTRA_WORDS 1
-#define roomof(n, m) ((long)(((n)+(m)-1) / (m)))
-#define bdigit_roomof(n) roomof(n, SIZEOF_BDIGITS)
+#define bdigit_roomof(n) roomof(n, SIZEOF_BDIGIT)
#define BARY_ARGS(ary) ary, numberof(ary)
#define BARY_ADD(z, x, y) bary_add(BARY_ARGS(z), BARY_ARGS(x), BARY_ARGS(y))
@@ -109,8 +107,8 @@ STATIC_ASSERT(sizeof_long_and_sizeof_bdigit, SIZEOF_BDIGITS % SIZEOF_LONG == 0);
#define BARY_DIVMOD(q, r, x, y) bary_divmod(BARY_ARGS(q), BARY_ARGS(r), BARY_ARGS(x), BARY_ARGS(y))
#define BARY_ZERO_P(x) bary_zero_p(BARY_ARGS(x))
-#define RBIGNUM_SET_NEGATIVE_SIGN(b) RBIGNUM_SET_SIGN(b, 0)
-#define RBIGNUM_SET_POSITIVE_SIGN(b) RBIGNUM_SET_SIGN(b, 1)
+#define BIGNUM_SET_NEGATIVE_SIGN(b) BIGNUM_SET_SIGN(b, 0)
+#define BIGNUM_SET_POSITIVE_SIGN(b) BIGNUM_SET_SIGN(b, 1)
#define bignew(len,sign) bignew_1(rb_cBignum,(len),(sign))
@@ -148,21 +146,21 @@ static void bary_divmod(BDIGIT *qds, size_t qn, BDIGIT *rds, size_t rn, const BD
static VALUE bigmul0(VALUE x, VALUE y);
static void bary_mul_toom3(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn, BDIGIT *wds, size_t wn);
-static VALUE bignew_1(VALUE klass, long len, int sign);
+static VALUE bignew_1(VALUE klass, size_t len, int sign);
static inline VALUE bigtrunc(VALUE x);
static VALUE bigsq(VALUE x);
static void bigdivmod(VALUE x, VALUE y, volatile VALUE *divp, volatile VALUE *modp);
static inline VALUE power_cache_get_power(int base, int power_level, size_t *numdigits_ret);
-#if SIZEOF_BDIGITS <= SIZEOF_INT
-static int nlz(BDIGIT x) { return nlz_int((unsigned int)x) - (SIZEOF_INT-SIZEOF_BDIGITS) * CHAR_BIT; }
-#elif SIZEOF_BDIGITS <= SIZEOF_LONG
-static int nlz(BDIGIT x) { return nlz_long((unsigned long)x) - (SIZEOF_LONG-SIZEOF_BDIGITS) * CHAR_BIT; }
-#elif SIZEOF_BDIGITS <= SIZEOF_LONG_LONG
-static int nlz(BDIGIT x) { return nlz_long_long((unsigned LONG_LONG)x) - (SIZEOF_LONG_LONG-SIZEOF_BDIGITS) * CHAR_BIT; }
-#elif SIZEOF_BDIGITS <= SIZEOF_INT128_T
-static int nlz(BDIGIT x) { return nlz_int128((uint128_t)x) - (SIZEOF_INT128_T-SIZEOF_BDIGITS) * CHAR_BIT; }
+#if SIZEOF_BDIGIT <= SIZEOF_INT
+static int nlz(BDIGIT x) { return nlz_int((unsigned int)x) - (SIZEOF_INT-SIZEOF_BDIGIT) * CHAR_BIT; }
+#elif SIZEOF_BDIGIT <= SIZEOF_LONG
+static int nlz(BDIGIT x) { return nlz_long((unsigned long)x) - (SIZEOF_LONG-SIZEOF_BDIGIT) * CHAR_BIT; }
+#elif SIZEOF_BDIGIT <= SIZEOF_LONG_LONG
+static int nlz(BDIGIT x) { return nlz_long_long((unsigned LONG_LONG)x) - (SIZEOF_LONG_LONG-SIZEOF_BDIGIT) * CHAR_BIT; }
+#elif SIZEOF_BDIGIT <= SIZEOF_INT128_T
+static int nlz(BDIGIT x) { return nlz_int128((uint128_t)x) - (SIZEOF_INT128_T-SIZEOF_BDIGIT) * CHAR_BIT; }
#endif
#define U16(a) ((uint16_t)(a))
@@ -174,7 +172,7 @@ static int nlz(BDIGIT x) { return nlz_int128((uint128_t)x) - (SIZEOF_INT128_T-SI
#define U128(a,b,c,d) (((uint128_t)U64(a,b) << 64) | U64(c,d))
#endif
-/* The following scirpt, maxpow.rb, generates the tables follows.
+/* The following script, maxpow.rb, generates the tables follows.
def big(n, bits)
ns = []
@@ -218,7 +216,7 @@ end
*/
-#ifdef HAVE_UINT16_T
+#if SIZEOF_BDIGIT_DBL == 2
static const int maxpow16_exp[35] = {
15, 10, 7, 6, 6, 5, 5, 5, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
@@ -234,8 +232,7 @@ static const uint16_t maxpow16_num[35] = {
U16(0x00006978), U16(0x0000745f), U16(0x00008000), U16(0x00008c61),
U16(0x00009988), U16(0x0000a77b), U16(0x0000b640),
};
-#endif
-#ifdef HAVE_UINT32_T
+#elif SIZEOF_BDIGIT_DBL == 4
static const int maxpow32_exp[35] = {
31, 20, 15, 13, 12, 11, 10, 10, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7,
7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
@@ -251,8 +248,7 @@ static const uint32_t maxpow32_num[35] = {
U32(0x2b73a840), U32(0x34e63b41), U32(0x40000000), U32(0x4cfa3cc1),
U32(0x5c13d840), U32(0x6d91b519), U32(0x81bf1000),
};
-#endif
-#ifdef HAVE_UINT64_T
+#elif SIZEOF_BDIGIT_DBL == 8 && defined HAVE_UINT64_T
static const int maxpow64_exp[35] = {
63, 40, 31, 27, 24, 22, 21, 20, 19, 18, 17, 17, 16, 16, 15, 15, 15,
15, 14, 14, 14, 14, 13, 13, 13, 13, 13, 13, 13, 12, 12, 12, 12, 12,
@@ -278,8 +274,7 @@ static const uint64_t maxpow64_num[35] = {
U64(0x211e44f7,0xd02c1000), U64(0x2ee56725,0xf06e5c71),
U64(0x41c21cb8,0xe1000000),
};
-#endif
-#ifdef HAVE_UINT128_T
+#elif SIZEOF_BDIGIT_DBL == 16 && defined HAVE_UINT128_T
static const int maxpow128_exp[35] = {
127, 80, 63, 55, 49, 45, 42, 40, 38, 37, 35, 34, 33, 32, 31, 31, 30,
30, 29, 29, 28, 28, 27, 27, 27, 26, 26, 26, 26, 25, 25, 25, 25, 24,
@@ -665,7 +660,7 @@ bary_pack(int sign, BDIGIT *ds, size_t num_bdigits, void *words, size_t numwords
*((unsigned char *)words) = (unsigned char)(d = dp[0]);
return ((1 < de - dp || CLEAR_LOWBITS(d, 8) != 0) ? 2 : 1) * sign;
}
-#if defined(HAVE_UINT16_T) && 2 <= SIZEOF_BDIGITS
+#if defined(HAVE_UINT16_T) && 2 <= SIZEOF_BDIGIT
if (wordsize == 2 && (uintptr_t)words % ALIGNOF(uint16_t) == 0) {
uint16_t u = (uint16_t)(d = dp[0]);
if (need_swap) u = swap16(u);
@@ -673,7 +668,7 @@ bary_pack(int sign, BDIGIT *ds, size_t num_bdigits, void *words, size_t numwords
return ((1 < de - dp || CLEAR_LOWBITS(d, 16) != 0) ? 2 : 1) * sign;
}
#endif
-#if defined(HAVE_UINT32_T) && 4 <= SIZEOF_BDIGITS
+#if defined(HAVE_UINT32_T) && 4 <= SIZEOF_BDIGIT
if (wordsize == 4 && (uintptr_t)words % ALIGNOF(uint32_t) == 0) {
uint32_t u = (uint32_t)(d = dp[0]);
if (need_swap) u = swap32(u);
@@ -681,7 +676,7 @@ bary_pack(int sign, BDIGIT *ds, size_t num_bdigits, void *words, size_t numwords
return ((1 < de - dp || CLEAR_LOWBITS(d, 32) != 0) ? 2 : 1) * sign;
}
#endif
-#if defined(HAVE_UINT64_T) && 8 <= SIZEOF_BDIGITS
+#if defined(HAVE_UINT64_T) && 8 <= SIZEOF_BDIGIT
if (wordsize == 8 && (uintptr_t)words % ALIGNOF(uint64_t) == 0) {
uint64_t u = (uint64_t)(d = dp[0]);
if (need_swap) u = swap64(u);
@@ -696,40 +691,40 @@ bary_pack(int sign, BDIGIT *ds, size_t num_bdigits, void *words, size_t numwords
*((unsigned char *)words) = (unsigned char)(d = -(BDIGIT_DBL_SIGNED)dp[0]);
return (1 < de - dp || FILL_LOWBITS(d, 8) != -1) ? -2 : -1;
}
-#if defined(HAVE_UINT16_T) && 2 <= SIZEOF_BDIGITS
+#if defined(HAVE_UINT16_T) && 2 <= SIZEOF_BDIGIT
if (wordsize == 2 && (uintptr_t)words % ALIGNOF(uint16_t) == 0) {
uint16_t u = (uint16_t)(d = -(BDIGIT_DBL_SIGNED)dp[0]);
if (need_swap) u = swap16(u);
*((uint16_t *)words) = u;
- return (wordsize == SIZEOF_BDIGITS && de - dp == 2 && dp[1] == 1 && dp[0] == 0) ? -1 :
+ return (wordsize == SIZEOF_BDIGIT && de - dp == 2 && dp[1] == 1 && dp[0] == 0) ? -1 :
(1 < de - dp || FILL_LOWBITS(d, 16) != -1) ? -2 : -1;
}
#endif
-#if defined(HAVE_UINT32_T) && 4 <= SIZEOF_BDIGITS
+#if defined(HAVE_UINT32_T) && 4 <= SIZEOF_BDIGIT
if (wordsize == 4 && (uintptr_t)words % ALIGNOF(uint32_t) == 0) {
uint32_t u = (uint32_t)(d = -(BDIGIT_DBL_SIGNED)dp[0]);
if (need_swap) u = swap32(u);
*((uint32_t *)words) = u;
- return (wordsize == SIZEOF_BDIGITS && de - dp == 2 && dp[1] == 1 && dp[0] == 0) ? -1 :
+ return (wordsize == SIZEOF_BDIGIT && de - dp == 2 && dp[1] == 1 && dp[0] == 0) ? -1 :
(1 < de - dp || FILL_LOWBITS(d, 32) != -1) ? -2 : -1;
}
#endif
-#if defined(HAVE_UINT64_T) && 8 <= SIZEOF_BDIGITS
+#if defined(HAVE_UINT64_T) && 8 <= SIZEOF_BDIGIT
if (wordsize == 8 && (uintptr_t)words % ALIGNOF(uint64_t) == 0) {
uint64_t u = (uint64_t)(d = -(BDIGIT_DBL_SIGNED)dp[0]);
if (need_swap) u = swap64(u);
*((uint64_t *)words) = u;
- return (wordsize == SIZEOF_BDIGITS && de - dp == 2 && dp[1] == 1 && dp[0] == 0) ? -1 :
+ return (wordsize == SIZEOF_BDIGIT && de - dp == 2 && dp[1] == 1 && dp[0] == 0) ? -1 :
(1 < de - dp || FILL_LOWBITS(d, 64) != -1) ? -2 : -1;
}
#endif
}
}
#if !defined(WORDS_BIGENDIAN)
- if (nails == 0 && SIZEOF_BDIGITS == sizeof(BDIGIT) &&
+ if (nails == 0 && SIZEOF_BDIGIT == sizeof(BDIGIT) &&
(flags & INTEGER_PACK_WORDORDER_MASK) == INTEGER_PACK_LSWORD_FIRST &&
(flags & INTEGER_PACK_BYTEORDER_MASK) != INTEGER_PACK_MSBYTE_FIRST) {
- size_t src_size = (de - dp) * SIZEOF_BDIGITS;
+ size_t src_size = (de - dp) * SIZEOF_BDIGIT;
size_t dst_size = numwords * wordsize;
int overflow = 0;
while (0 < src_size && ((unsigned char *)ds)[src_size-1] == 0)
@@ -757,9 +752,9 @@ bary_pack(int sign, BDIGIT *ds, size_t num_bdigits, void *words, size_t numwords
return sign;
}
#endif
- if (nails == 0 && SIZEOF_BDIGITS == sizeof(BDIGIT) &&
- wordsize % SIZEOF_BDIGITS == 0 && (uintptr_t)words % ALIGNOF(BDIGIT) == 0) {
- size_t bdigits_per_word = wordsize / SIZEOF_BDIGITS;
+ if (nails == 0 && SIZEOF_BDIGIT == sizeof(BDIGIT) &&
+ wordsize % SIZEOF_BDIGIT == 0 && (uintptr_t)words % ALIGNOF(BDIGIT) == 0) {
+ size_t bdigits_per_word = wordsize / SIZEOF_BDIGIT;
size_t src_num_bdigits = de - dp;
size_t dst_num_bdigits = numwords * bdigits_per_word;
int overflow = 0;
@@ -970,7 +965,7 @@ integer_unpack_num_bdigits_small(size_t numwords, size_t wordsize, size_t nails,
static size_t
integer_unpack_num_bdigits_generic(size_t numwords, size_t wordsize, size_t nails, int *nlp_bits_ret)
{
- /* BITSPERDIG = SIZEOF_BDIGITS * CHAR_BIT */
+ /* BITSPERDIG = SIZEOF_BDIGIT * CHAR_BIT */
/* num_bits = (wordsize * CHAR_BIT - nails) * numwords */
/* num_bdigits = (num_bits + BITSPERDIG - 1) / BITSPERDIG */
@@ -1067,7 +1062,7 @@ integer_unpack_single_bdigit(BDIGIT u, size_t size, int flags, BDIGIT *dp)
int sign;
if (flags & INTEGER_PACK_2COMP) {
sign = (flags & INTEGER_PACK_NEGATIVE) ?
- ((size == SIZEOF_BDIGITS && u == 0) ? -2 : -1) :
+ ((size == SIZEOF_BDIGIT && u == 0) ? -2 : -1) :
((u >> (size * CHAR_BIT - 1)) ? -1 : 1);
if (sign < 0) {
u |= LSHIFTX(BDIGMAX, size * CHAR_BIT);
@@ -1099,19 +1094,19 @@ bary_unpack_internal(BDIGIT *bdigits, size_t num_bdigits, const void *words, siz
if (wordsize == 1) {
return integer_unpack_single_bdigit(*(uint8_t *)buf, sizeof(uint8_t), flags, dp);
}
-#if defined(HAVE_UINT16_T) && 2 <= SIZEOF_BDIGITS
+#if defined(HAVE_UINT16_T) && 2 <= SIZEOF_BDIGIT
if (wordsize == 2 && (uintptr_t)words % ALIGNOF(uint16_t) == 0) {
uint16_t u = *(uint16_t *)buf;
return integer_unpack_single_bdigit(need_swap ? swap16(u) : u, sizeof(uint16_t), flags, dp);
}
#endif
-#if defined(HAVE_UINT32_T) && 4 <= SIZEOF_BDIGITS
+#if defined(HAVE_UINT32_T) && 4 <= SIZEOF_BDIGIT
if (wordsize == 4 && (uintptr_t)words % ALIGNOF(uint32_t) == 0) {
uint32_t u = *(uint32_t *)buf;
return integer_unpack_single_bdigit(need_swap ? swap32(u) : u, sizeof(uint32_t), flags, dp);
}
#endif
-#if defined(HAVE_UINT64_T) && 8 <= SIZEOF_BDIGITS
+#if defined(HAVE_UINT64_T) && 8 <= SIZEOF_BDIGIT
if (wordsize == 8 && (uintptr_t)words % ALIGNOF(uint64_t) == 0) {
uint64_t u = *(uint64_t *)buf;
return integer_unpack_single_bdigit(need_swap ? swap64(u) : u, sizeof(uint64_t), flags, dp);
@@ -1119,11 +1114,11 @@ bary_unpack_internal(BDIGIT *bdigits, size_t num_bdigits, const void *words, siz
#endif
}
#if !defined(WORDS_BIGENDIAN)
- if (nails == 0 && SIZEOF_BDIGITS == sizeof(BDIGIT) &&
+ if (nails == 0 && SIZEOF_BDIGIT == sizeof(BDIGIT) &&
(flags & INTEGER_PACK_WORDORDER_MASK) == INTEGER_PACK_LSWORD_FIRST &&
(flags & INTEGER_PACK_BYTEORDER_MASK) != INTEGER_PACK_MSBYTE_FIRST) {
size_t src_size = numwords * wordsize;
- size_t dst_size = num_bdigits * SIZEOF_BDIGITS;
+ size_t dst_size = num_bdigits * SIZEOF_BDIGIT;
MEMCPY(dp, words, char, src_size);
if (flags & INTEGER_PACK_2COMP) {
if (flags & INTEGER_PACK_NEGATIVE) {
@@ -1149,9 +1144,9 @@ bary_unpack_internal(BDIGIT *bdigits, size_t num_bdigits, const void *words, siz
return sign;
}
#endif
- if (nails == 0 && SIZEOF_BDIGITS == sizeof(BDIGIT) &&
- wordsize % SIZEOF_BDIGITS == 0) {
- size_t bdigits_per_word = wordsize / SIZEOF_BDIGITS;
+ if (nails == 0 && SIZEOF_BDIGIT == sizeof(BDIGIT) &&
+ wordsize % SIZEOF_BDIGIT == 0) {
+ size_t bdigits_per_word = wordsize / SIZEOF_BDIGIT;
int mswordfirst_p = (flags & INTEGER_PACK_MSWORD_FIRST) != 0;
int msbytefirst_p = (flags & INTEGER_PACK_NATIVE_BYTE_ORDER) ? HOST_BIGENDIAN_P :
(flags & INTEGER_PACK_MSBYTE_FIRST) != 0;
@@ -1542,8 +1537,8 @@ bary_mul_normal(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIG
VALUE
rb_big_mul_normal(VALUE x, VALUE y)
{
- size_t xn = RBIGNUM_LEN(x), yn = RBIGNUM_LEN(y), zn = xn + yn;
- VALUE z = bignew(zn, RBIGNUM_SIGN(x)==RBIGNUM_SIGN(y));
+ size_t xn = BIGNUM_LEN(x), yn = BIGNUM_LEN(y), zn = xn + yn;
+ VALUE z = bignew(zn, BIGNUM_SIGN(x)==BIGNUM_SIGN(y));
bary_mul_normal(BDIGITS(z), zn, BDIGITS(x), xn, BDIGITS(y), yn);
RB_GC_GUARD(x);
RB_GC_GUARD(y);
@@ -1611,7 +1606,7 @@ bary_sq_fast(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn)
VALUE
rb_big_sq_fast(VALUE x)
{
- size_t xn = RBIGNUM_LEN(x), zn = 2 * xn;
+ size_t xn = BIGNUM_LEN(x), zn = 2 * xn;
VALUE z = bignew(zn, 1);
bary_sq_fast(BDIGITS(z), zn, BDIGITS(x), xn);
RB_GC_GUARD(x);
@@ -1653,7 +1648,7 @@ bary_mul_balance_with_mulfunc(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t
}
tds = zds + n;
MEMCPY(wds, zds + n, BDIGIT, xn);
- mulfunc(tds, tn, xds, xn, yds + n, r, wds-xn, wn-xn);
+ mulfunc(tds, tn, xds, xn, yds + n, r, wds+xn, wn-xn);
bary_add(zds + n, tn,
zds + n, tn,
wds, xn);
@@ -1670,8 +1665,8 @@ bary_mul_balance_with_mulfunc(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t
VALUE
rb_big_mul_balance(VALUE x, VALUE y)
{
- size_t xn = RBIGNUM_LEN(x), yn = RBIGNUM_LEN(y), zn = xn + yn;
- VALUE z = bignew(zn, RBIGNUM_SIGN(x)==RBIGNUM_SIGN(y));
+ size_t xn = BIGNUM_LEN(x), yn = BIGNUM_LEN(y), zn = xn + yn;
+ VALUE z = bignew(zn, BIGNUM_SIGN(x)==BIGNUM_SIGN(y));
bary_mul_balance_with_mulfunc(BDIGITS(z), zn, BDIGITS(x), xn, BDIGITS(y), yn, NULL, 0, bary_mul_toom3_start);
RB_GC_GUARD(x);
RB_GC_GUARD(y);
@@ -1826,12 +1821,12 @@ bary_mul_karatsuba(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const B
}
/*
- if (SIZEOF_BDIGITS * zn <= 16) {
+ if (SIZEOF_BDIGIT * zn <= 16) {
uint128_t z, x, y;
ssize_t i;
- for (x = 0, i = xn-1; 0 <= i; i--) { x <<= SIZEOF_BDIGITS*CHAR_BIT; x |= xds[i]; }
- for (y = 0, i = yn-1; 0 <= i; i--) { y <<= SIZEOF_BDIGITS*CHAR_BIT; y |= yds[i]; }
- for (z = 0, i = zn-1; 0 <= i; i--) { z <<= SIZEOF_BDIGITS*CHAR_BIT; z |= zds[i]; }
+ for (x = 0, i = xn-1; 0 <= i; i--) { x <<= SIZEOF_BDIGIT*CHAR_BIT; x |= xds[i]; }
+ for (y = 0, i = yn-1; 0 <= i; i--) { y <<= SIZEOF_BDIGIT*CHAR_BIT; y |= yds[i]; }
+ for (z = 0, i = zn-1; 0 <= i; i--) { z <<= SIZEOF_BDIGIT*CHAR_BIT; z |= zds[i]; }
assert(z == x * y);
}
*/
@@ -1851,8 +1846,8 @@ bary_mul_karatsuba(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const B
VALUE
rb_big_mul_karatsuba(VALUE x, VALUE y)
{
- size_t xn = RBIGNUM_LEN(x), yn = RBIGNUM_LEN(y), zn = xn + yn;
- VALUE z = bignew(zn, RBIGNUM_SIGN(x)==RBIGNUM_SIGN(y));
+ size_t xn = BIGNUM_LEN(x), yn = BIGNUM_LEN(y), zn = xn + yn;
+ VALUE z = bignew(zn, BIGNUM_SIGN(x)==BIGNUM_SIGN(y));
if (!((xn <= yn && yn < 2) || KARATSUBA_BALANCED(xn, yn)))
rb_raise(rb_eArgError, "unexpected bignum length for karatsuba");
bary_mul_karatsuba(BDIGITS(z), zn, BDIGITS(x), xn, BDIGITS(y), yn, NULL, 0);
@@ -2248,8 +2243,8 @@ bary_mul_toom3(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGI
VALUE
rb_big_mul_toom3(VALUE x, VALUE y)
{
- size_t xn = RBIGNUM_LEN(x), yn = RBIGNUM_LEN(y), zn = xn + yn;
- VALUE z = bignew(zn, RBIGNUM_SIGN(x)==RBIGNUM_SIGN(y));
+ size_t xn = BIGNUM_LEN(x), yn = BIGNUM_LEN(y), zn = xn + yn;
+ VALUE z = bignew(zn, BIGNUM_SIGN(x)==BIGNUM_SIGN(y));
if (xn > yn || yn < 3 || !TOOM3_BALANCED(xn,yn))
rb_raise(rb_eArgError, "unexpected bignum length for toom3");
bary_mul_toom3(BDIGITS(z), zn, BDIGITS(x), xn, BDIGITS(y), yn, NULL, 0);
@@ -2262,7 +2257,7 @@ rb_big_mul_toom3(VALUE x, VALUE y)
static void
bary_mul_gmp(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn)
{
- const size_t nails = (sizeof(BDIGIT)-SIZEOF_BDIGITS)*CHAR_BIT;
+ const size_t nails = (sizeof(BDIGIT)-SIZEOF_BDIGIT)*CHAR_BIT;
mpz_t x, y, z;
size_t count;
@@ -2289,8 +2284,8 @@ bary_mul_gmp(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT
VALUE
rb_big_mul_gmp(VALUE x, VALUE y)
{
- size_t xn = RBIGNUM_LEN(x), yn = RBIGNUM_LEN(y), zn = xn + yn;
- VALUE z = bignew(zn, RBIGNUM_SIGN(x)==RBIGNUM_SIGN(y));
+ size_t xn = BIGNUM_LEN(x), yn = BIGNUM_LEN(y), zn = xn + yn;
+ VALUE z = bignew(zn, BIGNUM_SIGN(x)==BIGNUM_SIGN(y));
bary_mul_gmp(BDIGITS(z), zn, BDIGITS(x), xn, BDIGITS(y), yn);
RB_GC_GUARD(x);
RB_GC_GUARD(y);
@@ -2363,7 +2358,7 @@ bary_mul_precheck(BDIGIT **zdsp, size_t *znp, const BDIGIT **xdsp, size_t *xnp,
}
else {
do {
- if (xds[0] != 0)
+ if (yds[0] != 0)
break;
yds++;
yn--;
@@ -2700,7 +2695,7 @@ bary_divmod_normal(BDIGIT *qds, size_t qn, BDIGIT *rds, size_t rn, const BDIGIT
VALUE
rb_big_divrem_normal(VALUE x, VALUE y)
{
- size_t xn = RBIGNUM_LEN(x), yn = RBIGNUM_LEN(y), qn, rn;
+ size_t xn = BIGNUM_LEN(x), yn = BIGNUM_LEN(y), qn, rn;
BDIGIT *xds = BDIGITS(x), *yds = BDIGITS(y), *qds, *rds;
VALUE q, r;
@@ -2713,11 +2708,11 @@ rb_big_divrem_normal(VALUE x, VALUE y)
return rb_assoc_new(LONG2FIX(0), x);
qn = xn + BIGDIVREM_EXTRA_WORDS;
- q = bignew(qn, RBIGNUM_SIGN(x)==RBIGNUM_SIGN(y));
+ q = bignew(qn, BIGNUM_SIGN(x)==BIGNUM_SIGN(y));
qds = BDIGITS(q);
rn = yn;
- r = bignew(rn, RBIGNUM_SIGN(x));
+ r = bignew(rn, BIGNUM_SIGN(x));
rds = BDIGITS(r);
bary_divmod_normal(qds, qn, rds, rn, xds, xn, yds, yn);
@@ -2735,7 +2730,7 @@ rb_big_divrem_normal(VALUE x, VALUE y)
static void
bary_divmod_gmp(BDIGIT *qds, size_t qn, BDIGIT *rds, size_t rn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn)
{
- const size_t nails = (sizeof(BDIGIT)-SIZEOF_BDIGITS)*CHAR_BIT;
+ const size_t nails = (sizeof(BDIGIT)-SIZEOF_BDIGIT)*CHAR_BIT;
mpz_t x, y, q, r;
size_t count;
@@ -2781,7 +2776,7 @@ bary_divmod_gmp(BDIGIT *qds, size_t qn, BDIGIT *rds, size_t rn, const BDIGIT *xd
VALUE
rb_big_divrem_gmp(VALUE x, VALUE y)
{
- size_t xn = RBIGNUM_LEN(x), yn = RBIGNUM_LEN(y), qn, rn;
+ size_t xn = BIGNUM_LEN(x), yn = BIGNUM_LEN(y), qn, rn;
BDIGIT *xds = BDIGITS(x), *yds = BDIGITS(y), *qds, *rds;
VALUE q, r;
@@ -2794,11 +2789,11 @@ rb_big_divrem_gmp(VALUE x, VALUE y)
return rb_assoc_new(LONG2FIX(0), x);
qn = xn - yn + 1;
- q = bignew(qn, RBIGNUM_SIGN(x)==RBIGNUM_SIGN(y));
+ q = bignew(qn, BIGNUM_SIGN(x)==BIGNUM_SIGN(y));
qds = BDIGITS(q);
rn = yn;
- r = bignew(rn, RBIGNUM_SIGN(x));
+ r = bignew(rn, BIGNUM_SIGN(x));
rds = BDIGITS(r);
bary_divmod_gmp(qds, qn, rds, rn, xds, xn, yds, yn);
@@ -2878,11 +2873,11 @@ static void
dump_bignum(VALUE x)
{
long i;
- printf("%c0x0", RBIGNUM_SIGN(x) ? '+' : '-');
- for (i = RBIGNUM_LEN(x); i--; ) {
- printf("_%0*"PRIxBDIGIT, SIZEOF_BDIGITS*2, BDIGITS(x)[i]);
+ printf("%c0x0", BIGNUM_SIGN(x) ? '+' : '-');
+ for (i = BIGNUM_LEN(x); i--; ) {
+ printf("_%0*"PRIxBDIGIT, SIZEOF_BDIGIT*2, BDIGITS(x)[i]);
}
- printf(", len=%lu", RBIGNUM_LEN(x));
+ printf(", len=%"PRIuSIZE, BIGNUM_LEN(x));
puts("");
}
@@ -2899,7 +2894,7 @@ rb_big_dump(VALUE x)
static int
bigzero_p(VALUE x)
{
- return bary_zero_p(BDIGITS(x), RBIGNUM_LEN(x));
+ return bary_zero_p(BDIGITS(x), BIGNUM_LEN(x));
}
int
@@ -2922,7 +2917,7 @@ rb_cmpint(VALUE val, VALUE a, VALUE b)
}
if (RB_BIGNUM_TYPE_P(val)) {
if (BIGZEROP(val)) return 0;
- if (RBIGNUM_SIGN(val)) return 1;
+ if (BIGNUM_SIGN(val)) return 1;
return -1;
}
if (RTEST(rb_funcall(val, '>', 1, INT2FIX(0)))) return 1;
@@ -2930,31 +2925,31 @@ rb_cmpint(VALUE val, VALUE a, VALUE b)
return 0;
}
-#define RBIGNUM_SET_LEN(b,l) \
- ((RBASIC(b)->flags & RBIGNUM_EMBED_FLAG) ? \
+#define BIGNUM_SET_LEN(b,l) \
+ ((RBASIC(b)->flags & BIGNUM_EMBED_FLAG) ? \
(void)(RBASIC(b)->flags = \
- (RBASIC(b)->flags & ~RBIGNUM_EMBED_LEN_MASK) | \
- ((l) << RBIGNUM_EMBED_LEN_SHIFT)) : \
+ (RBASIC(b)->flags & ~BIGNUM_EMBED_LEN_MASK) | \
+ ((l) << BIGNUM_EMBED_LEN_SHIFT)) : \
(void)(RBIGNUM(b)->as.heap.len = (l)))
static void
-rb_big_realloc(VALUE big, long len)
+rb_big_realloc(VALUE big, size_t len)
{
BDIGIT *ds;
- if (RBASIC(big)->flags & RBIGNUM_EMBED_FLAG) {
- if (RBIGNUM_EMBED_LEN_MAX < len) {
+ if (RBASIC(big)->flags & BIGNUM_EMBED_FLAG) {
+ if (BIGNUM_EMBED_LEN_MAX < len) {
ds = ALLOC_N(BDIGIT, len);
- MEMCPY(ds, RBIGNUM(big)->as.ary, BDIGIT, RBIGNUM_EMBED_LEN_MAX);
- RBIGNUM(big)->as.heap.len = RBIGNUM_LEN(big);
+ MEMCPY(ds, RBIGNUM(big)->as.ary, BDIGIT, BIGNUM_EMBED_LEN_MAX);
+ RBIGNUM(big)->as.heap.len = BIGNUM_LEN(big);
RBIGNUM(big)->as.heap.digits = ds;
- RBASIC(big)->flags &= ~RBIGNUM_EMBED_FLAG;
+ RBASIC(big)->flags &= ~BIGNUM_EMBED_FLAG;
}
}
else {
- if (len <= RBIGNUM_EMBED_LEN_MAX) {
+ if (len <= BIGNUM_EMBED_LEN_MAX) {
ds = RBIGNUM(big)->as.heap.digits;
- RBASIC(big)->flags |= RBIGNUM_EMBED_FLAG;
- RBIGNUM_SET_LEN(big, len);
+ RBASIC(big)->flags |= BIGNUM_EMBED_FLAG;
+ BIGNUM_SET_LEN(big, len);
(void)VALGRIND_MAKE_MEM_UNDEFINED((void*)RBIGNUM(big)->as.ary, sizeof(RBIGNUM(big)->as.ary));
if (ds) {
MEMCPY(RBIGNUM(big)->as.ary, ds, BDIGIT, len);
@@ -2962,7 +2957,7 @@ rb_big_realloc(VALUE big, long len)
}
}
else {
- if (RBIGNUM_LEN(big) == 0) {
+ if (BIGNUM_LEN(big) == 0) {
RBIGNUM(big)->as.heap.digits = ALLOC_N(BDIGIT, len);
}
else {
@@ -2973,20 +2968,20 @@ rb_big_realloc(VALUE big, long len)
}
void
-rb_big_resize(VALUE big, long len)
+rb_big_resize(VALUE big, size_t len)
{
rb_big_realloc(big, len);
- RBIGNUM_SET_LEN(big, len);
+ BIGNUM_SET_LEN(big, len);
}
static VALUE
-bignew_1(VALUE klass, long len, int sign)
+bignew_1(VALUE klass, size_t len, int sign)
{
NEWOBJ_OF(big, struct RBignum, klass, T_BIGNUM | (RGENGC_WB_PROTECTED_BIGNUM ? FL_WB_PROTECTED : 0));
- RBIGNUM_SET_SIGN(big, sign?1:0);
- if (len <= RBIGNUM_EMBED_LEN_MAX) {
- RBASIC(big)->flags |= RBIGNUM_EMBED_FLAG;
- RBIGNUM_SET_LEN(big, len);
+ BIGNUM_SET_SIGN(big, sign?1:0);
+ if (len <= BIGNUM_EMBED_LEN_MAX) {
+ RBASIC(big)->flags |= BIGNUM_EMBED_FLAG;
+ BIGNUM_SET_LEN(big, len);
(void)VALGRIND_MAKE_MEM_UNDEFINED((void*)RBIGNUM(big)->as.ary, sizeof(RBIGNUM(big)->as.ary));
}
else {
@@ -2998,7 +2993,7 @@ bignew_1(VALUE klass, long len, int sign)
}
VALUE
-rb_big_new(long len, int sign)
+rb_big_new(size_t len, int sign)
{
return bignew(len, sign != 0);
}
@@ -3006,8 +3001,8 @@ rb_big_new(long len, int sign)
VALUE
rb_big_clone(VALUE x)
{
- long len = RBIGNUM_LEN(x);
- VALUE z = bignew_1(CLASS_OF(x), len, RBIGNUM_SIGN(x));
+ size_t len = BIGNUM_LEN(x);
+ VALUE z = bignew_1(CLASS_OF(x), len, BIGNUM_SIGN(x));
MEMCPY(BDIGITS(z), BDIGITS(x), BDIGIT, len);
return z;
@@ -3016,15 +3011,15 @@ rb_big_clone(VALUE x)
static void
big_extend_carry(VALUE x)
{
- rb_big_resize(x, RBIGNUM_LEN(x)+1);
- BDIGITS(x)[RBIGNUM_LEN(x)-1] = 1;
+ rb_big_resize(x, BIGNUM_LEN(x)+1);
+ BDIGITS(x)[BIGNUM_LEN(x)-1] = 1;
}
/* modify a bignum by 2's complement */
static void
get2comp(VALUE x)
{
- long i = RBIGNUM_LEN(x);
+ long i = BIGNUM_LEN(x);
BDIGIT *ds = BDIGITS(x);
if (bary_2comp(ds, i)) {
@@ -3042,13 +3037,13 @@ static BDIGIT
abs2twocomp(VALUE *xp, long *n_ret)
{
VALUE x = *xp;
- long n = RBIGNUM_LEN(x);
+ long n = BIGNUM_LEN(x);
BDIGIT *ds = BDIGITS(x);
BDIGIT hibits = 0;
BARY_TRUNC(ds, n);
- if (n != 0 && RBIGNUM_NEGATIVE_P(x)) {
+ if (n != 0 && BIGNUM_NEGATIVE_P(x)) {
VALUE z = bignew_1(CLASS_OF(x), n, 0);
MEMCPY(BDIGITS(z), ds, BDIGIT, n);
bary_2comp(BDIGITS(z), n);
@@ -3062,7 +3057,7 @@ abs2twocomp(VALUE *xp, long *n_ret)
static void
twocomp2abs_bang(VALUE x, int hibits)
{
- RBIGNUM_SET_SIGN(x, !hibits);
+ BIGNUM_SET_SIGN(x, !hibits);
if (hibits) {
get2comp(x);
}
@@ -3071,12 +3066,12 @@ twocomp2abs_bang(VALUE x, int hibits)
static inline VALUE
bigtrunc(VALUE x)
{
- long len = RBIGNUM_LEN(x);
+ size_t len = BIGNUM_LEN(x);
BDIGIT *ds = BDIGITS(x);
if (len == 0) return x;
while (--len && !ds[len]);
- if (RBIGNUM_LEN(x) > len+1) {
+ if (BIGNUM_LEN(x) > len+1) {
rb_big_resize(x, len+1);
}
return x;
@@ -3085,9 +3080,9 @@ bigtrunc(VALUE x)
static inline VALUE
bigfixize(VALUE x)
{
- size_t n = RBIGNUM_LEN(x);
+ size_t n = BIGNUM_LEN(x);
BDIGIT *ds = BDIGITS(x);
-#if SIZEOF_BDIGITS < SIZEOF_LONG
+#if SIZEOF_BDIGIT < SIZEOF_LONG
unsigned long u;
#else
BDIGIT u;
@@ -3097,8 +3092,8 @@ bigfixize(VALUE x)
if (n == 0) return INT2FIX(0);
-#if SIZEOF_BDIGITS < SIZEOF_LONG
- if (sizeof(long)/SIZEOF_BDIGITS < n)
+#if SIZEOF_BDIGIT < SIZEOF_LONG
+ if (sizeof(long)/SIZEOF_BDIGIT < n)
goto return_big;
else {
int i = (int)n;
@@ -3107,14 +3102,14 @@ bigfixize(VALUE x)
u = (unsigned long)(BIGUP(u) + ds[i]);
}
}
-#else /* SIZEOF_BDIGITS >= SIZEOF_LONG */
+#else /* SIZEOF_BDIGIT >= SIZEOF_LONG */
if (1 < n)
goto return_big;
else
u = ds[0];
#endif
- if (RBIGNUM_POSITIVE_P(x)) {
+ if (BIGNUM_POSITIVE_P(x)) {
if (POSFIXABLE(u)) return LONG2FIX((long)u);
}
else {
@@ -3148,7 +3143,7 @@ rb_uint2big(VALUE n)
VALUE big = bignew(bdigit_roomof(SIZEOF_VALUE), 1);
BDIGIT *digits = BDIGITS(big);
-#if SIZEOF_BDIGITS >= SIZEOF_VALUE
+#if SIZEOF_BDIGIT >= SIZEOF_VALUE
digits[0] = n;
#else
for (i = 0; i < bdigit_roomof(SIZEOF_VALUE); i++) {
@@ -3159,7 +3154,7 @@ rb_uint2big(VALUE n)
i = bdigit_roomof(SIZEOF_VALUE);
while (--i && !digits[i]) ;
- RBIGNUM_SET_LEN(big, i+1);
+ BIGNUM_SET_LEN(big, i+1);
return big;
}
@@ -3179,7 +3174,7 @@ rb_int2big(SIGNED_VALUE n)
}
big = rb_uint2big(u);
if (neg) {
- RBIGNUM_SET_SIGN(big, 0);
+ BIGNUM_SET_SIGN(big, 0);
}
return big;
}
@@ -3246,7 +3241,7 @@ rb_absint_size(VALUE val, int *nlz_bits_ret)
if (v < 0) {
v = -v;
}
-#if SIZEOF_BDIGITS >= SIZEOF_LONG
+#if SIZEOF_BDIGIT >= SIZEOF_LONG
fixbuf[0] = v;
#else
{
@@ -3262,7 +3257,7 @@ rb_absint_size(VALUE val, int *nlz_bits_ret)
}
else {
dp = BDIGITS(val);
- de = dp + RBIGNUM_LEN(val);
+ de = dp + BIGNUM_LEN(val);
}
while (dp < de && de[-1] == 0)
de--;
@@ -3274,7 +3269,7 @@ rb_absint_size(VALUE val, int *nlz_bits_ret)
num_leading_zeros = nlz(de[-1]);
if (nlz_bits_ret)
*nlz_bits_ret = num_leading_zeros % CHAR_BIT;
- return (de - dp) * SIZEOF_BDIGITS - num_leading_zeros / CHAR_BIT;
+ return (de - dp) * SIZEOF_BDIGIT - num_leading_zeros / CHAR_BIT;
}
static size_t
@@ -3297,7 +3292,7 @@ absint_numwords_generic(size_t numbytes, int nlz_bits_in_msbyte, size_t word_num
static const BDIGIT char_bit[1] = { CHAR_BIT };
BDIGIT numbytes_bary[bdigit_roomof(sizeof(numbytes))];
BDIGIT val_numbits_bary[bdigit_roomof(sizeof(numbytes) + 1)];
- BDIGIT nlz_bits_in_msbyte_bary[1] = { nlz_bits_in_msbyte };
+ BDIGIT nlz_bits_in_msbyte_bary[1];
BDIGIT word_numbits_bary[bdigit_roomof(sizeof(word_numbits))];
BDIGIT div_bary[numberof(val_numbits_bary) + BIGDIVREM_EXTRA_WORDS];
BDIGIT mod_bary[numberof(word_numbits_bary)];
@@ -3307,6 +3302,8 @@ absint_numwords_generic(size_t numbytes, int nlz_bits_in_msbyte, size_t word_num
int sign;
size_t numwords;
+ nlz_bits_in_msbyte_bary[0] = nlz_bits_in_msbyte;
+
/*
* val_numbits = numbytes * CHAR_BIT - nlz_bits_in_msbyte
* div, mod = val_numbits.divmod(word_numbits)
@@ -3411,7 +3408,7 @@ rb_absint_numwords(VALUE val, size_t word_numbits, size_t *nlz_bits_ret)
* represent val in two's complement number, without sign bit.
*
* size_t size;
- * int neg = FIXNUM_P(val) ? FIX2LONG(val) < 0 : RBIGNUM_NEGATIVE_P(val);
+ * int neg = FIXNUM_P(val) ? FIX2LONG(val) < 0 : BIGNUM_NEGATIVE_P(val);
* size = rb_absint_numwords(val, 1, NULL)
* if (size == (size_t)-1) ...overflow...
* if (neg && rb_absint_singlebit_p(val))
@@ -3421,7 +3418,7 @@ rb_absint_numwords(VALUE val, size_t word_numbits, size_t *nlz_bits_ret)
* represent val in two's complement number, with sign bit.
*
* size_t size;
- * int neg = FIXNUM_P(val) ? FIX2LONG(val) < 0 : RBIGNUM_NEGATIVE_P(val);
+ * int neg = FIXNUM_P(val) ? FIX2LONG(val) < 0 : BIGNUM_NEGATIVE_P(val);
* int nlz_bits;
* size = rb_absint_size(val, &nlz_bits);
* if (nlz_bits == 0 && !(neg && rb_absint_singlebit_p(val)))
@@ -3442,7 +3439,7 @@ rb_absint_singlebit_p(VALUE val)
if (v < 0) {
v = -v;
}
-#if SIZEOF_BDIGITS >= SIZEOF_LONG
+#if SIZEOF_BDIGIT >= SIZEOF_LONG
fixbuf[0] = v;
#else
{
@@ -3458,7 +3455,7 @@ rb_absint_singlebit_p(VALUE val)
}
else {
dp = BDIGITS(val);
- de = dp + RBIGNUM_LEN(val);
+ de = dp + BIGNUM_LEN(val);
}
while (dp < de && de[-1] == 0)
de--;
@@ -3547,7 +3544,7 @@ rb_integer_pack(VALUE val, void *words, size_t numwords, size_t wordsize, size_t
else {
sign = 1;
}
-#if SIZEOF_BDIGITS >= SIZEOF_LONG
+#if SIZEOF_BDIGIT >= SIZEOF_LONG
fixbuf[0] = v;
#else
{
@@ -3562,9 +3559,9 @@ rb_integer_pack(VALUE val, void *words, size_t numwords, size_t wordsize, size_t
num_bdigits = numberof(fixbuf);
}
else {
- sign = RBIGNUM_POSITIVE_P(val) ? 1 : -1;
+ sign = BIGNUM_POSITIVE_P(val) ? 1 : -1;
ds = BDIGITS(val);
- num_bdigits = RBIGNUM_LEN(val);
+ num_bdigits = BIGNUM_LEN(val);
}
return bary_pack(sign, ds, num_bdigits, words, numwords, wordsize, nails, flags);
@@ -3677,33 +3674,15 @@ rb_integer_unpack(const void *words, size_t numwords, size_t wordsize, size_t na
}
if ((flags & INTEGER_PACK_FORCE_BIGNUM) && sign != 0 &&
- bary_zero_p(BDIGITS(val), RBIGNUM_LEN(val)))
+ bary_zero_p(BDIGITS(val), BIGNUM_LEN(val)))
sign = 0;
- RBIGNUM_SET_SIGN(val, 0 <= sign);
+ BIGNUM_SET_SIGN(val, 0 <= sign);
if (flags & INTEGER_PACK_FORCE_BIGNUM)
return bigtrunc(val);
return bignorm(val);
}
-#define QUAD_SIZE 8
-
-void
-rb_quad_pack(char *buf, VALUE val)
-{
- rb_integer_pack(val, buf, 1, QUAD_SIZE, 0,
- INTEGER_PACK_NATIVE_BYTE_ORDER|
- INTEGER_PACK_2COMP);
-}
-
-VALUE
-rb_quad_unpack(const char *buf, int signed_p)
-{
- return rb_integer_unpack(buf, 1, QUAD_SIZE, 0,
- INTEGER_PACK_NATIVE_BYTE_ORDER|
- (signed_p ? INTEGER_PACK_2COMP : 0));
-}
-
#define conv_digit(c) (ruby_digit36_to_number_table[(unsigned char)(c)])
static void
@@ -3889,11 +3868,11 @@ str2big_karatsuba(
for (unit = 2; unit < num_bdigits; unit *= 2) {
for (i = 0; i < num_bdigits; i += unit*2) {
if (2*unit <= num_bdigits - i) {
- bary_mul(vds+i, unit*2, BDIGITS(powerv), RBIGNUM_LEN(powerv), uds+i+unit, unit);
+ bary_mul(vds+i, unit*2, BDIGITS(powerv), BIGNUM_LEN(powerv), uds+i+unit, unit);
bary_add(vds+i, unit*2, vds+i, unit*2, uds+i, unit);
}
else if (unit <= num_bdigits - i) {
- bary_mul(vds+i, num_bdigits-i, BDIGITS(powerv), RBIGNUM_LEN(powerv), uds+i+unit, num_bdigits-(i+unit));
+ bary_mul(vds+i, num_bdigits-i, BDIGITS(powerv), BIGNUM_LEN(powerv), uds+i+unit, num_bdigits-(i+unit));
bary_add(vds+i, num_bdigits-i, vds+i, num_bdigits-i, uds+i, unit);
}
else {
@@ -3926,7 +3905,7 @@ str2big_gmp(
size_t num_bdigits,
int base)
{
- const size_t nails = (sizeof(BDIGIT)-SIZEOF_BDIGITS)*CHAR_BIT;
+ const size_t nails = (sizeof(BDIGIT)-SIZEOF_BDIGIT)*CHAR_BIT;
char *buf, *p;
const char *q;
VALUE tmps;
@@ -3960,6 +3939,22 @@ str2big_gmp(
}
#endif
+/*
+ * Parse +str+ as Ruby Integer, i.e., underscores, 0d and 0b prefixes.
+ *
+ * str: pointer to the string to be parsed.
+ * should be NUL-terminated.
+ * base: base of conversion, must be 2..36, or -36..0.
+ * if +base+ > 0, the conversion is done according to the +base+
+ * and unmatched prefix is parsed as a part of the result if
+ * present.
+ * if +base+ <= 0, the conversion is done according to the
+ * prefix if present, in base <code>-base</code> if +base+ < -1,
+ * or in base 10.
+ * badcheck: if non-zero, +ArgumentError+ is raised when +str+ is not
+ * valid as an Integer. if zero, Fixnum 0 is returned in
+ * that case.
+ */
VALUE
rb_cstr_to_inum(const char *str, int base, int badcheck)
{
@@ -4054,8 +4049,10 @@ rb_cstr_to_inum(const char *str, int base, int badcheck)
if (c == '_') {
if (++us >= 2)
break;
- } else
+ }
+ else {
us = 0;
+ }
}
if (!(c = *str) || ISSPACE(c)) --str;
}
@@ -4087,7 +4084,7 @@ rb_cstr_to_inum(const char *str, int base, int badcheck)
}
else {
VALUE big = rb_uint2big(val);
- RBIGNUM_SET_SIGN(big, sign);
+ BIGNUM_SET_SIGN(big, sign);
return bignorm(big);
}
}
@@ -4318,7 +4315,7 @@ rb_ull2big(unsigned LONG_LONG n)
VALUE big = bignew(bdigit_roomof(SIZEOF_LONG_LONG), 1);
BDIGIT *digits = BDIGITS(big);
-#if SIZEOF_BDIGITS >= SIZEOF_LONG_LONG
+#if SIZEOF_BDIGIT >= SIZEOF_LONG_LONG
digits[0] = n;
#else
for (i = 0; i < bdigit_roomof(SIZEOF_LONG_LONG); i++) {
@@ -4329,7 +4326,7 @@ rb_ull2big(unsigned LONG_LONG n)
i = bdigit_roomof(SIZEOF_LONG_LONG);
while (i-- && !digits[i]) ;
- RBIGNUM_SET_LEN(big, i+1);
+ BIGNUM_SET_LEN(big, i+1);
return big;
}
@@ -4349,7 +4346,7 @@ rb_ll2big(LONG_LONG n)
}
big = rb_ull2big(u);
if (neg) {
- RBIGNUM_SET_SIGN(big, 0);
+ BIGNUM_SET_SIGN(big, 0);
}
return big;
}
@@ -4397,8 +4394,8 @@ big_shift3(VALUE x, int lshift_p, size_t shift_numdigits, int shift_numbits)
}
s1 = shift_numdigits;
s2 = shift_numbits;
- xn = RBIGNUM_LEN(x);
- z = bignew(xn+s1+1, RBIGNUM_SIGN(x));
+ xn = BIGNUM_LEN(x);
+ z = bignew(xn+s1+1, BIGNUM_SIGN(x));
zds = BDIGITS(z);
BDIGITS_ZERO(zds, s1);
xds = BDIGITS(x);
@@ -4407,9 +4404,9 @@ big_shift3(VALUE x, int lshift_p, size_t shift_numdigits, int shift_numbits)
else {
long zn;
BDIGIT hibitsx;
- if (LONG_MAX < shift_numdigits || (size_t)RBIGNUM_LEN(x) <= shift_numdigits) {
- if (RBIGNUM_POSITIVE_P(x) ||
- bary_zero_p(BDIGITS(x), RBIGNUM_LEN(x)))
+ if (LONG_MAX < shift_numdigits || (size_t)BIGNUM_LEN(x) <= shift_numdigits) {
+ if (BIGNUM_POSITIVE_P(x) ||
+ bary_zero_p(BDIGITS(x), BIGNUM_LEN(x)))
return INT2FIX(0);
else
return INT2FIX(-1);
@@ -4456,7 +4453,7 @@ big_shift2(VALUE x, int lshift_p, VALUE y)
}
else {
if (1 < sign || CHAR_BIT <= lens[1])
- return RBIGNUM_POSITIVE_P(x) ? INT2FIX(0) : INT2FIX(-1);
+ return BIGNUM_POSITIVE_P(x) ? INT2FIX(0) : INT2FIX(-1);
}
shift_numbits = (int)(lens[0] & (BITSPERDIG-1));
shift_numdigits = (lens[0] >> bit_length(BITSPERDIG-1)) |
@@ -4540,61 +4537,6 @@ power_cache_get_power(int base, int power_level, size_t *numdigits_ret)
return base36_power_cache[base - 2][power_level];
}
-/*
- * deprecated. (used only from deprecated rb_big2str0)
- *
- * big2str_muraken_find_n1
- *
- * Let a natural number x is given by:
- * x = 2^0 * x_0 + 2^1 * x_1 + ... + 2^(B*n_0 - 1) * x_{B*n_0 - 1},
- * where B is BITSPERDIG (i.e. BDIGITS*CHAR_BIT) and n_0 is
- * RBIGNUM_LEN(x).
- *
- * Now, we assume n_1 = min_n \{ n | 2^(B*n_0/2) <= b_1^(n_1) \}, so
- * it is realized that 2^(B*n_0) <= {b_1}^{2*n_1}, where b_1 is a
- * given radix number. And then, we have n_1 <= (B*n_0) /
- * (2*log_2(b_1)), therefore n_1 is given by ceil((B*n_0) /
- * (2*log_2(b_1))).
- */
-static long
-big2str_find_n1(VALUE x, int base)
-{
- static const double log_2[] = {
- 1.0, 1.58496250072116, 2.0,
- 2.32192809488736, 2.58496250072116, 2.8073549220576,
- 3.0, 3.16992500144231, 3.32192809488736,
- 3.4594316186373, 3.58496250072116, 3.70043971814109,
- 3.8073549220576, 3.90689059560852, 4.0,
- 4.08746284125034, 4.16992500144231, 4.24792751344359,
- 4.32192809488736, 4.39231742277876, 4.4594316186373,
- 4.52356195605701, 4.58496250072116, 4.64385618977472,
- 4.70043971814109, 4.75488750216347, 4.8073549220576,
- 4.85798099512757, 4.90689059560852, 4.95419631038688,
- 5.0, 5.04439411935845, 5.08746284125034,
- 5.12928301694497, 5.16992500144231
- };
- long bits;
-
- if (base < 2 || 36 < base)
- rb_bug("invalid radix %d", base);
-
- if (FIXNUM_P(x)) {
- bits = (SIZEOF_LONG*CHAR_BIT - 1)/2 + 1;
- }
- else if (BIGZEROP(x)) {
- return 0;
- }
- else if (RBIGNUM_LEN(x) >= LONG_MAX/BITSPERDIG) {
- rb_raise(rb_eRangeError, "bignum too big to convert into `string'");
- }
- else {
- bits = BITSPERDIG*RBIGNUM_LEN(x);
- }
-
- /* @shyouhei note: vvvvvvvvvvvvv this cast is suspicious. But I believe it is OK, because if that cast loses data, this x value is too big, and should have raised RangeError. */
- return (long)ceil(((double)bits)/log_2[base - 2]);
-}
-
struct big2str_struct {
int negative;
int base;
@@ -4700,7 +4642,7 @@ big2str_karatsuba(struct big2str_struct *b2s, BDIGIT *xds, size_t xn, size_t wn,
lower_power_level = power_level-1;
b = power_cache_get_power(b2s->base, lower_power_level, &lower_numdigits);
- bn = RBIGNUM_LEN(b);
+ bn = BIGNUM_LEN(b);
bds = BDIGITS(b);
half_numdigits = lower_numdigits;
@@ -4710,7 +4652,7 @@ big2str_karatsuba(struct big2str_struct *b2s, BDIGIT *xds, size_t xn, size_t wn,
(xn == bn && bary_cmp(xds, xn, bds, bn) < 0))) {
lower_power_level--;
b = power_cache_get_power(b2s->base, lower_power_level, &lower_numdigits);
- bn = RBIGNUM_LEN(b);
+ bn = BIGNUM_LEN(b);
bds = BDIGITS(b);
}
@@ -4783,12 +4725,12 @@ big2str_base_poweroftwo(VALUE x, int base)
VALUE result;
char *ptr;
numwords = rb_absint_numwords(x, word_numbits, NULL);
- if (RBIGNUM_NEGATIVE_P(x)) {
+ if (BIGNUM_NEGATIVE_P(x)) {
if (LONG_MAX-1 < numwords)
rb_raise(rb_eArgError, "too big number");
result = rb_usascii_str_new(0, 1+numwords);
ptr = RSTRING_PTR(result);
- *ptr++ = RBIGNUM_POSITIVE_P(x) ? '+' : '-';
+ *ptr++ = BIGNUM_POSITIVE_P(x) ? '+' : '-';
}
else {
if (LONG_MAX < numwords)
@@ -4822,7 +4764,7 @@ big2str_generic(VALUE x, int base)
VALUE power;
xds = BDIGITS(x);
- xn = RBIGNUM_LEN(x);
+ xn = BIGNUM_LEN(x);
BARY_TRUNC(xds, xn);
if (xn == 0) {
@@ -4839,13 +4781,13 @@ big2str_generic(VALUE x, int base)
power_level = 0;
power = power_cache_get_power(base, power_level, NULL);
while (power_level < MAX_BASE36_POWER_TABLE_ENTRIES &&
- (size_t)RBIGNUM_LEN(power) <= (xn+1)/2) {
+ (size_t)BIGNUM_LEN(power) <= (xn+1)/2) {
power_level++;
power = power_cache_get_power(base, power_level, NULL);
}
assert(power_level != MAX_BASE36_POWER_TABLE_ENTRIES);
- if ((size_t)RBIGNUM_LEN(power) <= xn) {
+ if ((size_t)BIGNUM_LEN(power) <= xn) {
/*
* This increment guarantees x < power_cache_get_power(base, power_level)
* without invoking it actually.
@@ -4859,7 +4801,7 @@ big2str_generic(VALUE x, int base)
power_level++;
}
- b2s_data.negative = RBIGNUM_NEGATIVE_P(x);
+ b2s_data.negative = BIGNUM_NEGATIVE_P(x);
b2s_data.base = base;
b2s_data.hbase2 = maxpow_in_bdigit_dbl(base, &b2s_data.hbase2_numdigits);
@@ -4873,7 +4815,7 @@ big2str_generic(VALUE x, int base)
VALUE tmpw = 0;
BDIGIT *wds;
size_t wn;
- wn = power_level * BIGDIVREM_EXTRA_WORDS + RBIGNUM_LEN(power);
+ wn = power_level * BIGDIVREM_EXTRA_WORDS + BIGNUM_LEN(power);
wds = ALLOCV_N(BDIGIT, tmpw, xn + wn);
MEMCPY(wds, xds, BDIGIT, xn);
big2str_karatsuba(&b2s_data, wds, xn, wn, power_level, 0);
@@ -4896,22 +4838,22 @@ rb_big2str_generic(VALUE x, int base)
}
#ifdef USE_GMP
-VALUE
+static VALUE
big2str_gmp(VALUE x, int base)
{
- const size_t nails = (sizeof(BDIGIT)-SIZEOF_BDIGITS)*CHAR_BIT;
+ const size_t nails = (sizeof(BDIGIT)-SIZEOF_BDIGIT)*CHAR_BIT;
mpz_t mx;
size_t size;
VALUE str;
BDIGIT *xds = BDIGITS(x);
- size_t xn = RBIGNUM_LEN(x);
+ size_t xn = BIGNUM_LEN(x);
mpz_init(mx);
mpz_import(mx, xn, -1, sizeof(BDIGIT), 0, nails, xds);
size = mpz_sizeinbase(mx, base);
- if (RBIGNUM_NEGATIVE_P(x)) {
+ if (BIGNUM_NEGATIVE_P(x)) {
mpz_neg(mx, mx);
str = rb_usascii_str_new(0, size+1);
}
@@ -4948,7 +4890,7 @@ rb_big2str1(VALUE x, int base)
bigtrunc(x);
xds = BDIGITS(x);
- xn = RBIGNUM_LEN(x);
+ xn = BIGNUM_LEN(x);
BARY_TRUNC(xds, xn);
if (xn == 0) {
@@ -4976,41 +4918,6 @@ rb_big2str1(VALUE x, int base)
return big2str_generic(x, base);
}
-/* deprecated */
-VALUE
-rb_big2str0(VALUE x, int base, int trim)
-{
- VALUE str;
- long oldlen;
- long n2;
-
- str = rb_big2str1(x, base);
-
- if (trim || FIXNUM_P(x) || BIGZEROP(x))
- return str;
-
- oldlen = RSTRING_LEN(str);
- if (oldlen && RSTRING_PTR(str)[0] != '-') {
- rb_str_resize(str, oldlen+1);
- MEMMOVE(RSTRING_PTR(str)+1, RSTRING_PTR(str), char, oldlen);
- RSTRING_PTR(str)[0] = '+';
- }
-
- n2 = big2str_find_n1(x, base);
-
- oldlen = RSTRING_LEN(str);
- if (oldlen-1 < n2) {
- long off = n2 - (oldlen-1);
- rb_str_resize(str, n2+1);
- MEMMOVE(RSTRING_PTR(str)+1+off, RSTRING_PTR(str)+1, char, oldlen-1);
- memset(RSTRING_PTR(str)+1, '0', off);
- }
-
- RSTRING_PTR(str)[RSTRING_LEN(str)] = '\0';
-
- return str;
-}
-
VALUE
rb_big2str(VALUE x, int base)
{
@@ -5049,7 +4956,7 @@ rb_big_to_s(int argc, VALUE *argv, VALUE x)
static unsigned long
big2ulong(VALUE x, const char *type)
{
- long len = RBIGNUM_LEN(x);
+ size_t len = BIGNUM_LEN(x);
unsigned long num;
BDIGIT *ds;
@@ -5059,7 +4966,7 @@ big2ulong(VALUE x, const char *type)
rb_raise(rb_eRangeError, "bignum too big to convert into `%s'", type);
}
ds = BDIGITS(x);
-#if SIZEOF_LONG <= SIZEOF_BDIGITS
+#if SIZEOF_LONG <= SIZEOF_BDIGIT
num = (unsigned long)ds[0];
#else
num = 0;
@@ -5071,22 +4978,12 @@ big2ulong(VALUE x, const char *type)
return num;
}
-/* deprecated */
-VALUE
-rb_big2ulong_pack(VALUE x)
-{
- unsigned long num;
- rb_integer_pack(x, &num, 1, sizeof(num), 0,
- INTEGER_PACK_NATIVE_BYTE_ORDER|INTEGER_PACK_2COMP);
- return num;
-}
-
-VALUE
+unsigned long
rb_big2ulong(VALUE x)
{
unsigned long num = big2ulong(x, "unsigned long");
- if (RBIGNUM_POSITIVE_P(x)) {
+ if (BIGNUM_POSITIVE_P(x)) {
return num;
}
else {
@@ -5098,12 +4995,12 @@ rb_big2ulong(VALUE x)
rb_raise(rb_eRangeError, "bignum out of range of unsigned long");
}
-SIGNED_VALUE
+long
rb_big2long(VALUE x)
{
unsigned long num = big2ulong(x, "long");
- if (RBIGNUM_POSITIVE_P(x)) {
+ if (BIGNUM_POSITIVE_P(x)) {
if (num <= LONG_MAX)
return num;
}
@@ -5121,7 +5018,7 @@ rb_big2long(VALUE x)
static unsigned LONG_LONG
big2ull(VALUE x, const char *type)
{
- long len = RBIGNUM_LEN(x);
+ size_t len = BIGNUM_LEN(x);
unsigned LONG_LONG num;
BDIGIT *ds = BDIGITS(x);
@@ -5129,7 +5026,7 @@ big2ull(VALUE x, const char *type)
return 0;
if (BIGSIZE(x) > SIZEOF_LONG_LONG)
rb_raise(rb_eRangeError, "bignum too big to convert into `%s'", type);
-#if SIZEOF_LONG_LONG <= SIZEOF_BDIGITS
+#if SIZEOF_LONG_LONG <= SIZEOF_BDIGIT
num = (unsigned LONG_LONG)ds[0];
#else
num = 0;
@@ -5146,7 +5043,7 @@ rb_big2ull(VALUE x)
{
unsigned LONG_LONG num = big2ull(x, "unsigned long long");
- if (RBIGNUM_POSITIVE_P(x)) {
+ if (BIGNUM_POSITIVE_P(x)) {
return num;
}
else {
@@ -5163,7 +5060,7 @@ rb_big2ll(VALUE x)
{
unsigned LONG_LONG num = big2ull(x, "long long");
- if (RBIGNUM_POSITIVE_P(x)) {
+ if (BIGNUM_POSITIVE_P(x)) {
if (num <= LLONG_MAX)
return num;
}
@@ -5220,7 +5117,7 @@ static double
big2dbl(VALUE x)
{
double d = 0.0;
- long i = (bigtrunc(x), RBIGNUM_LEN(x)), lo = 0, bits;
+ long i = (bigtrunc(x), BIGNUM_LEN(x)), lo = 0, bits;
BDIGIT *ds = BDIGITS(x), dl;
if (i) {
@@ -5262,7 +5159,7 @@ big2dbl(VALUE x)
}
}
}
- if (!RBIGNUM_SIGN(x)) d = -d;
+ if (!BIGNUM_SIGN(x)) d = -d;
return d;
}
@@ -5396,7 +5293,16 @@ rb_big_cmp(VALUE x, VALUE y)
int cmp;
if (FIXNUM_P(y)) {
- y = rb_int2big(FIX2LONG(y));
+ x = bignorm(x);
+ if (FIXNUM_P(x)) {
+ if (FIX2LONG(x) > FIX2LONG(y)) return INT2FIX(1);
+ if (FIX2LONG(x) < FIX2LONG(y)) return INT2FIX(-1);
+ return INT2FIX(0);
+ }
+ else {
+ if (BIGNUM_NEGATIVE_P(x)) return INT2FIX(-1);
+ return INT2FIX(1);
+ }
}
else if (RB_BIGNUM_TYPE_P(y)) {
}
@@ -5407,11 +5313,11 @@ rb_big_cmp(VALUE x, VALUE y)
return rb_num_coerce_cmp(x, y, rb_intern("<=>"));
}
- if (RBIGNUM_SIGN(x) > RBIGNUM_SIGN(y)) return INT2FIX(1);
- if (RBIGNUM_SIGN(x) < RBIGNUM_SIGN(y)) return INT2FIX(-1);
+ if (BIGNUM_SIGN(x) > BIGNUM_SIGN(y)) return INT2FIX(1);
+ if (BIGNUM_SIGN(x) < BIGNUM_SIGN(y)) return INT2FIX(-1);
- cmp = bary_cmp(BDIGITS(x), RBIGNUM_LEN(x), BDIGITS(y), RBIGNUM_LEN(y));
- if (RBIGNUM_SIGN(x))
+ cmp = bary_cmp(BDIGITS(x), BIGNUM_LEN(x), BDIGITS(y), BIGNUM_LEN(y));
+ if (BIGNUM_SIGN(x))
return INT2FIX(cmp);
else
return INT2FIX(-cmp);
@@ -5541,9 +5447,9 @@ rb_big_eq(VALUE x, VALUE y)
else {
return rb_equal(y, x);
}
- if (RBIGNUM_SIGN(x) != RBIGNUM_SIGN(y)) return Qfalse;
- if (RBIGNUM_LEN(x) != RBIGNUM_LEN(y)) return Qfalse;
- if (MEMCMP(BDIGITS(x),BDIGITS(y),BDIGIT,RBIGNUM_LEN(y)) != 0) return Qfalse;
+ if (BIGNUM_SIGN(x) != BIGNUM_SIGN(y)) return Qfalse;
+ if (BIGNUM_LEN(x) != BIGNUM_LEN(y)) return Qfalse;
+ if (MEMCMP(BDIGITS(x),BDIGITS(y),BDIGIT,BIGNUM_LEN(y)) != 0) return Qfalse;
return Qtrue;
}
@@ -5562,9 +5468,9 @@ VALUE
rb_big_eql(VALUE x, VALUE y)
{
if (!RB_BIGNUM_TYPE_P(y)) return Qfalse;
- if (RBIGNUM_SIGN(x) != RBIGNUM_SIGN(y)) return Qfalse;
- if (RBIGNUM_LEN(x) != RBIGNUM_LEN(y)) return Qfalse;
- if (MEMCMP(BDIGITS(x),BDIGITS(y),BDIGIT,RBIGNUM_LEN(y)) != 0) return Qfalse;
+ if (BIGNUM_SIGN(x) != BIGNUM_SIGN(y)) return Qfalse;
+ if (BIGNUM_LEN(x) != BIGNUM_LEN(y)) return Qfalse;
+ if (MEMCMP(BDIGITS(x),BDIGITS(y),BDIGIT,BIGNUM_LEN(y)) != 0) return Qfalse;
return Qtrue;
}
@@ -5580,7 +5486,7 @@ rb_big_uminus(VALUE x)
{
VALUE z = rb_big_clone(x);
- RBIGNUM_SET_SIGN(z, !RBIGNUM_SIGN(x));
+ BIGNUM_SET_SIGN(z, !BIGNUM_SIGN(x));
return bignorm(z);
}
@@ -5602,22 +5508,22 @@ rb_big_neg(VALUE x)
{
VALUE z = rb_big_clone(x);
BDIGIT *ds = BDIGITS(z);
- long n = RBIGNUM_LEN(z);
+ long n = BIGNUM_LEN(z);
if (!n) return INT2FIX(-1);
- if (RBIGNUM_POSITIVE_P(z)) {
+ if (BIGNUM_POSITIVE_P(z)) {
if (bary_add_one(ds, n)) {
big_extend_carry(z);
}
- RBIGNUM_SET_NEGATIVE_SIGN(z);
+ BIGNUM_SET_NEGATIVE_SIGN(z);
}
else {
bary_neg(ds, n);
if (bary_add_one(ds, n))
return INT2FIX(-1);
bary_neg(ds, n);
- RBIGNUM_SET_POSITIVE_SIGN(z);
+ BIGNUM_SET_POSITIVE_SIGN(z);
}
return bignorm(z);
@@ -5630,8 +5536,8 @@ bigsub(VALUE x, VALUE y)
BDIGIT *xds, *yds, *zds;
long xn, yn, zn;
- xn = RBIGNUM_LEN(x);
- yn = RBIGNUM_LEN(y);
+ xn = BIGNUM_LEN(x);
+ yn = BIGNUM_LEN(y);
zn = xn < yn ? yn : xn;
z = bignew(zn, 1);
@@ -5642,7 +5548,7 @@ bigsub(VALUE x, VALUE y)
if (bary_sub(zds, zn, xds, xn, yds, yn)) {
bary_2comp(zds, zn);
- RBIGNUM_SET_NEGATIVE_SIGN(z);
+ BIGNUM_SET_NEGATIVE_SIGN(z);
}
return z;
@@ -5661,24 +5567,24 @@ bigsub_int(VALUE x, long y0)
y = y0;
xds = BDIGITS(x);
- xn = RBIGNUM_LEN(x);
+ xn = BIGNUM_LEN(x);
if (xn == 0)
return LONG2NUM(-y0);
zn = xn;
-#if SIZEOF_BDIGITS < SIZEOF_LONG
+#if SIZEOF_BDIGIT < SIZEOF_LONG
if (zn < bdigit_roomof(SIZEOF_LONG))
zn = bdigit_roomof(SIZEOF_LONG);
#endif
- z = bignew(zn, RBIGNUM_SIGN(x));
+ z = bignew(zn, BIGNUM_SIGN(x));
zds = BDIGITS(z);
-#if SIZEOF_BDIGITS >= SIZEOF_LONG
+#if SIZEOF_BDIGIT >= SIZEOF_LONG
assert(xn == zn);
num = (BDIGIT_DBL_SIGNED)xds[0] - y;
if (xn == 1 && num < 0) {
- RBIGNUM_SET_SIGN(z, !RBIGNUM_SIGN(x));
+ BIGNUM_SET_SIGN(z, !BIGNUM_SIGN(x));
zds[0] = (BDIGIT)-num;
RB_GC_GUARD(x);
return bignorm(z);
@@ -5715,7 +5621,7 @@ bigsub_int(VALUE x, long y0)
zds[i] = BIGLO(num);
num = BIGDN(num);
}
-#if SIZEOF_BDIGITS < SIZEOF_LONG
+#if SIZEOF_BDIGIT < SIZEOF_LONG
for (; i < zn; i++) {
y_is_zero_z:
if (num == 0) goto num_is_zero_z;
@@ -5729,7 +5635,7 @@ bigsub_int(VALUE x, long y0)
num_is_zero_x:
zds[i] = xds[i];
}
-#if SIZEOF_BDIGITS < SIZEOF_LONG
+#if SIZEOF_BDIGIT < SIZEOF_LONG
for (; i < zn; i++) {
num_is_zero_z:
zds[i] = 0;
@@ -5741,7 +5647,7 @@ bigsub_int(VALUE x, long y0)
assert(num == 0 || num == -1);
if (num < 0) {
get2comp(z);
- RBIGNUM_SET_SIGN(z, !RBIGNUM_SIGN(x));
+ BIGNUM_SET_SIGN(z, !BIGNUM_SIGN(x));
}
RB_GC_GUARD(x);
return bignorm(z);
@@ -5757,22 +5663,22 @@ bigadd_int(VALUE x, long y)
long i;
xds = BDIGITS(x);
- xn = RBIGNUM_LEN(x);
+ xn = BIGNUM_LEN(x);
if (xn == 0)
return LONG2NUM(y);
zn = xn;
-#if SIZEOF_BDIGITS < SIZEOF_LONG
+#if SIZEOF_BDIGIT < SIZEOF_LONG
if (zn < bdigit_roomof(SIZEOF_LONG))
zn = bdigit_roomof(SIZEOF_LONG);
#endif
zn++;
- z = bignew(zn, RBIGNUM_SIGN(x));
+ z = bignew(zn, BIGNUM_SIGN(x));
zds = BDIGITS(z);
-#if SIZEOF_BDIGITS >= SIZEOF_LONG
+#if SIZEOF_BDIGIT >= SIZEOF_LONG
num = (BDIGIT_DBL)xds[0] + y;
zds[0] = BIGLO(num);
num = BIGDN(num);
@@ -5834,25 +5740,25 @@ static VALUE
bigadd(VALUE x, VALUE y, int sign)
{
VALUE z;
- long len;
+ size_t len;
- sign = (sign == RBIGNUM_SIGN(y));
- if (RBIGNUM_SIGN(x) != sign) {
+ sign = (sign == BIGNUM_SIGN(y));
+ if (BIGNUM_SIGN(x) != sign) {
if (sign) return bigsub(y, x);
return bigsub(x, y);
}
- if (RBIGNUM_LEN(x) > RBIGNUM_LEN(y)) {
- len = RBIGNUM_LEN(x) + 1;
+ if (BIGNUM_LEN(x) > BIGNUM_LEN(y)) {
+ len = BIGNUM_LEN(x) + 1;
}
else {
- len = RBIGNUM_LEN(y) + 1;
+ len = BIGNUM_LEN(y) + 1;
}
z = bignew(len, sign);
- bary_add(BDIGITS(z), RBIGNUM_LEN(z),
- BDIGITS(x), RBIGNUM_LEN(x),
- BDIGITS(y), RBIGNUM_LEN(y));
+ bary_add(BDIGITS(z), BIGNUM_LEN(z),
+ BDIGITS(x), BIGNUM_LEN(x),
+ BDIGITS(y), BIGNUM_LEN(y));
return z;
}
@@ -5871,7 +5777,7 @@ rb_big_plus(VALUE x, VALUE y)
if (FIXNUM_P(y)) {
n = FIX2LONG(y);
- if ((n > 0) != RBIGNUM_SIGN(x)) {
+ if ((n > 0) != BIGNUM_SIGN(x)) {
if (n < 0) {
n = -n;
}
@@ -5907,7 +5813,7 @@ rb_big_minus(VALUE x, VALUE y)
if (FIXNUM_P(y)) {
n = FIX2LONG(y);
- if ((n > 0) != RBIGNUM_SIGN(x)) {
+ if ((n > 0) != BIGNUM_SIGN(x)) {
if (n < 0) {
n = -n;
}
@@ -5936,7 +5842,7 @@ bigsq(VALUE x)
VALUE z;
BDIGIT *xds, *zds;
- xn = RBIGNUM_LEN(x);
+ xn = BIGNUM_LEN(x);
zn = 2 * xn;
z = bignew(zn, 1);
@@ -5970,11 +5876,11 @@ bigmul0(VALUE x, VALUE y)
if (x == y)
return bigsq(x);
- xn = RBIGNUM_LEN(x);
- yn = RBIGNUM_LEN(y);
+ xn = BIGNUM_LEN(x);
+ yn = BIGNUM_LEN(y);
zn = xn + yn;
- z = bignew(zn, RBIGNUM_SIGN(x)==RBIGNUM_SIGN(y));
+ z = bignew(zn, BIGNUM_SIGN(x)==BIGNUM_SIGN(y));
xds = BDIGITS(x);
yds = BDIGITS(y);
@@ -6015,7 +5921,7 @@ rb_big_mul(VALUE x, VALUE y)
static VALUE
bigdivrem(VALUE x, VALUE y, volatile VALUE *divp, volatile VALUE *modp)
{
- long xn = RBIGNUM_LEN(x), yn = RBIGNUM_LEN(y);
+ long xn = BIGNUM_LEN(x), yn = BIGNUM_LEN(y);
VALUE z;
BDIGIT *xds, *yds, *zds;
BDIGIT dd;
@@ -6039,12 +5945,12 @@ bigdivrem(VALUE x, VALUE y, volatile VALUE *divp, volatile VALUE *modp)
}
if (yn == 1) {
dd = yds[0];
- z = bignew(xn, RBIGNUM_SIGN(x)==RBIGNUM_SIGN(y));
+ z = bignew(xn, BIGNUM_SIGN(x)==BIGNUM_SIGN(y));
zds = BDIGITS(z);
dd = bigdivrem_single(zds, xds, xn, dd);
if (modp) {
*modp = rb_uint2big((VALUE)dd);
- RBIGNUM_SET_SIGN(*modp, RBIGNUM_SIGN(x));
+ BIGNUM_SET_SIGN(*modp, BIGNUM_SIGN(x));
}
if (divp) *divp = z;
return Qnil;
@@ -6055,14 +5961,14 @@ bigdivrem(VALUE x, VALUE y, volatile VALUE *divp, volatile VALUE *modp)
BDIGIT_DBL q0 = x0 / y0;
BDIGIT_DBL r0 = x0 % y0;
if (divp) {
- z = bignew(bdigit_roomof(sizeof(BDIGIT_DBL)), RBIGNUM_SIGN(x)==RBIGNUM_SIGN(y));
+ z = bignew(bdigit_roomof(sizeof(BDIGIT_DBL)), BIGNUM_SIGN(x)==BIGNUM_SIGN(y));
zds = BDIGITS(z);
zds[0] = BIGLO(q0);
zds[1] = BIGLO(BIGDN(q0));
*divp = z;
}
if (modp) {
- z = bignew(bdigit_roomof(sizeof(BDIGIT_DBL)), RBIGNUM_SIGN(x));
+ z = bignew(bdigit_roomof(sizeof(BDIGIT_DBL)), BIGNUM_SIGN(x));
zds = BDIGITS(z);
zds[0] = BIGLO(r0);
zds[1] = BIGLO(BIGDN(r0));
@@ -6073,7 +5979,7 @@ bigdivrem(VALUE x, VALUE y, volatile VALUE *divp, volatile VALUE *modp)
if (divp) {
qn = xn + BIGDIVREM_EXTRA_WORDS;
- q = bignew(qn, RBIGNUM_SIGN(x)==RBIGNUM_SIGN(y));
+ q = bignew(qn, BIGNUM_SIGN(x)==BIGNUM_SIGN(y));
qds = BDIGITS(q);
}
else {
@@ -6083,7 +5989,7 @@ bigdivrem(VALUE x, VALUE y, volatile VALUE *divp, volatile VALUE *modp)
if (modp) {
rn = yn;
- r = bignew(rn, RBIGNUM_SIGN(x));
+ r = bignew(rn, BIGNUM_SIGN(x));
rds = BDIGITS(r);
}
else {
@@ -6111,7 +6017,7 @@ bigdivmod(VALUE x, VALUE y, volatile VALUE *divp, volatile VALUE *modp)
VALUE mod;
bigdivrem(x, y, divp, &mod);
- if (RBIGNUM_SIGN(x) != RBIGNUM_SIGN(y) && !BIGZEROP(mod)) {
+ if (BIGNUM_SIGN(x) != BIGNUM_SIGN(y) && !BIGZEROP(mod)) {
if (divp) *divp = bigadd(*divp, rb_int2big(1), 0);
if (modp) *modp = bigadd(mod, y, 1);
}
@@ -6268,7 +6174,7 @@ big_fdiv(VALUE x, VALUE y, long ey)
long l, ex;
bigtrunc(x);
- l = RBIGNUM_LEN(x);
+ l = BIGNUM_LEN(x);
ex = l * BITSPERDIG - nlz(BDIGITS(x)[l-1]);
ex -= 2 * DBL_BIGDIG * BITSPERDIG;
if (ex) x = big_shift(x, ex);
@@ -6290,7 +6196,7 @@ big_fdiv_int(VALUE x, VALUE y)
{
long l, ey;
bigtrunc(y);
- l = RBIGNUM_LEN(y);
+ l = BIGNUM_LEN(y);
ey = l * BITSPERDIG - nlz(BDIGITS(y)[l-1]);
ey -= DBL_BIGDIG * BITSPERDIG;
if (ey) y = big_shift(y, ey);
@@ -6357,7 +6263,7 @@ rb_big_fdiv(VALUE x, VALUE y)
*
* 123456789 ** 2 #=> 15241578750190521
* 123456789 ** 1.2 #=> 5126464716.09932
- * 123456789 ** -2 #=> 6.5610001194102e-17
+ * 123456789 ** -2 #=> (1/15241578750190521)
*/
VALUE
@@ -6370,7 +6276,7 @@ rb_big_pow(VALUE x, VALUE y)
if (y == INT2FIX(0)) return INT2FIX(1);
if (RB_FLOAT_TYPE_P(y)) {
d = RFLOAT_VALUE(y);
- if ((!RBIGNUM_SIGN(x) && !BIGZEROP(x)) && d != round(d))
+ if ((!BIGNUM_SIGN(x) && !BIGZEROP(x)) && d != round(d))
return rb_funcall(rb_complex_raw1(x), rb_intern("**"), 1, y);
}
else if (RB_BIGNUM_TYPE_P(y)) {
@@ -6427,7 +6333,7 @@ bigand_int(VALUE x, long xn, BDIGIT hibitsx, long y)
if (xn == 0) return hibitsx ? LONG2NUM(y) : 0;
hibitsy = 0 <= y ? 0 : BDIGMAX;
xds = BDIGITS(x);
-#if SIZEOF_BDIGITS >= SIZEOF_LONG
+#if SIZEOF_BDIGIT >= SIZEOF_LONG
if (!hibitsy) {
y &= xds[0];
return LONG2NUM(y);
@@ -6435,7 +6341,7 @@ bigand_int(VALUE x, long xn, BDIGIT hibitsx, long y)
#endif
zn = xn;
-#if SIZEOF_BDIGITS < SIZEOF_LONG
+#if SIZEOF_BDIGIT < SIZEOF_LONG
if (hibitsx && zn < bdigit_roomof(SIZEOF_LONG))
zn = bdigit_roomof(SIZEOF_LONG);
#endif
@@ -6443,7 +6349,7 @@ bigand_int(VALUE x, long xn, BDIGIT hibitsx, long y)
z = bignew(zn, 0);
zds = BDIGITS(z);
-#if SIZEOF_BDIGITS >= SIZEOF_LONG
+#if SIZEOF_BDIGIT >= SIZEOF_LONG
i = 1;
zds[0] = xds[0] & BIGLO(y);
#else
@@ -6541,15 +6447,15 @@ bigor_int(VALUE x, long xn, BDIGIT hibitsx, long y)
hibitsy = 0 <= y ? 0 : BDIGMAX;
xds = BDIGITS(x);
- zn = RBIGNUM_LEN(x);
-#if SIZEOF_BDIGITS < SIZEOF_LONG
+ zn = BIGNUM_LEN(x);
+#if SIZEOF_BDIGIT < SIZEOF_LONG
if (zn < bdigit_roomof(SIZEOF_LONG))
zn = bdigit_roomof(SIZEOF_LONG);
#endif
z = bignew(zn, 0);
zds = BDIGITS(z);
-#if SIZEOF_BDIGITS >= SIZEOF_LONG
+#if SIZEOF_BDIGIT >= SIZEOF_LONG
i = 1;
zds[0] = xds[0] | BIGLO(y);
if (i < zn)
@@ -6664,15 +6570,15 @@ bigxor_int(VALUE x, long xn, BDIGIT hibitsx, long y)
hibitsy = 0 <= y ? 0 : BDIGMAX;
xds = BDIGITS(x);
- zn = RBIGNUM_LEN(x);
-#if SIZEOF_BDIGITS < SIZEOF_LONG
+ zn = BIGNUM_LEN(x);
+#if SIZEOF_BDIGIT < SIZEOF_LONG
if (zn < bdigit_roomof(SIZEOF_LONG))
zn = bdigit_roomof(SIZEOF_LONG);
#endif
z = bignew(zn, 0);
zds = BDIGITS(z);
-#if SIZEOF_BDIGITS >= SIZEOF_LONG
+#if SIZEOF_BDIGIT >= SIZEOF_LONG
i = 1;
zds[0] = xds[0] ^ BIGLO(y);
#else
@@ -6848,33 +6754,38 @@ static VALUE
rb_big_aref(VALUE x, VALUE y)
{
BDIGIT *xds;
- unsigned long shift;
- long i, s1, s2;
+ size_t shift;
+ size_t i, s1, s2;
+ long l;
BDIGIT bit;
if (RB_BIGNUM_TYPE_P(y)) {
- if (!RBIGNUM_SIGN(y))
+ if (!BIGNUM_SIGN(y))
return INT2FIX(0);
bigtrunc(y);
- if (BIGSIZE(y) > sizeof(long)) {
+ if (BIGSIZE(y) > sizeof(size_t)) {
out_of_range:
- return RBIGNUM_SIGN(x) ? INT2FIX(0) : INT2FIX(1);
+ return BIGNUM_SIGN(x) ? INT2FIX(0) : INT2FIX(1);
}
+#if SIZEOF_SIZE_T <= SIZEOF_LONG
shift = big2ulong(y, "long");
+#else
+ shift = big2ull(y, "long long");
+#endif
}
else {
- i = NUM2LONG(y);
- if (i < 0) return INT2FIX(0);
- shift = i;
+ l = NUM2LONG(y);
+ if (l < 0) return INT2FIX(0);
+ shift = (size_t)l;
}
s1 = shift/BITSPERDIG;
s2 = shift%BITSPERDIG;
bit = (BDIGIT)1 << s2;
- if (s1 >= RBIGNUM_LEN(x)) goto out_of_range;
+ if (s1 >= BIGNUM_LEN(x)) goto out_of_range;
xds = BDIGITS(x);
- if (RBIGNUM_POSITIVE_P(x))
+ if (BIGNUM_POSITIVE_P(x))
return (xds[s1] & bit) ? INT2FIX(1) : INT2FIX(0);
if (xds[s1] & (bit-1))
return (xds[s1] & bit) ? INT2FIX(0) : INT2FIX(1);
@@ -6889,14 +6800,16 @@ rb_big_aref(VALUE x, VALUE y)
* big.hash -> fixnum
*
* Compute a hash based on the value of _big_.
+ *
+ * See also Object#hash.
*/
-static VALUE
+VALUE
rb_big_hash(VALUE x)
{
st_index_t hash;
- hash = rb_memhash(BDIGITS(x), sizeof(BDIGIT)*RBIGNUM_LEN(x)) ^ RBIGNUM_SIGN(x);
+ hash = rb_memhash(BDIGITS(x), sizeof(BDIGIT)*BIGNUM_LEN(x)) ^ BIGNUM_SIGN(x);
return INT2FIX(hash);
}
@@ -6921,8 +6834,8 @@ rb_big_coerce(VALUE x, VALUE y)
y = rb_int2big(FIX2LONG(y));
}
else if (!RB_BIGNUM_TYPE_P(y)) {
- rb_raise(rb_eTypeError, "can't coerce %s to Bignum",
- rb_obj_classname(y));
+ rb_raise(rb_eTypeError, "can't coerce %"PRIsVALUE" to Bignum",
+ rb_obj_class(y));
}
return rb_assoc_new(y, x);
}
@@ -6940,9 +6853,9 @@ rb_big_coerce(VALUE x, VALUE y)
static VALUE
rb_big_abs(VALUE x)
{
- if (!RBIGNUM_SIGN(x)) {
+ if (!BIGNUM_SIGN(x)) {
x = rb_big_clone(x);
- RBIGNUM_SET_SIGN(x, 1);
+ BIGNUM_SET_SIGN(x, 1);
}
return x;
}
@@ -6994,6 +6907,13 @@ rb_big_size(VALUE big)
* (2**10000).bit_length #=> 10001
* (2**10000+1).bit_length #=> 10001
*
+ * This method can be used to detect overflow in Array#pack as follows.
+ *
+ * if n.bit_length < 32
+ * [n].pack("l") # no overflow
+ * else
+ * raise "overflow"
+ * end
*/
static VALUE
@@ -7012,7 +6932,7 @@ rb_big_bit_length(VALUE big)
if (numbytes == 0)
return LONG2FIX(0);
- if (RBIGNUM_NEGATIVE_P(big) && rb_absint_singlebit_p(big)) {
+ if (BIGNUM_NEGATIVE_P(big) && rb_absint_singlebit_p(big)) {
if (nlz_bits != CHAR_BIT-1) {
nlz_bits++;
}
@@ -7047,7 +6967,7 @@ rb_big_bit_length(VALUE big)
static VALUE
rb_big_odd_p(VALUE num)
{
- if (RBIGNUM_LEN(num) != 0 && BDIGITS(num)[0] & 1) {
+ if (BIGNUM_LEN(num) != 0 && BDIGITS(num)[0] & 1) {
return Qtrue;
}
return Qfalse;
@@ -7063,7 +6983,7 @@ rb_big_odd_p(VALUE num)
static VALUE
rb_big_even_p(VALUE num)
{
- if (RBIGNUM_LEN(num) != 0 && BDIGITS(num)[0] & 1) {
+ if (BIGNUM_LEN(num) != 0 && BDIGITS(num)[0] & 1) {
return Qfalse;
}
return Qtrue;
@@ -7133,6 +7053,7 @@ Init_Bignum(void)
rb_define_method(rb_cBignum, "even?", rb_big_even_p, 0);
#ifdef USE_GMP
+ /* The version of loaded GMP. */
rb_define_const(rb_cBignum, "GMP_VERSION", rb_sprintf("GMP %s", gmp_version));
#endif
diff --git a/bin/erb b/bin/erb
index 6a7ea7d593..6a88c3b26a 100755
--- a/bin/erb
+++ b/bin/erb
@@ -11,7 +11,8 @@ class ERB
return nil if self.empty?
arg = self.shift
return nil if arg == '--'
- if arg =~ /^-(.)(.*)/
+ case arg
+ when /\A-(.)(.*)/
if $1 == '-'
arg, @maybe_arg = arg.split(/=/, 2)
return arg
@@ -24,6 +25,8 @@ class ERB
@maybe_arg = nil
end
"-#{$1}"
+ when /\A(\w+)=/
+ arg
else
self.unshift arg
nil
@@ -54,6 +57,7 @@ class ERB
def run(factory=ERB)
trim_mode = 0
disable_percent = false
+ variables = {}
begin
while switch = ARGV.switch
case switch
@@ -72,7 +76,7 @@ class ERB
require ARGV.req_arg
when '-S' # security level
arg = ARGV.req_arg
- raise "invalid safe_level #{arg.dump}" unless arg =~ /^[0-3]$/
+ raise "invalid safe_level #{arg.dump}" unless arg =~ /\A[0-1]\z/
safe_level = arg.to_i
when '-T' # trim mode
arg = ARGV.req_arg
@@ -80,7 +84,7 @@ class ERB
trim_mode = arg
next
end
- raise "invalid trim mode #{arg.dump}" unless arg =~ /^[0-2]$/
+ raise "invalid trim mode #{arg.dump}" unless arg =~ /\A[0-2]\z/
trim_mode = arg.to_i
when '-E', '--encoding'
arg = ARGV.req_arg
@@ -91,25 +95,29 @@ class ERB
disable_percent = true
when '--help'
raise "print this help"
- else
+ when /\A-/
raise "unknown switch #{switch.dump}"
+ else
+ var, val = *switch.split('=', 2)
+ (variables ||= {})[var] = val
end
end
rescue # usage
STDERR.puts $!.to_s
STDERR.puts File.basename($0) +
- " [switches] [inputfile]"
+ " [switches] [var=value...] [inputfile]"
STDERR.puts <<EOU
-x print ruby script
-n print ruby script with line number
-v enable verbose mode
-d set $DEBUG to true
-r library load a library
- -S safe_level set $SAFE (0..3)
+ -S safe_level set $SAFE (0..1)
-E ex[:in] set default external/internal encodings
-U set default encoding to UTF-8.
-T trim_mode specify trim_mode (0..2, -)
-P ignore lines which start with "%"
+ var=value set variable
EOU
exit 1
end
@@ -130,15 +138,23 @@ EOU
puts erb.src
end
else
- erb.run(TOPLEVEL_BINDING.taint)
+ bind = TOPLEVEL_BINDING.taint
+ if variables
+ enc = erb.encoding
+ for var, val in variables do
+ val = val.encode(enc) if val
+ bind.local_variable_set(var, val)
+ end
+ end
+ erb.run(bind)
end
end
module_function :run
def set_encoding(extern, intern = nil)
verbose, $VERBOSE = $VERBOSE, nil
- Encoding.default_external = extern unless extern.nil? || extern.empty?
- Encoding.default_internal = intern unless intern.nil? || intern.empty?
+ Encoding.default_external = extern unless extern.nil? || extern == ""
+ Encoding.default_internal = intern unless intern.nil? || intern == ""
[$stdin, $stdout, $stderr].each do |io|
io.set_encoding(extern, intern)
end
diff --git a/bin/rake b/bin/rake
deleted file mode 100755
index 4e0bbb7b7a..0000000000
--- a/bin/rake
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/usr/bin/env ruby
-
-#--
-# Copyright (c) 2003, 2004, 2005, 2006, 2007 Jim Weirich
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to
-# deal in the Software without restriction, including without limitation the
-# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-# sell copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-# IN THE SOFTWARE.
-#++
-
-begin
- require 'rubygems'
- gem 'rake'
-rescue LoadError
-end
-
-require 'rake'
-
-Rake.application.run
diff --git a/bin/testrb b/bin/testrb
deleted file mode 100755
index 23a00b439f..0000000000
--- a/bin/testrb
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env ruby
-require 'test/unit'
-exit Test::Unit::AutoRunner.run(true)
diff --git a/bootstraptest/runner.rb b/bootstraptest/runner.rb
index 5fdfc42a63..5eb468a338 100755
--- a/bootstraptest/runner.rb
+++ b/bootstraptest/runner.rb
@@ -136,13 +136,18 @@ End
@tty &&= !@verbose
if @color
# dircolors-like style
- colors = (colors = ENV['TEST_COLORS']) ? Hash[colors.scan(/(\w+)=([^:]*)/)] : {}
- @passed = "\e[#{colors["pass"] || "32"}m"
- @failed = "\e[#{colors["fail"] || "31"}m"
+ colors = (colors = ENV['TEST_COLORS']) ? Hash[colors.scan(/(\w+)=([^:\n]*)/)] : {}
+ begin
+ File.read(File.join(__dir__, "../test/colors")).scan(/(\w+)=([^:\n]*)/) do |n, c|
+ colors[n] ||= c
+ end
+ rescue
+ end
+ @passed = "\e[;#{colors["pass"] || "32"}m"
+ @failed = "\e[;#{colors["fail"] || "31"}m"
@reset = "\e[m"
- @erase = "\r\e[2K\r"
else
- @passed = @failed = @reset = @erase = ""
+ @passed = @failed = @reset = ""
end
unless quiet
puts Time.now
@@ -163,28 +168,44 @@ End
}
end
+def erase(e = true)
+ if e and @columns > 0 and !@verbose
+ "\r#{" "*@columns}\r"
+ else
+ ""
+ end
+end
+
def exec_test(pathes)
@count = 0
@error = 0
@errbuf = []
@location = nil
+ @columns = 0
+ @width = pathes.map {|path| File.basename(path).size}.max + 2
pathes.each do |path|
@basename = File.basename(path)
- $stderr.print @basename, " "
+ $stderr.printf("%s%-*s ", erase(@quiet), @width, @basename)
+ $stderr.flush
+ @columns = @width + 1
$stderr.puts if @verbose
count = @count
error = @error
load File.expand_path(path)
if @tty
if @error == error
- $stderr.print "#{@progress_bs}#{@passed}PASS #{@count-count}#{@reset}"
- $stderr.print @erase if @quiet
+ msg = "PASS #{@count-count}"
+ @columns += msg.size - 1
+ $stderr.print "#{@progress_bs}#{@passed}#{msg}#{@reset}"
else
- $stderr.print "#{@progress_bs}#{@failed}FAIL #{@error-error}/#{@count-count}#{@reset}"
+ msg = "FAIL #{@error-error}/#{@count-count}"
+ $stderr.print "#{@progress_bs}#{@failed}#{msg}#{@reset}"
+ @columns = 0
end
end
- $stderr.puts unless @quiet and @tty
+ $stderr.puts unless @quiet and @tty and @error == error
end
+ $stderr.print(erase) if @quiet
if @error == 0
if @count == 0
$stderr.puts "No tests, no problem"
@@ -207,23 +228,28 @@ def show_progress(message = '')
elsif @tty
$stderr.print "#{@progress_bs}#{@progress[@count % @progress.size]}"
end
+ t = Time.now if @verbose
faildesc, errout = with_stderr {yield}
+ t = Time.now - t if @verbose
if !faildesc
if @tty
$stderr.print "#{@progress_bs}#{@progress[@count % @progress.size]}"
+ elsif @verbose
+ $stderr.printf(". %.3f\n", t)
else
$stderr.print '.'
end
- $stderr.puts if @verbose
else
- $stderr.print "#{@failed}F#{@reset}"
+ $stderr.print "#{@failed}F"
+ $stderr.printf(" %.3f", t) if @verbose
+ $stderr.print "#{@reset}"
$stderr.puts if @verbose
error faildesc, message
unless errout.empty?
$stderr.print "#{@failed}stderr output is not empty#{@reset}\n", adjust_indent(errout)
end
if @tty and !@verbose
- $stderr.print @basename, " ", @progress[@count % @progress.size]
+ $stderr.printf("%-*s%s", @width, @basename, @progress[@count % @progress.size])
end
end
rescue Interrupt
@@ -321,7 +347,7 @@ def assert_normal_exit(testsrc, *rest)
$stderr.reopen(old_stderr)
old_stderr.close
end
- if status && status.signaled?
+ if status&.signaled?
signo = status.termsig
signame = Signal.list.invert[signo]
unless ignore_signals and ignore_signals.include?(signame)
@@ -385,7 +411,7 @@ end
INDENT = 27
def adjust_indent(src)
- untabify(src).gsub(/^ {#{INDENT}}/o, '').gsub(/^/, ' ')
+ untabify(src).gsub(/^ {#{INDENT}}/o, '').gsub(/^/, ' ').sub(/\s*\z/, "\n")
end
def untabify(str)
@@ -445,7 +471,7 @@ end
def error(msg, additional_message)
msg = "#{@failed}\##{@count} #{@location}#{@reset}: #{msg} #{additional_message}"
if @tty
- $stderr.puts "#{@erase}#{msg}"
+ $stderr.puts "#{erase}#{msg}"
else
@errbuf.push msg
end
diff --git a/bootstraptest/test_block.rb b/bootstraptest/test_block.rb
index 6a2ccfc6da..cdc5960a59 100644
--- a/bootstraptest/test_block.rb
+++ b/bootstraptest/test_block.rb
@@ -597,3 +597,17 @@ assert_equal 'true', %q{
C1.new.foo{}
}
+assert_equal 'ok', %q{
+ 1.times do
+ begin
+ raise
+ rescue
+ begin
+ raise
+ rescue
+ break
+ end
+ end
+ end
+ 'ok'
+}
diff --git a/bootstraptest/test_fork.rb b/bootstraptest/test_fork.rb
index 384294727f..1cd9f7ac6c 100644
--- a/bootstraptest/test_fork.rb
+++ b/bootstraptest/test_fork.rb
@@ -22,26 +22,32 @@ assert_finish 10, %q{
}, '[ruby-core:22158]'
assert_normal_exit(<<'End', '[ruby-dev:37934]')
- Thread.new { sleep 1; Thread.kill Thread.main }
- Process.setrlimit(:NPROC, 1)
+ main = Thread.current
+ Thread.new { sleep 0.01 until main.stop?; Thread.kill main }
+ Process.setrlimit(:NPROC, 1) if defined?(Process::RLIMIT_NPROC)
fork {}
End
assert_equal 'ok', %q{
begin
+ r, w = IO.pipe
if pid1 = fork
- sleep 1
+ w.close
+ r.read(1)
Process.kill("USR1", pid1)
_, s = Process.wait2(pid1)
s.success? ? :ok : :ng
else
+ r.close
if pid2 = fork
- trap("USR1") { Time.now.to_s }
+ trap("USR1") { Time.now.to_s; Process.kill("USR2", pid2) }
+ w.close
Process.wait2(pid2)
else
- sleep 2
+ w.close
+ sleep 0.2
end
- exit 0
+ exit true
end
rescue NotImplementedError
:ok
@@ -50,17 +56,17 @@ assert_equal 'ok', %q{
assert_equal '[1, 2]', %q{
a = []
- trap(:INT) { a.push(1) }
- trap(:TERM) { a.push(2) }
+ main = Thread.current
+ trap(:INT) { a.push(1).size == 2 and main.wakeup }
+ trap(:TERM) { a.push(2).size == 2 and main.wakeup }
pid = $$
begin
- fork do
- sleep 0.5
+ pid = fork do
Process.kill(:INT, pid)
Process.kill(:TERM, pid)
end
-
- sleep 1
+ Process.wait(pid)
+ 100.times {break if a.size > 1; sleep 0.001}
a.sort
rescue NotImplementedError
[1, 2]
diff --git a/bootstraptest/test_io.rb b/bootstraptest/test_io.rb
index f7360f34b3..1d2b19368a 100644
--- a/bootstraptest/test_io.rb
+++ b/bootstraptest/test_io.rb
@@ -2,9 +2,8 @@ assert_finish 5, %q{
r, w = IO.pipe
t1 = Thread.new { r.sysread(1) }
t2 = Thread.new { r.sysread(1) }
- sleep 0.1
+ sleep 0.01 until t1.stop? and t2.stop?
w.write "a"
- sleep 0.1
w.write "a"
}, '[ruby-dev:31866]'
@@ -27,16 +26,16 @@ assert_finish 10, %q{
t1.join
t2.join
end
- rescue LoadError, TimeoutError, NotImplementedError
+ rescue LoadError, Timeout::Error, NotImplementedError
end
}, '[ruby-dev:32566]'
assert_finish 1, %q{
r, w = IO.pipe
Thread.new {
- w << "ab"
- sleep 0.1
- w << "ab"
+ w << "ab"
+ sleep 0.01
+ w << "ab"
}
r.gets("abab")
}
@@ -91,7 +90,8 @@ assert_normal_exit %q{
megacontent = "abc" * 12345678
#File.open("megasrc", "w") {|f| f << megacontent }
- Thread.new { sleep rand*0.2; Process.kill(:INT, $$) }
+ t0 = Thread.main
+ Thread.new { sleep 0.001 until t0.stop?; Process.kill(:INT, $$) }
r1, w1 = IO.pipe
r2, w2 = IO.pipe
diff --git a/bootstraptest/test_literal.rb b/bootstraptest/test_literal.rb
index b95a2f2d0a..aa65bddae1 100644
--- a/bootstraptest/test_literal.rb
+++ b/bootstraptest/test_literal.rb
@@ -84,7 +84,7 @@ assert_equal '0', 're = /test/; re =~ "test"'
assert_equal '0', 'str = "test"; /test/ =~ str'
assert_equal '0', 're = /test/; str = "test"; re =~ str'
-# dynacmi regexp
+# dynamic regexp
assert_equal 'regexp', %q(/re#{'ge'}xp/.source)
assert_equal 'Regexp', %q(/re#{'ge'}xp/.class)
diff --git a/bootstraptest/test_method.rb b/bootstraptest/test_method.rb
index 0a7cb0a577..3462aa9434 100644
--- a/bootstraptest/test_method.rb
+++ b/bootstraptest/test_method.rb
@@ -3,7 +3,7 @@ assert_equal '1', 'def m() 1 end; m()'
assert_equal '1', 'def m(a) a end; m(1)'
assert_equal '[1, 2]', 'def m(a,b) [a, b] end; m(1,2)'
assert_equal '[1, 2, 3]', 'def m(a,b,c) [a, b, c] end; m(1,2,3)'
-assert_equal 'wrong number of arguments (1 for 0)', %q{
+assert_match /\Awrong number of arguments \(.*\b1\b.* 0\)\z/, %q{
def m; end
begin
m(1)
@@ -12,7 +12,7 @@ assert_equal 'wrong number of arguments (1 for 0)', %q{
end
}
-assert_equal 'wrong number of arguments (0 for 1)', %q{
+assert_match /\Awrong number of arguments \(.*\b0\b.* 1\)\z/, %q{
def m a; end
begin
m
@@ -910,34 +910,6 @@ assert_equal 'ok', %q{
}, '[ruby-core:11998]'
assert_equal 'ok', %q{
- proc{
- $SAFE = 2
- class C
- def m
- :ok
- end
- end
- }.call
- C.new.m
-}, '[ruby-core:11998]'
-
-assert_equal 'ok', %q{
- proc{
- $SAFE = 3
- class C
- def m
- :ng
- end
- end
- }.call
- begin
- C.new.m
- rescue SecurityError
- :ok
- end
-}, '[ruby-core:11998]'
-
-assert_equal 'ok', %q{
class B
def m() :fail end
end
diff --git a/bootstraptest/test_string.rb b/bootstraptest/test_string.rb
new file mode 100644
index 0000000000..849dcd45b0
--- /dev/null
+++ b/bootstraptest/test_string.rb
@@ -0,0 +1,3 @@
+assert_normal_exit %q{
+ inspect.clear
+}, '[ruby-core:68110]'
diff --git a/bootstraptest/test_syntax.rb b/bootstraptest/test_syntax.rb
index 80eaa6416d..a111990a1f 100644
--- a/bootstraptest/test_syntax.rb
+++ b/bootstraptest/test_syntax.rb
@@ -376,6 +376,8 @@ assert_equal %q{1}, %q{1 or 2 or 3 or 4}
assert_equal %q{1}, %q{1 or false or 3 or 4}
assert_equal %q{2}, %q{nil or 2 or 3 or 4}
assert_equal %q{2}, %q{false or 2 or 3 or 4}
+assert_equal %q{1}, %q{if true && ""; then 1; end}
+assert_equal %q{1}, %q{if nil || true; then 1; end}
assert_equal %q{false}, %q{nil or false or nil or false}
assert_equal %q{elseng}, %q{
case
diff --git a/bootstraptest/test_thread.rb b/bootstraptest/test_thread.rb
index 7baa806a45..d64f44be49 100644
--- a/bootstraptest/test_thread.rb
+++ b/bootstraptest/test_thread.rb
@@ -85,7 +85,7 @@ assert_equal %q{ok}, %q{
ans = :ok
end
}
- Thread.pass
+ Thread.pass until t.stop?
t.kill
t.join
ans
@@ -241,16 +241,16 @@ assert_equal 'ok', %{
}
assert_finish 3, %{
- th = Thread.new {sleep 2}
- th.join(1)
+ th = Thread.new {sleep 0.2}
+ th.join(0.1)
th.join
}
assert_finish 3, %{
require 'timeout'
- th = Thread.new {sleep 2}
+ th = Thread.new {sleep 0.2}
begin
- Timeout.timeout(1) {th.join}
+ Timeout.timeout(0.1) {th.join}
rescue Timeout::Error
end
th.join
@@ -276,7 +276,7 @@ assert_normal_exit %q{
assert_equal 'ok', %q{
def m
t = Thread.new { while true; // =~ "" end }
- sleep 0.1
+ sleep 0.01
10.times {
if /((ab)*(ab)*)*(b)/ =~ "ab"*7
return :ng if !$4
@@ -340,8 +340,9 @@ assert_equal 'ok', %q{
assert_equal 'ok', %q{
begin
m1, m2 = Mutex.new, Mutex.new
- Thread.new { m1.lock; sleep 1; m2.lock }
- m2.lock; sleep 1; m1.lock
+ f1 = f2 = false
+ Thread.new { m1.lock; f2 = true; sleep 0.001 until f1; m2.lock }
+ m2.lock; f1 = true; sleep 0.001 until f2; m1.lock
:ng
rescue Exception
:ok
@@ -350,7 +351,7 @@ assert_equal 'ok', %q{
assert_equal 'ok', %q{
m = Mutex.new
- Thread.new { m.lock }; sleep 1; m.lock
+ Thread.new { m.lock }; sleep 0.1; m.lock
:ok
}
@@ -368,15 +369,15 @@ assert_equal 'ok', %q{
assert_equal 'ok', %q{
m = Mutex.new
- Thread.new { m.lock; sleep 2 }
- sleep 1; m.lock
+ Thread.new { m.lock; sleep 0.2 }
+ sleep 0.1; m.lock
:ok
}
assert_equal 'ok', %q{
m = Mutex.new
- Thread.new { m.lock; sleep 2; m.unlock }
- sleep 1; m.lock
+ Thread.new { m.lock; sleep 0.2; m.unlock }
+ sleep 0.1; m.lock
:ok
}
@@ -398,19 +399,20 @@ assert_equal 'ok', %q{
assert_equal 'ok', %{
open("zzz.rb", "w") do |f|
- f.puts <<-END
+ f.puts <<-'end;' # do
begin
m = Mutex.new
- Thread.new { m.lock; sleep 1 }
- sleep 0.3
parent = Thread.current
+ th1 = Thread.new { m.lock; sleep }
+ sleep 0.01 until th1.stop?
Thread.new do
- sleep 0.3
+ sleep 0.01 until parent.stop?
begin
fork { GC.start }
rescue Exception
parent.raise $!
end
+ th1.run
end
m.lock
pid, status = Process.wait2
@@ -418,7 +420,7 @@ assert_equal 'ok', %{
rescue NotImplementedError
$result = :ok
end
- END
+ end;
end
require "./zzz.rb"
$result
@@ -448,17 +450,27 @@ assert_finish 3, %q{
assert_equal 'ok', %q{
begin
- Process.waitpid2(fork {sleep 1})[1].success? ? 'ok' : 'ng'
+ Process.waitpid2(fork {})[1].success? ? 'ok' : 'ng'
rescue NotImplementedError
'ok'
end
}
assert_equal 'foo', %q{
- f = proc {|s| /#{ sleep 1; s }/o }
- [ Thread.new { f.call("foo"); nil },
- Thread.new { sleep 0.5; f.call("bar"); nil },
- ].each {|t| t.join }
+ i = 0
+ Thread.start {sleep 1; exit!}
+ f = proc {|s, c| /#{c.call; s}/o }
+ th2 = Thread.new {
+ sleep 0.01 until i == 1
+ i = 2
+ f.call("bar", proc {sleep 2});
+ nil
+ }
+ th1 = Thread.new {
+ f.call("foo", proc {i = 1; sleep 0.01 until i == 2; sleep 0.01})
+ nil
+ }
+ [th1, th2].each {|t| t.join }
GC.start
f.call.source
}
diff --git a/ccan/build_assert/build_assert.h b/ccan/build_assert/build_assert.h
new file mode 100644
index 0000000000..a04d1d4709
--- /dev/null
+++ b/ccan/build_assert/build_assert.h
@@ -0,0 +1,40 @@
+/* CC0 (Public domain) - see ccan/licenses/CC0 file for details */
+#ifndef CCAN_BUILD_ASSERT_H
+#define CCAN_BUILD_ASSERT_H
+
+/**
+ * BUILD_ASSERT - assert a build-time dependency.
+ * @cond: the compile-time condition which must be true.
+ *
+ * Your compile will fail if the condition isn't true, or can't be evaluated
+ * by the compiler. This can only be used within a function.
+ *
+ * Example:
+ * #include <stddef.h>
+ * ...
+ * static char *foo_to_char(struct foo *foo)
+ * {
+ * // This code needs string to be at start of foo.
+ * BUILD_ASSERT(offsetof(struct foo, string) == 0);
+ * return (char *)foo;
+ * }
+ */
+#define BUILD_ASSERT(cond) \
+ do { (void) sizeof(char [1 - 2*!(cond)]); } while(0)
+
+/**
+ * BUILD_ASSERT_OR_ZERO - assert a build-time dependency, as an expression.
+ * @cond: the compile-time condition which must be true.
+ *
+ * Your compile will fail if the condition isn't true, or can't be evaluated
+ * by the compiler. This can be used in an expression: its value is "0".
+ *
+ * Example:
+ * #define foo_to_char(foo) \
+ * ((char *)(foo) \
+ * + BUILD_ASSERT_OR_ZERO(offsetof(struct foo, string) == 0))
+ */
+#define BUILD_ASSERT_OR_ZERO(cond) \
+ (sizeof(char [1 - 2*!(cond)]) - 1)
+
+#endif /* CCAN_BUILD_ASSERT_H */
diff --git a/ccan/check_type/check_type.h b/ccan/check_type/check_type.h
new file mode 100644
index 0000000000..1f77a535e4
--- /dev/null
+++ b/ccan/check_type/check_type.h
@@ -0,0 +1,63 @@
+/* CC0 (Public domain) - see ccan/licenses/CC0 file for details */
+#ifndef CCAN_CHECK_TYPE_H
+#define CCAN_CHECK_TYPE_H
+
+/**
+ * check_type - issue a warning or build failure if type is not correct.
+ * @expr: the expression whose type we should check (not evaluated).
+ * @type: the exact type we expect the expression to be.
+ *
+ * This macro is usually used within other macros to try to ensure that a macro
+ * argument is of the expected type. No type promotion of the expression is
+ * done: an unsigned int is not the same as an int!
+ *
+ * check_type() always evaluates to 0.
+ *
+ * If your compiler does not support typeof, then the best we can do is fail
+ * to compile if the sizes of the types are unequal (a less complete check).
+ *
+ * Example:
+ * // They should always pass a 64-bit value to _set_some_value!
+ * #define set_some_value(expr) \
+ * _set_some_value((check_type((expr), uint64_t), (expr)))
+ */
+
+/**
+ * check_types_match - issue a warning or build failure if types are not same.
+ * @expr1: the first expression (not evaluated).
+ * @expr2: the second expression (not evaluated).
+ *
+ * This macro is usually used within other macros to try to ensure that
+ * arguments are of identical types. No type promotion of the expressions is
+ * done: an unsigned int is not the same as an int!
+ *
+ * check_types_match() always evaluates to 0.
+ *
+ * If your compiler does not support typeof, then the best we can do is fail
+ * to compile if the sizes of the types are unequal (a less complete check).
+ *
+ * Example:
+ * // Do subtraction to get to enclosing type, but make sure that
+ * // pointer is of correct type for that member.
+ * #define container_of(mbr_ptr, encl_type, mbr) \
+ * (check_types_match((mbr_ptr), &((encl_type *)0)->mbr), \
+ * ((encl_type *) \
+ * ((char *)(mbr_ptr) - offsetof(enclosing_type, mbr))))
+ */
+#if HAVE_TYPEOF
+#define check_type(expr, type) \
+ ((typeof(expr) *)0 != (type *)0)
+
+#define check_types_match(expr1, expr2) \
+ ((typeof(expr1) *)0 != (typeof(expr2) *)0)
+#else
+#include "ccan/build_assert/build_assert.h"
+/* Without typeof, we can only test the sizes. */
+#define check_type(expr, type) \
+ BUILD_ASSERT_OR_ZERO(sizeof(expr) == sizeof(type))
+
+#define check_types_match(expr1, expr2) \
+ BUILD_ASSERT_OR_ZERO(sizeof(expr1) == sizeof(expr2))
+#endif /* HAVE_TYPEOF */
+
+#endif /* CCAN_CHECK_TYPE_H */
diff --git a/ccan/container_of/container_of.h b/ccan/container_of/container_of.h
new file mode 100644
index 0000000000..ae3e1fc81f
--- /dev/null
+++ b/ccan/container_of/container_of.h
@@ -0,0 +1,142 @@
+/* CC0 (Public domain) - see ccan/licenses/CC0 file for details */
+#ifndef CCAN_CONTAINER_OF_H
+#define CCAN_CONTAINER_OF_H
+#include "ccan/check_type/check_type.h"
+
+/**
+ * container_of - get pointer to enclosing structure
+ * @member_ptr: pointer to the structure member
+ * @containing_type: the type this member is within
+ * @member: the name of this member within the structure.
+ *
+ * Given a pointer to a member of a structure, this macro does pointer
+ * subtraction to return the pointer to the enclosing type.
+ *
+ * Example:
+ * struct foo {
+ * int fielda, fieldb;
+ * // ...
+ * };
+ * struct info {
+ * int some_other_field;
+ * struct foo my_foo;
+ * };
+ *
+ * static struct info *foo_to_info(struct foo *foo)
+ * {
+ * return container_of(foo, struct info, my_foo);
+ * }
+ */
+#define container_of(member_ptr, containing_type, member) \
+ ((containing_type *) \
+ ((char *)(member_ptr) \
+ - container_off(containing_type, member)) \
+ + check_types_match(*(member_ptr), ((containing_type *)0)->member))
+
+
+/**
+ * container_of_or_null - get pointer to enclosing structure, or NULL
+ * @member_ptr: pointer to the structure member
+ * @containing_type: the type this member is within
+ * @member: the name of this member within the structure.
+ *
+ * Given a pointer to a member of a structure, this macro does pointer
+ * subtraction to return the pointer to the enclosing type, unless it
+ * is given NULL, in which case it also returns NULL.
+ *
+ * Example:
+ * struct foo {
+ * int fielda, fieldb;
+ * // ...
+ * };
+ * struct info {
+ * int some_other_field;
+ * struct foo my_foo;
+ * };
+ *
+ * static struct info *foo_to_info_allowing_null(struct foo *foo)
+ * {
+ * return container_of_or_null(foo, struct info, my_foo);
+ * }
+ */
+static inline char *container_of_or_null_(void *member_ptr, size_t offset)
+{
+ return member_ptr ? (char *)member_ptr - offset : NULL;
+}
+#define container_of_or_null(member_ptr, containing_type, member) \
+ ((containing_type *) \
+ container_of_or_null_(member_ptr, \
+ container_off(containing_type, member)) \
+ + check_types_match(*(member_ptr), ((containing_type *)0)->member))
+
+/**
+ * container_off - get offset to enclosing structure
+ * @containing_type: the type this member is within
+ * @member: the name of this member within the structure.
+ *
+ * Given a pointer to a member of a structure, this macro does
+ * typechecking and figures out the offset to the enclosing type.
+ *
+ * Example:
+ * struct foo {
+ * int fielda, fieldb;
+ * // ...
+ * };
+ * struct info {
+ * int some_other_field;
+ * struct foo my_foo;
+ * };
+ *
+ * static struct info *foo_to_info(struct foo *foo)
+ * {
+ * size_t off = container_off(struct info, my_foo);
+ * return (void *)((char *)foo - off);
+ * }
+ */
+#define container_off(containing_type, member) \
+ offsetof(containing_type, member)
+
+/**
+ * container_of_var - get pointer to enclosing structure using a variable
+ * @member_ptr: pointer to the structure member
+ * @container_var: a pointer of same type as this member's container
+ * @member: the name of this member within the structure.
+ *
+ * Given a pointer to a member of a structure, this macro does pointer
+ * subtraction to return the pointer to the enclosing type.
+ *
+ * Example:
+ * static struct info *foo_to_i(struct foo *foo)
+ * {
+ * struct info *i = container_of_var(foo, i, my_foo);
+ * return i;
+ * }
+ */
+#if HAVE_TYPEOF
+#define container_of_var(member_ptr, container_var, member) \
+ container_of(member_ptr, typeof(*container_var), member)
+#else
+#define container_of_var(member_ptr, container_var, member) \
+ ((void *)((char *)(member_ptr) - \
+ container_off_var(container_var, member)))
+#endif
+
+/**
+ * container_off_var - get offset of a field in enclosing structure
+ * @container_var: a pointer to a container structure
+ * @member: the name of a member within the structure.
+ *
+ * Given (any) pointer to a structure and a its member name, this
+ * macro does pointer subtraction to return offset of member in a
+ * structure memory layout.
+ *
+ */
+#if HAVE_TYPEOF
+#define container_off_var(var, member) \
+ container_off(typeof(*var), member)
+#else
+#define container_off_var(var, member) \
+ ((const char *)&(var)->member - (const char *)(var))
+#endif
+
+#endif /* CCAN_CONTAINER_OF_H */
diff --git a/ccan/licenses/BSD-MIT b/ccan/licenses/BSD-MIT
new file mode 100644
index 0000000000..89de354795
--- /dev/null
+++ b/ccan/licenses/BSD-MIT
@@ -0,0 +1,17 @@
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/ccan/licenses/CC0 b/ccan/licenses/CC0
new file mode 100644
index 0000000000..feb9b118e6
--- /dev/null
+++ b/ccan/licenses/CC0
@@ -0,0 +1,28 @@
+Statement of Purpose
+
+The laws of most jurisdictions throughout the world automatically confer exclusive Copyright and Related Rights (defined below) upon the creator and subsequent owner(s) (each and all, an "owner") of an original work of authorship and/or a database (each, a "Work").
+
+Certain owners wish to permanently relinquish those rights to a Work for the purpose of contributing to a commons of creative, cultural and scientific works ("Commons") that the public can reliably and without fear of later claims of infringement build upon, modify, incorporate in other works, reuse and redistribute as freely as possible in any form whatsoever and for any purposes, including without limitation commercial purposes. These owners may contribute to the Commons to promote the ideal of a free culture and the further production of creative, cultural and scientific works, or to gain reputation or greater distribution for their Work in part through the use and efforts of others.
+
+For these and/or other purposes and motivations, and without any expectation of additional consideration or compensation, the person associating CC0 with a Work (the "Affirmer"), to the extent that he or she is an owner of Copyright and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and publicly distribute the Work under its terms, with knowledge of his or her Copyright and Related Rights in the Work and the meaning and intended legal effect of CC0 on those rights.
+
+1. Copyright and Related Rights. A Work made available under CC0 may be protected by copyright and related or neighboring rights ("Copyright and Related Rights"). Copyright and Related Rights include, but are not limited to, the following:
+
+ the right to reproduce, adapt, distribute, perform, display, communicate, and translate a Work;
+ moral rights retained by the original author(s) and/or performer(s);
+ publicity and privacy rights pertaining to a person's image or likeness depicted in a Work;
+ rights protecting against unfair competition in regards to a Work, subject to the limitations in paragraph 4(a), below;
+ rights protecting the extraction, dissemination, use and reuse of data in a Work;
+ database rights (such as those arising under Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, and under any national implementation thereof, including any amended or successor version of such directive); and
+ other similar, equivalent or corresponding rights throughout the world based on applicable law or treaty, and any national implementations thereof.
+
+2. Waiver. To the greatest extent permitted by, but not in contravention of, applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and unconditionally waives, abandons, and surrenders all of Affirmer's Copyright and Related Rights and associated claims and causes of action, whether now known or unknown (including existing as well as future claims and causes of action), in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each member of the public at large and to the detriment of Affirmer's heirs and successors, fully intending that such Waiver shall not be subject to revocation, rescission, cancellation, termination, or any other legal or equitable action to disrupt the quiet enjoyment of the Work by the public as contemplated by Affirmer's express Statement of Purpose.
+
+3. Public License Fallback. Should any part of the Waiver for any reason be judged legally invalid or ineffective under applicable law, then the Waiver shall be preserved to the maximum extent permitted taking into account Affirmer's express Statement of Purpose. In addition, to the extent the Waiver is so judged Affirmer hereby grants to each affected person a royalty-free, non transferable, non sublicensable, non exclusive, irrevocable and unconditional license to exercise Affirmer's Copyright and Related Rights in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "License"). The License shall be deemed effective as of the date CC0 was applied by Affirmer to the Work. Should any part of the License for any reason be judged legally invalid or ineffective under applicable law, such partial invalidity or ineffectiveness shall not invalidate the remainder of the License, and in such case Affirmer hereby affirms that he or she will not (i) exercise any of his or her remaining Copyright and Related Rights in the Work or (ii) assert any associated claims and causes of action with respect to the Work, in either case contrary to Affirmer's express Statement of Purpose.
+
+4. Limitations and Disclaimers.
+
+ No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed or otherwise affected by this document.
+ Affirmer offers the Work as-is and makes no representations or warranties of any kind concerning the Work, express, implied, statutory or otherwise, including without limitation warranties of title, merchantability, fitness for a particular purpose, non infringement, or the absence of latent or other defects, accuracy, or the present or absence of errors, whether or not discoverable, all to the greatest extent permissible under applicable law.
+ Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work or any use thereof, including without limitation any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other rights required for any use of the Work.
+ Affirmer understands and acknowledges that Creative Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work.
diff --git a/ccan/list/list.h b/ccan/list/list.h
new file mode 100644
index 0000000000..ca9f9f1f7f
--- /dev/null
+++ b/ccan/list/list.h
@@ -0,0 +1,773 @@
+/* Licensed under BSD-MIT - see ccan/licenses/BSD-MIT file for details */
+#ifndef CCAN_LIST_H
+#define CCAN_LIST_H
+#include <assert.h>
+#include "ccan/str/str.h"
+#include "ccan/container_of/container_of.h"
+#include "ccan/check_type/check_type.h"
+
+/**
+ * struct list_node - an entry in a doubly-linked list
+ * @next: next entry (self if empty)
+ * @prev: previous entry (self if empty)
+ *
+ * This is used as an entry in a linked list.
+ * Example:
+ * struct child {
+ * const char *name;
+ * // Linked list of all us children.
+ * struct list_node list;
+ * };
+ */
+struct list_node
+{
+ struct list_node *next, *prev;
+};
+
+/**
+ * struct list_head - the head of a doubly-linked list
+ * @h: the list_head (containing next and prev pointers)
+ *
+ * This is used as the head of a linked list.
+ * Example:
+ * struct parent {
+ * const char *name;
+ * struct list_head children;
+ * unsigned int num_children;
+ * };
+ */
+struct list_head
+{
+ struct list_node n;
+};
+
+#define LIST_LOC __FILE__ ":" stringify(__LINE__)
+#define list_debug(h, loc) ((void)loc, h)
+#define list_debug_node(n, loc) ((void)loc, n)
+
+/**
+ * LIST_HEAD_INIT - initializer for an empty list_head
+ * @name: the name of the list.
+ *
+ * Explicit initializer for an empty list.
+ *
+ * See also:
+ * LIST_HEAD, list_head_init()
+ *
+ * Example:
+ * static struct list_head my_list = LIST_HEAD_INIT(my_list);
+ */
+#define LIST_HEAD_INIT(name) { { &name.n, &name.n } }
+
+/**
+ * LIST_HEAD - define and initialize an empty list_head
+ * @name: the name of the list.
+ *
+ * The LIST_HEAD macro defines a list_head and initializes it to an empty
+ * list. It can be prepended by "static" to define a static list_head.
+ *
+ * See also:
+ * LIST_HEAD_INIT, list_head_init()
+ *
+ * Example:
+ * static LIST_HEAD(my_global_list);
+ */
+#define LIST_HEAD(name) \
+ struct list_head name = LIST_HEAD_INIT(name)
+
+/**
+ * list_head_init - initialize a list_head
+ * @h: the list_head to set to the empty list
+ *
+ * Example:
+ * ...
+ * struct parent *parent = malloc(sizeof(*parent));
+ *
+ * list_head_init(&parent->children);
+ * parent->num_children = 0;
+ */
+static inline void list_head_init(struct list_head *h)
+{
+ h->n.next = h->n.prev = &h->n;
+}
+
+/**
+ * list_node_init - initialize a list_node
+ * @n: the list_node to link to itself.
+ *
+ * You don't need to use this normally! But it lets you list_del(@n)
+ * safely.
+ */
+static inline void list_node_init(struct list_node *n)
+{
+ n->next = n->prev = n;
+}
+
+/**
+ * list_add_after - add an entry after an existing node in a linked list
+ * @h: the list_head to add the node to (for debugging)
+ * @p: the existing list_node to add the node after
+ * @n: the new list_node to add to the list.
+ *
+ * The existing list_node must already be a member of the list.
+ * The new list_node does not need to be initialized; it will be overwritten.
+ *
+ * Example:
+ * struct child c1, c2, c3;
+ * LIST_HEAD(h);
+ *
+ * list_add_tail(&h, &c1.list);
+ * list_add_tail(&h, &c3.list);
+ * list_add_after(&h, &c1.list, &c2.list);
+ */
+#define list_add_after(h, p, n) list_add_after_(h, p, n, LIST_LOC)
+static inline void list_add_after_(struct list_head *h,
+ struct list_node *p,
+ struct list_node *n,
+ const char *abortstr)
+{
+ n->next = p->next;
+ n->prev = p;
+ p->next->prev = n;
+ p->next = n;
+ (void)list_debug(h, abortstr);
+}
+
+/**
+ * list_add - add an entry at the start of a linked list.
+ * @h: the list_head to add the node to
+ * @n: the list_node to add to the list.
+ *
+ * The list_node does not need to be initialized; it will be overwritten.
+ * Example:
+ * struct child *child = malloc(sizeof(*child));
+ *
+ * child->name = "marvin";
+ * list_add(&parent->children, &child->list);
+ * parent->num_children++;
+ */
+#define list_add(h, n) list_add_(h, n, LIST_LOC)
+static inline void list_add_(struct list_head *h,
+ struct list_node *n,
+ const char *abortstr)
+{
+ list_add_after_(h, &h->n, n, abortstr);
+}
+
+/**
+ * list_add_before - add an entry before an existing node in a linked list
+ * @h: the list_head to add the node to (for debugging)
+ * @p: the existing list_node to add the node before
+ * @n: the new list_node to add to the list.
+ *
+ * The existing list_node must already be a member of the list.
+ * The new list_node does not need to be initialized; it will be overwritten.
+ *
+ * Example:
+ * list_head_init(&h);
+ * list_add_tail(&h, &c1.list);
+ * list_add_tail(&h, &c3.list);
+ * list_add_before(&h, &c3.list, &c2.list);
+ */
+#define list_add_before(h, p, n) list_add_before_(h, p, n, LIST_LOC)
+static inline void list_add_before_(struct list_head *h,
+ struct list_node *p,
+ struct list_node *n,
+ const char *abortstr)
+{
+ n->next = p;
+ n->prev = p->prev;
+ p->prev->next = n;
+ p->prev = n;
+ (void)list_debug(h, abortstr);
+}
+
+/**
+ * list_add_tail - add an entry at the end of a linked list.
+ * @h: the list_head to add the node to
+ * @n: the list_node to add to the list.
+ *
+ * The list_node does not need to be initialized; it will be overwritten.
+ * Example:
+ * list_add_tail(&parent->children, &child->list);
+ * parent->num_children++;
+ */
+#define list_add_tail(h, n) list_add_tail_(h, n, LIST_LOC)
+static inline void list_add_tail_(struct list_head *h,
+ struct list_node *n,
+ const char *abortstr)
+{
+ list_add_before_(h, &h->n, n, abortstr);
+}
+
+/**
+ * list_empty - is a list empty?
+ * @h: the list_head
+ *
+ * If the list is empty, returns true.
+ *
+ * Example:
+ * assert(list_empty(&parent->children) == (parent->num_children == 0));
+ */
+#define list_empty(h) list_empty_(h, LIST_LOC)
+static inline int list_empty_(const struct list_head *h, const char* abortstr)
+{
+ (void)list_debug(h, abortstr);
+ return h->n.next == &h->n;
+}
+
+/**
+ * list_empty_nodebug - is a list empty (and don't perform debug checks)?
+ * @h: the list_head
+ *
+ * If the list is empty, returns true.
+ * This differs from list_empty() in that if CCAN_LIST_DEBUG is set it
+ * will NOT perform debug checks. Only use this function if you REALLY
+ * know what you're doing.
+ *
+ * Example:
+ * assert(list_empty_nodebug(&parent->children) == (parent->num_children == 0));
+ */
+#ifndef CCAN_LIST_DEBUG
+#define list_empty_nodebug(h) list_empty(h)
+#else
+static inline int list_empty_nodebug(const struct list_head *h)
+{
+ return h->n.next == &h->n;
+}
+#endif
+
+/**
+ * list_del - delete an entry from an (unknown) linked list.
+ * @n: the list_node to delete from the list.
+ *
+ * Note that this leaves @n in an undefined state; it can be added to
+ * another list, but not deleted again.
+ *
+ * See also:
+ * list_del_from(), list_del_init()
+ *
+ * Example:
+ * list_del(&child->list);
+ * parent->num_children--;
+ */
+#define list_del(n) list_del_(n, LIST_LOC)
+static inline void list_del_(struct list_node *n, const char* abortstr)
+{
+ (void)list_debug_node(n, abortstr);
+ n->next->prev = n->prev;
+ n->prev->next = n->next;
+#ifdef CCAN_LIST_DEBUG
+ /* Catch use-after-del. */
+ n->next = n->prev = NULL;
+#endif
+}
+
+/**
+ * list_del_init - delete a node, and reset it so it can be deleted again.
+ * @n: the list_node to be deleted.
+ *
+ * list_del(@n) or list_del_init() again after this will be safe,
+ * which can be useful in some cases.
+ *
+ * See also:
+ * list_del_from(), list_del()
+ *
+ * Example:
+ * list_del_init(&child->list);
+ * parent->num_children--;
+ */
+#define list_del_init(n) list_del_init_(n, LIST_LOC)
+static inline void list_del_init_(struct list_node *n, const char *abortstr)
+{
+ list_del_(n, abortstr);
+ list_node_init(n);
+}
+
+/**
+ * list_del_from - delete an entry from a known linked list.
+ * @h: the list_head the node is in.
+ * @n: the list_node to delete from the list.
+ *
+ * This explicitly indicates which list a node is expected to be in,
+ * which is better documentation and can catch more bugs.
+ *
+ * See also: list_del()
+ *
+ * Example:
+ * list_del_from(&parent->children, &child->list);
+ * parent->num_children--;
+ */
+static inline void list_del_from(struct list_head *h, struct list_node *n)
+{
+#ifdef CCAN_LIST_DEBUG
+ {
+ /* Thorough check: make sure it was in list! */
+ struct list_node *i;
+ for (i = h->n.next; i != n; i = i->next)
+ assert(i != &h->n);
+ }
+#endif /* CCAN_LIST_DEBUG */
+
+ /* Quick test that catches a surprising number of bugs. */
+ assert(!list_empty(h));
+ list_del(n);
+}
+
+/**
+ * list_swap - swap out an entry from an (unknown) linked list for a new one.
+ * @o: the list_node to replace from the list.
+ * @n: the list_node to insert in place of the old one.
+ *
+ * Note that this leaves @o in an undefined state; it can be added to
+ * another list, but not deleted/swapped again.
+ *
+ * See also:
+ * list_del()
+ *
+ * Example:
+ * struct child x1, x2;
+ * LIST_HEAD(xh);
+ *
+ * list_add(&xh, &x1.list);
+ * list_swap(&x1.list, &x2.list);
+ */
+#define list_swap(o, n) list_swap_(o, n, LIST_LOC)
+static inline void list_swap_(struct list_node *o,
+ struct list_node *n,
+ const char* abortstr)
+{
+ (void)list_debug_node(o, abortstr);
+ *n = *o;
+ n->next->prev = n;
+ n->prev->next = n;
+#ifdef CCAN_LIST_DEBUG
+ /* Catch use-after-del. */
+ o->next = o->prev = NULL;
+#endif
+}
+
+/**
+ * list_entry - convert a list_node back into the structure containing it.
+ * @n: the list_node
+ * @type: the type of the entry
+ * @member: the list_node member of the type
+ *
+ * Example:
+ * // First list entry is children.next; convert back to child.
+ * child = list_entry(parent->children.n.next, struct child, list);
+ *
+ * See Also:
+ * list_top(), list_for_each()
+ */
+#define list_entry(n, type, member) container_of(n, type, member)
+
+/**
+ * list_top - get the first entry in a list
+ * @h: the list_head
+ * @type: the type of the entry
+ * @member: the list_node member of the type
+ *
+ * If the list is empty, returns NULL.
+ *
+ * Example:
+ * struct child *first;
+ * first = list_top(&parent->children, struct child, list);
+ * if (!first)
+ * printf("Empty list!\n");
+ */
+#define list_top(h, type, member) \
+ ((type *)list_top_((h), list_off_(type, member)))
+
+static inline const void *list_top_(const struct list_head *h, size_t off)
+{
+ if (list_empty(h))
+ return NULL;
+ return (const char *)h->n.next - off;
+}
+
+/**
+ * list_pop - remove the first entry in a list
+ * @h: the list_head
+ * @type: the type of the entry
+ * @member: the list_node member of the type
+ *
+ * If the list is empty, returns NULL.
+ *
+ * Example:
+ * struct child *one;
+ * one = list_pop(&parent->children, struct child, list);
+ * if (!one)
+ * printf("Empty list!\n");
+ */
+#define list_pop(h, type, member) \
+ ((type *)list_pop_((h), list_off_(type, member)))
+
+static inline const void *list_pop_(const struct list_head *h, size_t off)
+{
+ struct list_node *n;
+
+ if (list_empty(h))
+ return NULL;
+ n = h->n.next;
+ list_del(n);
+ return (const char *)n - off;
+}
+
+/**
+ * list_tail - get the last entry in a list
+ * @h: the list_head
+ * @type: the type of the entry
+ * @member: the list_node member of the type
+ *
+ * If the list is empty, returns NULL.
+ *
+ * Example:
+ * struct child *last;
+ * last = list_tail(&parent->children, struct child, list);
+ * if (!last)
+ * printf("Empty list!\n");
+ */
+#define list_tail(h, type, member) \
+ ((type *)list_tail_((h), list_off_(type, member)))
+
+static inline const void *list_tail_(const struct list_head *h, size_t off)
+{
+ if (list_empty(h))
+ return NULL;
+ return (const char *)h->n.prev - off;
+}
+
+/**
+ * list_for_each - iterate through a list.
+ * @h: the list_head (warning: evaluated multiple times!)
+ * @i: the structure containing the list_node
+ * @member: the list_node member of the structure
+ *
+ * This is a convenient wrapper to iterate @i over the entire list. It's
+ * a for loop, so you can break and continue as normal.
+ *
+ * Example:
+ * list_for_each(&parent->children, child, list)
+ * printf("Name: %s\n", child->name);
+ */
+#define list_for_each(h, i, member) \
+ list_for_each_off(h, i, list_off_var_(i, member))
+
+/**
+ * list_for_each_rev - iterate through a list backwards.
+ * @h: the list_head
+ * @i: the structure containing the list_node
+ * @member: the list_node member of the structure
+ *
+ * This is a convenient wrapper to iterate @i over the entire list. It's
+ * a for loop, so you can break and continue as normal.
+ *
+ * Example:
+ * list_for_each_rev(&parent->children, child, list)
+ * printf("Name: %s\n", child->name);
+ */
+#define list_for_each_rev(h, i, member) \
+ list_for_each_rev_off(h, i, list_off_var_(i, member))
+
+/**
+ * list_for_each_rev_safe - iterate through a list backwards,
+ * maybe during deletion
+ * @h: the list_head
+ * @i: the structure containing the list_node
+ * @nxt: the structure containing the list_node
+ * @member: the list_node member of the structure
+ *
+ * This is a convenient wrapper to iterate @i over the entire list backwards.
+ * It's a for loop, so you can break and continue as normal. The extra
+ * variable * @nxt is used to hold the next element, so you can delete @i
+ * from the list.
+ *
+ * Example:
+ * struct child *next;
+ * list_for_each_rev_safe(&parent->children, child, next, list) {
+ * printf("Name: %s\n", child->name);
+ * }
+ */
+#define list_for_each_rev_safe(h, i, nxt, member) \
+ list_for_each_rev_safe_off(h, i, nxt, list_off_var_(i, member))
+
+/**
+ * list_for_each_safe - iterate through a list, maybe during deletion
+ * @h: the list_head
+ * @i: the structure containing the list_node
+ * @nxt: the structure containing the list_node
+ * @member: the list_node member of the structure
+ *
+ * This is a convenient wrapper to iterate @i over the entire list. It's
+ * a for loop, so you can break and continue as normal. The extra variable
+ * @nxt is used to hold the next element, so you can delete @i from the list.
+ *
+ * Example:
+ * list_for_each_safe(&parent->children, child, next, list) {
+ * list_del(&child->list);
+ * parent->num_children--;
+ * }
+ */
+#define list_for_each_safe(h, i, nxt, member) \
+ list_for_each_safe_off(h, i, nxt, list_off_var_(i, member))
+
+/**
+ * list_next - get the next entry in a list
+ * @h: the list_head
+ * @i: a pointer to an entry in the list.
+ * @member: the list_node member of the structure
+ *
+ * If @i was the last entry in the list, returns NULL.
+ *
+ * Example:
+ * struct child *second;
+ * second = list_next(&parent->children, first, list);
+ * if (!second)
+ * printf("No second child!\n");
+ */
+#define list_next(h, i, member) \
+ ((list_typeof(i))list_entry_or_null(list_debug(h, \
+ __FILE__ ":" stringify(__LINE__)), \
+ (i)->member.next, \
+ list_off_var_((i), member)))
+
+/**
+ * list_prev - get the previous entry in a list
+ * @h: the list_head
+ * @i: a pointer to an entry in the list.
+ * @member: the list_node member of the structure
+ *
+ * If @i was the first entry in the list, returns NULL.
+ *
+ * Example:
+ * first = list_prev(&parent->children, second, list);
+ * if (!first)
+ * printf("Can't go back to first child?!\n");
+ */
+#define list_prev(h, i, member) \
+ ((list_typeof(i))list_entry_or_null(list_debug(h, \
+ __FILE__ ":" stringify(__LINE__)), \
+ (i)->member.prev, \
+ list_off_var_((i), member)))
+
+/**
+ * list_append_list - empty one list onto the end of another.
+ * @to: the list to append into
+ * @from: the list to empty.
+ *
+ * This takes the entire contents of @from and moves it to the end of
+ * @to. After this @from will be empty.
+ *
+ * Example:
+ * struct list_head adopter;
+ *
+ * list_append_list(&adopter, &parent->children);
+ * assert(list_empty(&parent->children));
+ * parent->num_children = 0;
+ */
+#define list_append_list(t, f) list_append_list_(t, f, \
+ __FILE__ ":" stringify(__LINE__))
+static inline void list_append_list_(struct list_head *to,
+ struct list_head *from,
+ const char *abortstr)
+{
+ struct list_node *from_tail = list_debug(from, abortstr)->n.prev;
+ struct list_node *to_tail = list_debug(to, abortstr)->n.prev;
+
+ /* Sew in head and entire list. */
+ to->n.prev = from_tail;
+ from_tail->next = &to->n;
+ to_tail->next = &from->n;
+ from->n.prev = to_tail;
+
+ /* Now remove head. */
+ list_del(&from->n);
+ list_head_init(from);
+}
+
+/**
+ * list_prepend_list - empty one list into the start of another.
+ * @to: the list to prepend into
+ * @from: the list to empty.
+ *
+ * This takes the entire contents of @from and moves it to the start
+ * of @to. After this @from will be empty.
+ *
+ * Example:
+ * list_prepend_list(&adopter, &parent->children);
+ * assert(list_empty(&parent->children));
+ * parent->num_children = 0;
+ */
+#define list_prepend_list(t, f) list_prepend_list_(t, f, LIST_LOC)
+static inline void list_prepend_list_(struct list_head *to,
+ struct list_head *from,
+ const char *abortstr)
+{
+ struct list_node *from_tail = list_debug(from, abortstr)->n.prev;
+ struct list_node *to_head = list_debug(to, abortstr)->n.next;
+
+ /* Sew in head and entire list. */
+ to->n.next = &from->n;
+ from->n.prev = &to->n;
+ to_head->prev = from_tail;
+ from_tail->next = to_head;
+
+ /* Now remove head. */
+ list_del(&from->n);
+ list_head_init(from);
+}
+
+/* internal macros, do not use directly */
+#define list_for_each_off_dir_(h, i, off, dir) \
+ for (i = list_node_to_off_(list_debug(h, LIST_LOC)->n.dir, \
+ (off)); \
+ list_node_from_off_((void *)i, (off)) != &(h)->n; \
+ i = list_node_to_off_(list_node_from_off_((void *)i, (off))->dir, \
+ (off)))
+
+#define list_for_each_safe_off_dir_(h, i, nxt, off, dir) \
+ for (i = list_node_to_off_(list_debug(h, LIST_LOC)->n.dir, \
+ (off)), \
+ nxt = list_node_to_off_(list_node_from_off_(i, (off))->dir, \
+ (off)); \
+ list_node_from_off_(i, (off)) != &(h)->n; \
+ i = nxt, \
+ nxt = list_node_to_off_(list_node_from_off_(i, (off))->dir, \
+ (off)))
+
+/**
+ * list_for_each_off - iterate through a list of memory regions.
+ * @h: the list_head
+ * @i: the pointer to a memory region wich contains list node data.
+ * @off: offset(relative to @i) at which list node data resides.
+ *
+ * This is a low-level wrapper to iterate @i over the entire list, used to
+ * implement all oher, more high-level, for-each constructs. It's a for loop,
+ * so you can break and continue as normal.
+ *
+ * WARNING! Being the low-level macro that it is, this wrapper doesn't know
+ * nor care about the type of @i. The only assumtion made is that @i points
+ * to a chunk of memory that at some @offset, relative to @i, contains a
+ * properly filled `struct node_list' which in turn contains pointers to
+ * memory chunks and it's turtles all the way down. Whith all that in mind
+ * remember that given the wrong pointer/offset couple this macro will
+ * happilly churn all you memory untill SEGFAULT stops it, in other words
+ * caveat emptor.
+ *
+ * It is worth mentioning that one of legitimate use-cases for that wrapper
+ * is operation on opaque types with known offset for `struct list_node'
+ * member(preferably 0), because it allows you not to disclose the type of
+ * @i.
+ *
+ * Example:
+ * list_for_each_off(&parent->children, child,
+ * offsetof(struct child, list))
+ * printf("Name: %s\n", child->name);
+ */
+#define list_for_each_off(h, i, off) \
+ list_for_each_off_dir_((h),(i),(off),next)
+
+/**
+ * list_for_each_rev_off - iterate through a list of memory regions backwards
+ * @h: the list_head
+ * @i: the pointer to a memory region wich contains list node data.
+ * @off: offset(relative to @i) at which list node data resides.
+ *
+ * See list_for_each_off for details
+ */
+#define list_for_each_rev_off(h, i, off) \
+ list_for_each_off_dir_((h),(i),(off),prev)
+
+/**
+ * list_for_each_safe_off - iterate through a list of memory regions, maybe
+ * during deletion
+ * @h: the list_head
+ * @i: the pointer to a memory region wich contains list node data.
+ * @nxt: the structure containing the list_node
+ * @off: offset(relative to @i) at which list node data resides.
+ *
+ * For details see `list_for_each_off' and `list_for_each_safe'
+ * descriptions.
+ *
+ * Example:
+ * list_for_each_safe_off(&parent->children, child,
+ * next, offsetof(struct child, list))
+ * printf("Name: %s\n", child->name);
+ */
+#define list_for_each_safe_off(h, i, nxt, off) \
+ list_for_each_safe_off_dir_((h),(i),(nxt),(off),next)
+
+/**
+ * list_for_each_rev_safe_off - iterate backwards through a list of
+ * memory regions, maybe during deletion
+ * @h: the list_head
+ * @i: the pointer to a memory region wich contains list node data.
+ * @nxt: the structure containing the list_node
+ * @off: offset(relative to @i) at which list node data resides.
+ *
+ * For details see `list_for_each_rev_off' and `list_for_each_rev_safe'
+ * descriptions.
+ *
+ * Example:
+ * list_for_each_rev_safe_off(&parent->children, child,
+ * next, offsetof(struct child, list))
+ * printf("Name: %s\n", child->name);
+ */
+#define list_for_each_rev_safe_off(h, i, nxt, off) \
+ list_for_each_safe_off_dir_((h),(i),(nxt),(off),prev)
+
+/* Other -off variants. */
+#define list_entry_off(n, type, off) \
+ ((type *)list_node_from_off_((n), (off)))
+
+#define list_head_off(h, type, off) \
+ ((type *)list_head_off((h), (off)))
+
+#define list_tail_off(h, type, off) \
+ ((type *)list_tail_((h), (off)))
+
+#define list_add_off(h, n, off) \
+ list_add((h), list_node_from_off_((n), (off)))
+
+#define list_del_off(n, off) \
+ list_del(list_node_from_off_((n), (off)))
+
+#define list_del_from_off(h, n, off) \
+ list_del_from(h, list_node_from_off_((n), (off)))
+
+/* Offset helper functions so we only single-evaluate. */
+static inline void *list_node_to_off_(struct list_node *node, size_t off)
+{
+ return (void *)((char *)node - off);
+}
+static inline struct list_node *list_node_from_off_(void *ptr, size_t off)
+{
+ return (struct list_node *)((char *)ptr + off);
+}
+
+/* Get the offset of the member, but make sure it's a list_node. */
+#define list_off_(type, member) \
+ (container_off(type, member) + \
+ check_type(((type *)0)->member, struct list_node))
+
+#define list_off_var_(var, member) \
+ (container_off_var(var, member) + \
+ check_type(var->member, struct list_node))
+
+#if HAVE_TYPEOF
+#define list_typeof(var) typeof(var)
+#else
+#define list_typeof(var) void *
+#endif
+
+/* Returns member, or NULL if at end of list. */
+static inline void *list_entry_or_null(const struct list_head *h,
+ const struct list_node *n,
+ size_t off)
+{
+ if (n == &h->n)
+ return NULL;
+ return (char *)n - off;
+}
+#endif /* CCAN_LIST_H */
diff --git a/ccan/str/str.h b/ccan/str/str.h
new file mode 100644
index 0000000000..9a9da9cd3f
--- /dev/null
+++ b/ccan/str/str.h
@@ -0,0 +1,16 @@
+/* CC0 (Public domain) - see ccan/licenses/CC0 file for details */
+#ifndef CCAN_STR_H
+#define CCAN_STR_H
+/**
+ * stringify - Turn expression into a string literal
+ * @expr: any C expression
+ *
+ * Example:
+ * #define PRINT_COND_IF_FALSE(cond) \
+ * ((cond) || printf("%s is false!", stringify(cond)))
+ */
+#define stringify(expr) stringify_1(expr)
+/* Double-indirection required to stringify expansions */
+#define stringify_1(expr) #expr
+
+#endif /* CCAN_STR_H */
diff --git a/class.c b/class.c
index bf9b2bb43e..cb69ffe2b3 100644
--- a/class.c
+++ b/class.c
@@ -23,17 +23,13 @@
* \{
*/
-#include "ruby/ruby.h"
+#include "internal.h"
#include "ruby/st.h"
-#include "method.h"
#include "constant.h"
#include "vm_core.h"
-#include "internal.h"
+#include "id_table.h"
#include <ctype.h>
-int rb_vm_add_root_module(ID id, VALUE module);
-
-
#define id_attached id__attached__
void
@@ -42,7 +38,7 @@ rb_class_subclass_add(VALUE super, VALUE klass)
rb_subclass_entry_t *entry, *head;
if (super && super != Qundef) {
- entry = malloc(sizeof(*entry));
+ entry = ALLOC(rb_subclass_entry_t);
entry->klass = klass;
entry->next = NULL;
@@ -62,7 +58,7 @@ rb_module_add_to_subclasses_list(VALUE module, VALUE iclass)
{
rb_subclass_entry_t *entry, *head;
- entry = malloc(sizeof(*entry));
+ entry = ALLOC(rb_subclass_entry_t);
entry->klass = iclass;
entry->next = NULL;
@@ -88,7 +84,7 @@ rb_class_remove_from_super_subclasses(VALUE klass)
if (entry->next) {
RCLASS_EXT(entry->next->klass)->parent_subclasses = RCLASS_EXT(klass)->parent_subclasses;
}
- free(entry);
+ xfree(entry);
}
RCLASS_EXT(klass)->parent_subclasses = NULL;
@@ -107,14 +103,14 @@ rb_class_remove_from_module_subclasses(VALUE klass)
RCLASS_EXT(entry->next->klass)->module_subclasses = RCLASS_EXT(klass)->module_subclasses;
}
- free(entry);
+ xfree(entry);
}
RCLASS_EXT(klass)->module_subclasses = NULL;
}
void
-rb_class_foreach_subclass(VALUE klass, void(*f)(VALUE))
+rb_class_foreach_subclass(VALUE klass, void (*f)(VALUE, VALUE), VALUE arg)
{
rb_subclass_entry_t *cur = RCLASS_EXT(klass)->subclasses;
@@ -123,20 +119,32 @@ rb_class_foreach_subclass(VALUE klass, void(*f)(VALUE))
while (cur) {
VALUE curklass = cur->klass;
cur = cur->next;
- f(curklass);
+ f(curklass, arg);
}
}
+static void
+class_detach_subclasses(VALUE klass, VALUE arg)
+{
+ rb_class_remove_from_super_subclasses(klass);
+}
+
void
rb_class_detach_subclasses(VALUE klass)
{
- rb_class_foreach_subclass(klass, rb_class_remove_from_super_subclasses);
+ rb_class_foreach_subclass(klass, class_detach_subclasses, Qnil);
+}
+
+static void
+class_detach_module_subclasses(VALUE klass, VALUE arg)
+{
+ rb_class_remove_from_module_subclasses(klass);
}
void
rb_class_detach_module_subclasses(VALUE klass)
{
- rb_class_foreach_subclass(klass, rb_class_remove_from_module_subclasses);
+ rb_class_foreach_subclass(klass, class_detach_module_subclasses, Qnil);
}
/**
@@ -154,25 +162,31 @@ rb_class_detach_module_subclasses(VALUE klass)
static VALUE
class_alloc(VALUE flags, VALUE klass)
{
- NEWOBJ_OF(obj, struct RClass, klass, (flags & T_MASK) | (RGENGC_WB_PROTECTED_CLASS ? FL_WB_PROTECTED : 0));
- obj->ptr = ALLOC(rb_classext_t);
- RCLASS_IV_TBL(obj) = 0;
- RCLASS_CONST_TBL(obj) = 0;
- RCLASS_M_TBL_WRAPPER(obj) = 0;
- RCLASS_SET_SUPER((VALUE)obj, 0);
- RCLASS_ORIGIN(obj) = (VALUE)obj;
- RCLASS_IV_INDEX_TBL(obj) = 0;
-
- RCLASS_EXT(obj)->subclasses = NULL;
- RCLASS_EXT(obj)->parent_subclasses = NULL;
- RCLASS_EXT(obj)->module_subclasses = NULL;
+ NEWOBJ_OF(obj, struct RClass, klass, (flags & T_MASK) | FL_PROMOTED1 /* start from age == 2 */ | (RGENGC_WB_PROTECTED_CLASS ? FL_WB_PROTECTED : 0));
+ obj->ptr = ZALLOC(rb_classext_t);
+ /* ZALLOC
+ RCLASS_IV_TBL(obj) = 0;
+ RCLASS_CONST_TBL(obj) = 0;
+ RCLASS_M_TBL(obj) = 0;
+ RCLASS_IV_INDEX_TBL(obj) = 0;
+ RCLASS_SET_SUPER((VALUE)obj, 0);
+ RCLASS_EXT(obj)->subclasses = NULL;
+ RCLASS_EXT(obj)->parent_subclasses = NULL;
+ RCLASS_EXT(obj)->module_subclasses = NULL;
+ */
+ RCLASS_SET_ORIGIN((VALUE)obj, (VALUE)obj);
RCLASS_SERIAL(obj) = rb_next_class_serial();
-
RCLASS_REFINED_CLASS(obj) = Qnil;
RCLASS_EXT(obj)->allocator = 0;
+
return (VALUE)obj;
}
+static void
+RCLASS_M_TBL_INIT(VALUE c)
+{
+ RCLASS_M_TBL(c) = rb_id_table_create(0);
+}
/*!
* A utility function that wraps class_alloc.
@@ -206,8 +220,8 @@ void
rb_check_inheritable(VALUE super)
{
if (!RB_TYPE_P(super, T_CLASS)) {
- rb_raise(rb_eTypeError, "superclass must be a Class (%s given)",
- rb_obj_classname(super));
+ rb_raise(rb_eTypeError, "superclass must be a Class (%"PRIsVALUE" given)",
+ rb_obj_class(super));
}
if (RBASIC(super)->flags & FL_SINGLETON) {
rb_raise(rb_eTypeError, "can't make subclass of singleton class");
@@ -233,48 +247,29 @@ rb_class_new(VALUE super)
}
static void
-rewrite_cref_stack(NODE *node, VALUE old_klass, VALUE new_klass, NODE **new_cref_ptr)
-{
- NODE *new_node;
- while (node) {
- if (node->nd_clss == old_klass) {
- new_node = NEW_CREF(new_klass);
- RB_OBJ_WRITE(new_node, &new_node->nd_next, node->nd_next);
- *new_cref_ptr = new_node;
- return;
- }
- new_node = NEW_CREF(node->nd_clss);
- node = node->nd_next;
- *new_cref_ptr = new_node;
- new_cref_ptr = &new_node->nd_next;
- }
- *new_cref_ptr = NULL;
-}
-
-static void
-clone_method(VALUE klass, ID mid, const rb_method_entry_t *me)
-{
- VALUE newiseqval;
- if (me->def && me->def->type == VM_METHOD_TYPE_ISEQ) {
- rb_iseq_t *iseq;
- NODE *new_cref;
- newiseqval = rb_iseq_clone(me->def->body.iseq->self, klass);
- GetISeqPtr(newiseqval, iseq);
- rewrite_cref_stack(me->def->body.iseq->cref_stack, me->klass, klass, &new_cref);
- RB_OBJ_WRITE(iseq->self, &iseq->cref_stack, new_cref);
- rb_add_method(klass, mid, VM_METHOD_TYPE_ISEQ, iseq, me->flag);
- RB_GC_GUARD(newiseqval);
+clone_method(VALUE old_klass, VALUE new_klass, ID mid, const rb_method_entry_t *me)
+{
+ if (me->def->type == VM_METHOD_TYPE_ISEQ) {
+ rb_cref_t *new_cref;
+ rb_vm_rewrite_cref(me->def->body.iseq.cref, old_klass, new_klass, &new_cref);
+ rb_add_method_iseq(new_klass, mid, me->def->body.iseq.iseqptr, new_cref, METHOD_ENTRY_VISI(me));
}
else {
- rb_method_entry_set(klass, mid, me, me->flag);
+ rb_method_entry_set(new_klass, mid, me, METHOD_ENTRY_VISI(me));
}
}
-static int
-clone_method_i(st_data_t key, st_data_t value, st_data_t data)
+struct clone_method_arg {
+ VALUE new_klass;
+ VALUE old_klass;
+};
+
+static enum rb_id_table_iterator_result
+clone_method_i(ID key, VALUE value, void *data)
{
- clone_method((VALUE)data, (ID)key, (const rb_method_entry_t *)value);
- return ST_CONTINUE;
+ const struct clone_method_arg *arg = (struct clone_method_arg *)data;
+ clone_method(arg->old_klass, arg->new_klass, key, (const rb_method_entry_t *)value);
+ return ID_TABLE_CONTINUE;
}
struct clone_const_arg {
@@ -328,12 +323,18 @@ rb_mod_init_copy(VALUE clone, VALUE orig)
}
RCLASS_SET_SUPER(clone, RCLASS_SUPER(orig));
RCLASS_EXT(clone)->allocator = RCLASS_EXT(orig)->allocator;
+ if (RCLASS_IV_TBL(clone)) {
+ st_free_table(RCLASS_IV_TBL(clone));
+ RCLASS_IV_TBL(clone) = 0;
+ }
+ if (RCLASS_CONST_TBL(clone)) {
+ rb_free_const_table(RCLASS_CONST_TBL(clone));
+ RCLASS_CONST_TBL(clone) = 0;
+ }
+ RCLASS_M_TBL(clone) = 0;
if (RCLASS_IV_TBL(orig)) {
st_data_t id;
- if (RCLASS_IV_TBL(clone)) {
- st_free_table(RCLASS_IV_TBL(clone));
- }
RCLASS_IV_TBL(clone) = rb_st_copy(clone, RCLASS_IV_TBL(orig));
CONST_ID(id, "__tmp_classpath__");
st_delete(RCLASS_IV_TBL(clone), &id, 0);
@@ -344,20 +345,18 @@ rb_mod_init_copy(VALUE clone, VALUE orig)
}
if (RCLASS_CONST_TBL(orig)) {
struct clone_const_arg arg;
- if (RCLASS_CONST_TBL(clone)) {
- rb_free_const_table(RCLASS_CONST_TBL(clone));
- }
+
RCLASS_CONST_TBL(clone) = st_init_numtable();
arg.klass = clone;
arg.tbl = RCLASS_CONST_TBL(clone);
st_foreach(RCLASS_CONST_TBL(orig), clone_const_i, (st_data_t)&arg);
}
if (RCLASS_M_TBL(orig)) {
- if (RCLASS_M_TBL_WRAPPER(clone)) {
- rb_free_m_tbl_wrapper(RCLASS_M_TBL_WRAPPER(clone));
- }
+ struct clone_method_arg arg;
+ arg.old_klass = orig;
+ arg.new_klass = clone;
RCLASS_M_TBL_INIT(clone);
- st_foreach(RCLASS_M_TBL(orig), clone_method_i, (st_data_t)clone);
+ rb_id_table_foreach(RCLASS_M_TBL(orig), clone_method_i, &arg);
}
return clone;
@@ -372,7 +371,7 @@ rb_singleton_class_clone(VALUE obj)
VALUE
rb_singleton_class_clone_and_attach(VALUE obj, VALUE attach)
{
- VALUE klass = RBASIC(obj)->klass;
+ const VALUE klass = RBASIC(obj)->klass;
if (!FL_TEST(klass, FL_SINGLETON))
return klass;
@@ -403,7 +402,12 @@ rb_singleton_class_clone_and_attach(VALUE obj, VALUE attach)
rb_singleton_class_attached(clone, attach);
}
RCLASS_M_TBL_INIT(clone);
- st_foreach(RCLASS_M_TBL(klass), clone_method_i, (st_data_t)clone);
+ {
+ struct clone_method_arg arg;
+ arg.old_klass = klass;
+ arg.new_klass = clone;
+ rb_id_table_foreach(RCLASS_M_TBL(klass), clone_method_i, &arg);
+ }
rb_singleton_class_attached(RBASIC(clone)->klass, clone);
FL_SET(clone, FL_SINGLETON);
@@ -422,7 +426,7 @@ rb_singleton_class_attached(VALUE klass, VALUE obj)
if (!RCLASS_IV_TBL(klass)) {
RCLASS_IV_TBL(klass) = st_init_numtable();
}
- rb_st_insert_id_and_value(klass, RCLASS_IV_TBL(klass), id_attached, obj);
+ rb_class_ivar_set(klass, id_attached, obj);
}
}
@@ -438,6 +442,19 @@ rb_singleton_class_attached(VALUE klass, VALUE obj)
*/
#define META_CLASS_OF_CLASS_CLASS_P(k) (METACLASS_OF(k) == (k))
+static int
+rb_singleton_class_has_metaclass_p(VALUE sklass)
+{
+ return rb_attr_get(METACLASS_OF(sklass), id_attached) == sklass;
+}
+
+int
+rb_singleton_class_internal_p(VALUE sklass)
+{
+ return (RB_TYPE_P(rb_attr_get(sklass, id_attached), T_CLASS) &&
+ !rb_singleton_class_has_metaclass_p(sklass));
+}
+
/*!
* whether k has a metaclass
* @retval 1 if \a k has a metaclass
@@ -445,7 +462,7 @@ rb_singleton_class_attached(VALUE klass, VALUE obj)
*/
#define HAVE_METACLASS_P(k) \
(FL_TEST(METACLASS_OF(k), FL_SINGLETON) && \
- rb_ivar_get(METACLASS_OF(k), id_attached) == (k))
+ rb_singleton_class_has_metaclass_p(k))
/*!
* ensures \a klass belongs to its own eigenclass.
@@ -532,10 +549,11 @@ Init_class_hierarchy(void)
{
rb_cBasicObject = boot_defclass("BasicObject", 0);
rb_cObject = boot_defclass("Object", rb_cBasicObject);
+ rb_gc_register_mark_object(rb_cObject);
rb_cModule = boot_defclass("Module", rb_cObject);
rb_cClass = boot_defclass("Class", rb_cModule);
- rb_const_set(rb_cObject, rb_intern("BasicObject"), rb_cBasicObject);
+ rb_const_set(rb_cObject, rb_intern_const("BasicObject"), rb_cBasicObject);
RBASIC_SET_CLASS(rb_cClass, rb_cClass);
RBASIC_SET_CLASS(rb_cModule, rb_cClass);
RBASIC_SET_CLASS(rb_cObject, rb_cClass);
@@ -632,7 +650,8 @@ rb_define_class(const char *name, VALUE super)
if (rb_const_defined(rb_cObject, id)) {
klass = rb_const_get(rb_cObject, id);
if (!RB_TYPE_P(klass, T_CLASS)) {
- rb_raise(rb_eTypeError, "%s is not a class", name);
+ rb_raise(rb_eTypeError, "%s is not a class (%"PRIsVALUE")",
+ name, rb_obj_class(klass));
}
if (rb_class_real(RCLASS_SUPER(klass)) != super) {
rb_raise(rb_eTypeError, "superclass mismatch for class %s", name);
@@ -661,7 +680,7 @@ rb_define_class(const char *name, VALUE super)
* \return the created class
* \throw TypeError if the constant name \a name is already taken but
* the constant is not a \c Class.
- * \throw NameError if the class is already defined but the class can not
+ * \throw TypeError if the class is already defined but the class can not
* be reopened because its superclass is not \a super.
* \post top-level constant named \a name refers the returned class.
*
@@ -684,7 +703,7 @@ rb_define_class_under(VALUE outer, const char *name, VALUE super)
* \return the created class
* \throw TypeError if the constant name \a name is already taken but
* the constant is not a \c Class.
- * \throw NameError if the class is already defined but the class can not
+ * \throw TypeError if the class is already defined but the class can not
* be reopened because its superclass is not \a super.
* \post top-level constant named \a name refers the returned class.
*
@@ -699,16 +718,21 @@ rb_define_class_id_under(VALUE outer, ID id, VALUE super)
if (rb_const_defined_at(outer, id)) {
klass = rb_const_get_at(outer, id);
if (!RB_TYPE_P(klass, T_CLASS)) {
- rb_raise(rb_eTypeError, "%s is not a class", rb_id2name(id));
+ rb_raise(rb_eTypeError, "%"PRIsVALUE"::%"PRIsVALUE" is not a class"
+ " (%"PRIsVALUE")",
+ outer, rb_id2str(id), rb_obj_class(klass));
}
if (rb_class_real(RCLASS_SUPER(klass)) != super) {
- rb_name_error(id, "%s is already defined", rb_id2name(id));
+ rb_raise(rb_eTypeError, "superclass mismatch for class "
+ "%"PRIsVALUE"::%"PRIsVALUE""
+ " (%"PRIsVALUE" is given but was %"PRIsVALUE")",
+ outer, rb_id2str(id), RCLASS_SUPER(klass), super);
}
return klass;
}
if (!super) {
- rb_warn("no super class for `%s::%s', Object assumed",
- rb_class2name(outer), rb_id2name(id));
+ rb_warn("no super class for `%"PRIsVALUE"::%"PRIsVALUE"', Object assumed",
+ rb_class_path(outer), rb_id2str(id));
}
klass = rb_define_class_id(id, super);
rb_set_class_path_string(klass, outer, rb_id2str(id));
@@ -747,9 +771,11 @@ rb_define_module(const char *name)
id = rb_intern(name);
if (rb_const_defined(rb_cObject, id)) {
module = rb_const_get(rb_cObject, id);
- if (RB_TYPE_P(module, T_MODULE))
- return module;
- rb_raise(rb_eTypeError, "%s is not a module", rb_obj_classname(module));
+ if (!RB_TYPE_P(module, T_MODULE)) {
+ rb_raise(rb_eTypeError, "%s is not a module (%"PRIsVALUE")",
+ name, rb_obj_class(module));
+ }
+ return module;
}
module = rb_define_module_id(id);
rb_vm_add_root_module(id, module);
@@ -771,10 +797,12 @@ rb_define_module_id_under(VALUE outer, ID id)
if (rb_const_defined_at(outer, id)) {
module = rb_const_get_at(outer, id);
- if (RB_TYPE_P(module, T_MODULE))
- return module;
- rb_raise(rb_eTypeError, "%s::%s is not a module",
- rb_class2name(outer), rb_obj_classname(module));
+ if (!RB_TYPE_P(module, T_MODULE)) {
+ rb_raise(rb_eTypeError, "%"PRIsVALUE"::%"PRIsVALUE" is not a module"
+ " (%"PRIsVALUE")",
+ outer, rb_id2str(id), rb_obj_class(module));
+ }
+ return module;
}
module = rb_define_module_id(id);
rb_const_set(outer, id, module);
@@ -801,8 +829,8 @@ rb_include_class_new(VALUE module, VALUE super)
RCLASS_IV_TBL(klass) = RCLASS_IV_TBL(module);
RCLASS_CONST_TBL(klass) = RCLASS_CONST_TBL(module);
- RCLASS_M_TBL_WRAPPER(OBJ_WB_UNPROTECT(klass)) =
- RCLASS_M_TBL_WRAPPER(OBJ_WB_UNPROTECT(RCLASS_ORIGIN(module)));
+ RCLASS_M_TBL(OBJ_WB_UNPROTECT(klass)) =
+ RCLASS_M_TBL(OBJ_WB_UNPROTECT(RCLASS_ORIGIN(module))); /* TODO: unprotected? */
RCLASS_SET_SUPER(klass, super);
if (RB_TYPE_P(module, T_ICLASS)) {
@@ -817,39 +845,44 @@ rb_include_class_new(VALUE module, VALUE super)
return (VALUE)klass;
}
-static int include_modules_at(const VALUE klass, VALUE c, VALUE module);
+static int include_modules_at(const VALUE klass, VALUE c, VALUE module, int search_super);
+
+static void
+ensure_includable(VALUE klass, VALUE module)
+{
+ rb_frozen_class_p(klass);
+ Check_Type(module, T_MODULE);
+ if (!NIL_P(rb_refinement_module_get_refined_class(module))) {
+ rb_raise(rb_eArgError, "refinement module is not allowed");
+ }
+ OBJ_INFECT(klass, module);
+}
void
rb_include_module(VALUE klass, VALUE module)
{
int changed = 0;
- rb_frozen_class_p(klass);
-
- if (!RB_TYPE_P(module, T_MODULE)) {
- Check_Type(module, T_MODULE);
- }
+ ensure_includable(klass, module);
- OBJ_INFECT(klass, module);
-
- changed = include_modules_at(klass, RCLASS_ORIGIN(klass), module);
+ changed = include_modules_at(klass, RCLASS_ORIGIN(klass), module, TRUE);
if (changed < 0)
rb_raise(rb_eArgError, "cyclic include detected");
}
-static int
-add_refined_method_entry_i(st_data_t key, st_data_t value, st_data_t data)
+static enum rb_id_table_iterator_result
+add_refined_method_entry_i(ID key, VALUE value, void *data)
{
- rb_add_refined_method_entry((VALUE) data, (ID) key);
- return ST_CONTINUE;
+ rb_add_refined_method_entry((VALUE)data, key);
+ return ID_TABLE_CONTINUE;
}
static int
-include_modules_at(const VALUE klass, VALUE c, VALUE module)
+include_modules_at(const VALUE klass, VALUE c, VALUE module, int search_super)
{
VALUE p, iclass;
int method_changed = 0, constant_changed = 0;
- const st_table *const klass_m_tbl = RCLASS_M_TBL(RCLASS_ORIGIN(klass));
+ struct rb_id_table *const klass_m_tbl = RCLASS_M_TBL(RCLASS_ORIGIN(klass));
while (module) {
int superclass_seen = FALSE;
@@ -860,41 +893,38 @@ include_modules_at(const VALUE klass, VALUE c, VALUE module)
return -1;
/* ignore if the module included already in superclasses */
for (p = RCLASS_SUPER(klass); p; p = RCLASS_SUPER(p)) {
- switch (BUILTIN_TYPE(p)) {
- case T_ICLASS:
- if (RCLASS_M_TBL_WRAPPER(p) == RCLASS_M_TBL_WRAPPER(module)) {
+ int type = BUILTIN_TYPE(p);
+ if (type == T_ICLASS) {
+ if (RCLASS_M_TBL(p) == RCLASS_M_TBL(module)) {
if (!superclass_seen) {
c = p; /* move insertion point */
}
goto skip;
}
- break;
- case T_CLASS:
+ }
+ else if (type == T_CLASS) {
+ if (!search_super) break;
superclass_seen = TRUE;
- break;
}
}
iclass = rb_include_class_new(module, RCLASS_SUPER(c));
c = RCLASS_SET_SUPER(c, iclass);
- if (BUILTIN_TYPE(module) == T_ICLASS) {
- rb_module_add_to_subclasses_list(RBASIC(module)->klass, iclass);
- } else {
- rb_module_add_to_subclasses_list(module, iclass);
+ {
+ VALUE m = module;
+ if (BUILTIN_TYPE(m) == T_ICLASS) m = RBASIC(m)->klass;
+ rb_module_add_to_subclasses_list(m, iclass);
}
if (FL_TEST(klass, RMODULE_IS_REFINEMENT)) {
VALUE refined_class =
rb_refinement_module_get_refined_class(klass);
- st_foreach(RMODULE_M_TBL(module), add_refined_method_entry_i,
- (st_data_t) refined_class);
+ rb_id_table_foreach(RMODULE_M_TBL(module), add_refined_method_entry_i, (void *)refined_class);
FL_SET(c, RMODULE_INCLUDED_INTO_REFINEMENT);
}
- if (RMODULE_M_TBL(module) && RMODULE_M_TBL(module)->num_entries)
- method_changed = 1;
- if (RMODULE_CONST_TBL(module) && RMODULE_CONST_TBL(module)->num_entries)
- constant_changed = 1;
+ if (RMODULE_M_TBL(module) && rb_id_table_size(RMODULE_M_TBL(module))) method_changed = 1;
+ if (RMODULE_CONST_TBL(module) && RMODULE_CONST_TBL(module)->num_entries) constant_changed = 1;
skip:
module = RCLASS_SUPER(module);
}
@@ -905,59 +935,53 @@ include_modules_at(const VALUE klass, VALUE c, VALUE module)
return method_changed;
}
-static int
-move_refined_method(st_data_t key, st_data_t value, st_data_t data)
+static enum rb_id_table_iterator_result
+move_refined_method(ID key, VALUE value, void *data)
{
rb_method_entry_t *me = (rb_method_entry_t *) value;
- st_table *tbl = (st_table *) data;
+ VALUE klass = (VALUE)data;
+ struct rb_id_table *tbl = RCLASS_M_TBL(klass);
if (me->def->type == VM_METHOD_TYPE_REFINED) {
- if (me->def->body.orig_me) {
- rb_method_entry_t *orig_me = me->def->body.orig_me, *new_me;
- me->def->body.orig_me = NULL;
- new_me = ALLOC(rb_method_entry_t);
- *new_me = *me;
- st_add_direct(tbl, key, (st_data_t) new_me);
- *me = *orig_me;
- xfree(orig_me);
- return ST_CONTINUE;
+ if (me->def->body.refined.orig_me) {
+ const rb_method_entry_t *orig_me = me->def->body.refined.orig_me, *new_me;
+ RB_OBJ_WRITE(me, &me->def->body.refined.orig_me, NULL);
+ new_me = rb_method_entry_clone(me);
+ rb_id_table_insert(tbl, key, (VALUE)new_me);
+ RB_OBJ_WRITTEN(klass, Qundef, new_me);
+ rb_method_entry_copy(me, orig_me);
+ return ID_TABLE_CONTINUE;
}
else {
- st_add_direct(tbl, key, (st_data_t) me);
- return ST_DELETE;
+ rb_id_table_insert(tbl, key, (VALUE)me);
+ return ID_TABLE_DELETE;
}
}
else {
- return ST_CONTINUE;
+ return ID_TABLE_CONTINUE;
}
}
void
rb_prepend_module(VALUE klass, VALUE module)
{
- void rb_vm_check_redefinition_by_prepend(VALUE klass);
VALUE origin;
int changed = 0;
- rb_frozen_class_p(klass);
-
- Check_Type(module, T_MODULE);
-
- OBJ_INFECT(klass, module);
+ ensure_includable(klass, module);
origin = RCLASS_ORIGIN(klass);
if (origin == klass) {
origin = class_alloc(T_ICLASS, klass);
- OBJ_WB_UNPROTECT(origin); /* TODO: conservertive shading. Need more survery. */
+ OBJ_WB_UNPROTECT(origin); /* TODO: conservative shading. Need more survey. */
RCLASS_SET_SUPER(origin, RCLASS_SUPER(klass));
RCLASS_SET_SUPER(klass, origin);
- RCLASS_ORIGIN(klass) = origin;
- RCLASS_M_TBL_WRAPPER(origin) = RCLASS_M_TBL_WRAPPER(klass);
+ RCLASS_SET_ORIGIN(klass, origin);
+ RCLASS_M_TBL(origin) = RCLASS_M_TBL(klass);
RCLASS_M_TBL_INIT(klass);
- st_foreach(RCLASS_M_TBL(origin), move_refined_method,
- (st_data_t) RCLASS_M_TBL(klass));
+ rb_id_table_foreach(RCLASS_M_TBL(origin), move_refined_method, (void *)klass);
}
- changed = include_modules_at(klass, klass, module);
+ changed = include_modules_at(klass, klass, module, FALSE);
if (changed < 0)
rb_raise(rb_eArgError, "cyclic prepend detected");
if (changed) {
@@ -1036,16 +1060,18 @@ rb_mod_include_p(VALUE mod, VALUE mod2)
* call-seq:
* mod.ancestors -> array
*
- * Returns a list of modules included in <i>mod</i> (including
- * <i>mod</i> itself).
+ * Returns a list of modules included/prepended in <i>mod</i>
+ * (including <i>mod</i> itself).
*
* module Mod
* include Math
* include Comparable
+ * prepend Enumerable
* end
*
- * Mod.ancestors #=> [Mod, Comparable, Math]
- * Math.ancestors #=> [Math]
+ * Mod.ancestors #=> [Enumerable, Mod, Comparable, Math]
+ * Math.ancestors #=> [Math]
+ * Enumerable.ancestors #=> [Enumerable]
*/
VALUE
@@ -1064,83 +1090,84 @@ rb_mod_ancestors(VALUE mod)
return ary;
}
-#define VISI(x) ((x)&NOEX_MASK)
-#define VISI_CHECK(x,f) (VISI(x) == (f))
-
static int
-ins_methods_push(ID name, long type, VALUE ary, long visi)
+ins_methods_push(ID name, rb_method_visibility_t visi, VALUE ary, rb_method_visibility_t expected_visi)
{
- if (type == -1) return ST_CONTINUE;
+ if (visi == METHOD_VISI_UNDEF) return ST_CONTINUE;
- switch (visi) {
- case NOEX_PRIVATE:
- case NOEX_PROTECTED:
- case NOEX_PUBLIC:
- visi = (type == visi);
+ switch (expected_visi) {
+ case METHOD_VISI_UNDEF:
+ if (visi != METHOD_VISI_PRIVATE) rb_ary_push(ary, ID2SYM(name));
break;
- default:
- visi = (type != NOEX_PRIVATE);
+ case METHOD_VISI_PRIVATE:
+ case METHOD_VISI_PROTECTED:
+ case METHOD_VISI_PUBLIC:
+ if (visi == expected_visi) rb_ary_push(ary, ID2SYM(name));
break;
}
- if (visi) {
- rb_ary_push(ary, ID2SYM(name));
- }
return ST_CONTINUE;
}
static int
ins_methods_i(st_data_t name, st_data_t type, st_data_t ary)
{
- return ins_methods_push((ID)name, (long)type, (VALUE)ary, -1); /* everything but private */
+ return ins_methods_push((ID)name, (rb_method_visibility_t)type, (VALUE)ary, METHOD_VISI_UNDEF); /* everything but private */
}
static int
ins_methods_prot_i(st_data_t name, st_data_t type, st_data_t ary)
{
- return ins_methods_push((ID)name, (long)type, (VALUE)ary, NOEX_PROTECTED);
+ return ins_methods_push((ID)name, (rb_method_visibility_t)type, (VALUE)ary, METHOD_VISI_PROTECTED);
}
static int
ins_methods_priv_i(st_data_t name, st_data_t type, st_data_t ary)
{
- return ins_methods_push((ID)name, (long)type, (VALUE)ary, NOEX_PRIVATE);
+ return ins_methods_push((ID)name, (rb_method_visibility_t)type, (VALUE)ary, METHOD_VISI_PRIVATE);
}
static int
ins_methods_pub_i(st_data_t name, st_data_t type, st_data_t ary)
{
- return ins_methods_push((ID)name, (long)type, (VALUE)ary, NOEX_PUBLIC);
+ return ins_methods_push((ID)name, (rb_method_visibility_t)type, (VALUE)ary, METHOD_VISI_PUBLIC);
}
-static int
-method_entry_i(st_data_t key, st_data_t value, st_data_t data)
+struct method_entry_arg {
+ st_table *list;
+ int recur;
+};
+
+static enum rb_id_table_iterator_result
+method_entry_i(ID key, VALUE value, void *data)
{
const rb_method_entry_t *me = (const rb_method_entry_t *)value;
- st_table *list = (st_table *)data;
- long type;
+ struct method_entry_arg *arg = (struct method_entry_arg *)data;
+ rb_method_visibility_t type;
- if (me && me->def->type == VM_METHOD_TYPE_REFINED) {
- me = rb_resolve_refined_method(Qnil, me, NULL);
- if (!me) return ST_CONTINUE;
+ if (me->def->type == VM_METHOD_TYPE_REFINED) {
+ VALUE owner = me->owner;
+ me = rb_resolve_refined_method(Qnil, me);
+ if (!me) return ID_TABLE_CONTINUE;
+ if (!arg->recur && me->owner != owner) return ID_TABLE_CONTINUE;
}
- if (!st_lookup(list, key, 0)) {
+ if (!st_lookup(arg->list, key, 0)) {
if (UNDEFINED_METHOD_ENTRY_P(me)) {
- type = -1; /* none */
+ type = METHOD_VISI_UNDEF; /* none */
}
else {
- type = VISI(me->flag);
+ type = METHOD_ENTRY_VISI(me);
}
- st_add_direct(list, key, type);
+ st_add_direct(arg->list, key, (st_data_t)type);
}
- return ST_CONTINUE;
+ return ID_TABLE_CONTINUE;
}
static VALUE
-class_instance_method_list(int argc, VALUE *argv, VALUE mod, int obj, int (*func) (st_data_t, st_data_t, st_data_t))
+class_instance_method_list(int argc, const VALUE *argv, VALUE mod, int obj, int (*func) (st_data_t, st_data_t, st_data_t))
{
VALUE ary;
int recur, prepended = 0;
- st_table *list;
+ struct method_entry_arg me_arg;
if (argc == 0) {
recur = TRUE;
@@ -1156,16 +1183,17 @@ class_instance_method_list(int argc, VALUE *argv, VALUE mod, int obj, int (*func
prepended = 1;
}
- list = st_init_numtable();
+ me_arg.list = st_init_numtable();
+ me_arg.recur = recur;
for (; mod; mod = RCLASS_SUPER(mod)) {
- if (RCLASS_M_TBL(mod)) st_foreach(RCLASS_M_TBL(mod), method_entry_i, (st_data_t)list);
+ if (RCLASS_M_TBL(mod)) rb_id_table_foreach(RCLASS_M_TBL(mod), method_entry_i, &me_arg);
if (BUILTIN_TYPE(mod) == T_ICLASS && !prepended) continue;
if (obj && FL_TEST(mod, FL_SINGLETON)) continue;
if (!recur) break;
}
ary = rb_ary_new();
- st_foreach(list, func, ary);
- st_free_table(list);
+ st_foreach(me_arg.list, func, ary);
+ st_free_table(me_arg.list);
return ary;
}
@@ -1176,29 +1204,29 @@ class_instance_method_list(int argc, VALUE *argv, VALUE mod, int obj, int (*func
*
* Returns an array containing the names of the public and protected instance
* methods in the receiver. For a module, these are the public and protected methods;
- * for a class, they are the instance (not singleton) methods. With no
- * argument, or with an argument that is <code>false</code>, the
- * instance methods in <i>mod</i> are returned, otherwise the methods
- * in <i>mod</i> and <i>mod</i>'s superclasses are returned.
+ * for a class, they are the instance (not singleton) methods. If the optional
+ * parameter is <code>false</code>, the methods of any ancestors are not included.
*
* module A
* def method1() end
* end
* class B
+ * include A
* def method2() end
* end
* class C < B
* def method3() end
* end
*
- * A.instance_methods #=> [:method1]
- * B.instance_methods(false) #=> [:method2]
- * C.instance_methods(false) #=> [:method3]
- * C.instance_methods(true).length #=> 43
+ * A.instance_methods(false) #=> [:method1]
+ * B.instance_methods(false) #=> [:method2]
+ * B.instance_methods(true).include?(:method1) #=> true
+ * C.instance_methods(false) #=> [:method3]
+ * C.instance_methods.include?(:method2) #=> true
*/
VALUE
-rb_class_instance_methods(int argc, VALUE *argv, VALUE mod)
+rb_class_instance_methods(int argc, const VALUE *argv, VALUE mod)
{
return class_instance_method_list(argc, argv, mod, 0, ins_methods_i);
}
@@ -1208,12 +1236,12 @@ rb_class_instance_methods(int argc, VALUE *argv, VALUE mod)
* mod.protected_instance_methods(include_super=true) -> array
*
* Returns a list of the protected instance methods defined in
- * <i>mod</i>. If the optional parameter is not <code>false</code>, the
- * methods of any ancestors are included.
+ * <i>mod</i>. If the optional parameter is <code>false</code>, the
+ * methods of any ancestors are not included.
*/
VALUE
-rb_class_protected_instance_methods(int argc, VALUE *argv, VALUE mod)
+rb_class_protected_instance_methods(int argc, const VALUE *argv, VALUE mod)
{
return class_instance_method_list(argc, argv, mod, 0, ins_methods_prot_i);
}
@@ -1223,8 +1251,8 @@ rb_class_protected_instance_methods(int argc, VALUE *argv, VALUE mod)
* mod.private_instance_methods(include_super=true) -> array
*
* Returns a list of the private instance methods defined in
- * <i>mod</i>. If the optional parameter is not <code>false</code>, the
- * methods of any ancestors are included.
+ * <i>mod</i>. If the optional parameter is <code>false</code>, the
+ * methods of any ancestors are not included.
*
* module Mod
* def method1() end
@@ -1236,7 +1264,7 @@ rb_class_protected_instance_methods(int argc, VALUE *argv, VALUE mod)
*/
VALUE
-rb_class_private_instance_methods(int argc, VALUE *argv, VALUE mod)
+rb_class_private_instance_methods(int argc, const VALUE *argv, VALUE mod)
{
return class_instance_method_list(argc, argv, mod, 0, ins_methods_priv_i);
}
@@ -1246,12 +1274,12 @@ rb_class_private_instance_methods(int argc, VALUE *argv, VALUE mod)
* mod.public_instance_methods(include_super=true) -> array
*
* Returns a list of the public instance methods defined in <i>mod</i>.
- * If the optional parameter is not <code>false</code>, the methods of
- * any ancestors are included.
+ * If the optional parameter is <code>false</code>, the methods of
+ * any ancestors are not included.
*/
VALUE
-rb_class_public_instance_methods(int argc, VALUE *argv, VALUE mod)
+rb_class_public_instance_methods(int argc, const VALUE *argv, VALUE mod)
{
return class_instance_method_list(argc, argv, mod, 0, ins_methods_pub_i);
}
@@ -1263,8 +1291,8 @@ rb_class_public_instance_methods(int argc, VALUE *argv, VALUE mod)
* Returns a list of the names of public and protected methods of
* <i>obj</i>. This will include all the methods accessible in
* <i>obj</i>'s ancestors.
- * If the <i>regular</i> parameter is set to <code>false</code>,
- * Returns an array of obj's public and protected singleton methods,
+ * If the optional parameter is <code>false</code>, it
+ * returns an array of <i>obj<i>'s public and protected singleton methods,
* the array will not include methods in modules included in <i>obj</i>.
*
* class Klass
@@ -1275,7 +1303,7 @@ rb_class_public_instance_methods(int argc, VALUE *argv, VALUE mod)
* k.methods[0..9] #=> [:klass_method, :nil?, :===,
* # :==~, :!, :eql?
* # :hash, :<=>, :class, :singleton_class]
- * k.methods.length #=> 57
+ * k.methods.length #=> 56
*
* k.methods(false) #=> []
* def k.singleton_method; end
@@ -1287,22 +1315,13 @@ rb_class_public_instance_methods(int argc, VALUE *argv, VALUE mod)
*/
VALUE
-rb_obj_methods(int argc, VALUE *argv, VALUE obj)
+rb_obj_methods(int argc, const VALUE *argv, VALUE obj)
{
- retry:
- if (argc == 0) {
- return class_instance_method_list(argc, argv, CLASS_OF(obj), 1, ins_methods_i);
- }
- else {
- VALUE recur;
-
- rb_scan_args(argc, argv, "1", &recur);
- if (RTEST(recur)) {
- argc = 0;
- goto retry;
- }
+ rb_check_arity(argc, 0, 1);
+ if (argc > 0 && !RTEST(argv[0])) {
return rb_obj_singleton_methods(argc, argv, obj);
}
+ return class_instance_method_list(argc, argv, CLASS_OF(obj), 1, ins_methods_i);
}
/*
@@ -1315,7 +1334,7 @@ rb_obj_methods(int argc, VALUE *argv, VALUE obj)
*/
VALUE
-rb_obj_protected_methods(int argc, VALUE *argv, VALUE obj)
+rb_obj_protected_methods(int argc, const VALUE *argv, VALUE obj)
{
return class_instance_method_list(argc, argv, CLASS_OF(obj), 1, ins_methods_prot_i);
}
@@ -1330,7 +1349,7 @@ rb_obj_protected_methods(int argc, VALUE *argv, VALUE obj)
*/
VALUE
-rb_obj_private_methods(int argc, VALUE *argv, VALUE obj)
+rb_obj_private_methods(int argc, const VALUE *argv, VALUE obj)
{
return class_instance_method_list(argc, argv, CLASS_OF(obj), 1, ins_methods_priv_i);
}
@@ -1345,7 +1364,7 @@ rb_obj_private_methods(int argc, VALUE *argv, VALUE obj)
*/
VALUE
-rb_obj_public_methods(int argc, VALUE *argv, VALUE obj)
+rb_obj_public_methods(int argc, const VALUE *argv, VALUE obj)
{
return class_instance_method_list(argc, argv, CLASS_OF(obj), 1, ins_methods_pub_i);
}
@@ -1384,10 +1403,11 @@ rb_obj_public_methods(int argc, VALUE *argv, VALUE obj)
*/
VALUE
-rb_obj_singleton_methods(int argc, VALUE *argv, VALUE obj)
+rb_obj_singleton_methods(int argc, const VALUE *argv, VALUE obj)
{
VALUE recur, ary, klass, origin;
- st_table *list, *mtbl;
+ struct method_entry_arg me_arg;
+ struct rb_id_table *mtbl;
if (argc == 0) {
recur = Qtrue;
@@ -1397,22 +1417,21 @@ rb_obj_singleton_methods(int argc, VALUE *argv, VALUE obj)
}
klass = CLASS_OF(obj);
origin = RCLASS_ORIGIN(klass);
- list = st_init_numtable();
+ me_arg.list = st_init_numtable();
+ me_arg.recur = RTEST(recur);
if (klass && FL_TEST(klass, FL_SINGLETON)) {
- if ((mtbl = RCLASS_M_TBL(origin)) != 0)
- st_foreach(mtbl, method_entry_i, (st_data_t)list);
+ if ((mtbl = RCLASS_M_TBL(origin)) != 0) rb_id_table_foreach(mtbl, method_entry_i, &me_arg);
klass = RCLASS_SUPER(klass);
}
if (RTEST(recur)) {
while (klass && (FL_TEST(klass, FL_SINGLETON) || RB_TYPE_P(klass, T_ICLASS))) {
- if (klass != origin && (mtbl = RCLASS_M_TBL(klass)) != 0)
- st_foreach(mtbl, method_entry_i, (st_data_t)list);
+ if (klass != origin && (mtbl = RCLASS_M_TBL(klass)) != 0) rb_id_table_foreach(mtbl, method_entry_i, &me_arg);
klass = RCLASS_SUPER(klass);
}
}
ary = rb_ary_new();
- st_foreach(list, ins_methods_i, ary);
- st_free_table(list);
+ st_foreach(me_arg.list, ins_methods_i, ary);
+ st_free_table(me_arg.list);
return ary;
}
@@ -1477,31 +1496,31 @@ rb_obj_singleton_methods(int argc, VALUE *argv, VALUE obj)
void
rb_define_method_id(VALUE klass, ID mid, VALUE (*func)(ANYARGS), int argc)
{
- rb_add_method_cfunc(klass, mid, func, argc, NOEX_PUBLIC);
+ rb_add_method_cfunc(klass, mid, func, argc, METHOD_VISI_PUBLIC);
}
void
rb_define_method(VALUE klass, const char *name, VALUE (*func)(ANYARGS), int argc)
{
- rb_add_method_cfunc(klass, rb_intern(name), func, argc, NOEX_PUBLIC);
+ rb_add_method_cfunc(klass, rb_intern(name), func, argc, METHOD_VISI_PUBLIC);
}
void
rb_define_protected_method(VALUE klass, const char *name, VALUE (*func)(ANYARGS), int argc)
{
- rb_add_method_cfunc(klass, rb_intern(name), func, argc, NOEX_PROTECTED);
+ rb_add_method_cfunc(klass, rb_intern(name), func, argc, METHOD_VISI_PROTECTED);
}
void
rb_define_private_method(VALUE klass, const char *name, VALUE (*func)(ANYARGS), int argc)
{
- rb_add_method_cfunc(klass, rb_intern(name), func, argc, NOEX_PRIVATE);
+ rb_add_method_cfunc(klass, rb_intern(name), func, argc, METHOD_VISI_PRIVATE);
}
void
rb_undef_method(VALUE klass, const char *name)
{
- rb_add_method(klass, rb_intern(name), VM_METHOD_TYPE_UNDEF, 0, NOEX_UNDEF);
+ rb_add_method(klass, rb_intern(name), VM_METHOD_TYPE_UNDEF, 0, METHOD_VISI_UNDEF);
}
/*!
@@ -1547,7 +1566,8 @@ singleton_class_of(VALUE obj)
{
VALUE klass;
- if (FIXNUM_P(obj) || FLONUM_P(obj) || SYMBOL_P(obj)) {
+ if (FIXNUM_P(obj) || FLONUM_P(obj) || STATIC_SYM_P(obj)) {
+ no_singleton:
rb_raise(rb_eTypeError, "can't define singleton");
}
if (SPECIAL_CONST_P(obj)) {
@@ -1557,18 +1577,19 @@ singleton_class_of(VALUE obj)
return klass;
}
else {
- enum ruby_value_type type = BUILTIN_TYPE(obj);
- if (type == T_FLOAT || type == T_BIGNUM) {
- rb_raise(rb_eTypeError, "can't define singleton");
+ switch (BUILTIN_TYPE(obj)) {
+ case T_FLOAT: case T_BIGNUM: case T_SYMBOL:
+ goto no_singleton;
+ case T_STRING:
+ if (FL_TEST_RAW(obj, RSTRING_FSTR)) goto no_singleton;
+ break;
}
}
- if (FL_TEST(RBASIC(obj)->klass, FL_SINGLETON) &&
- rb_ivar_get(RBASIC(obj)->klass, id_attached) == obj) {
- klass = RBASIC(obj)->klass;
- }
- else {
- klass = rb_make_metaclass(obj, RBASIC(obj)->klass);
+ klass = RBASIC(obj)->klass;
+ if (!(FL_TEST(klass, FL_SINGLETON) &&
+ rb_ivar_get(klass, id_attached) == obj)) {
+ klass = rb_make_metaclass(obj, klass);
}
if (OBJ_TAINTED(obj)) {
@@ -1577,11 +1598,24 @@ singleton_class_of(VALUE obj)
else {
FL_UNSET(klass, FL_TAINT);
}
- if (OBJ_FROZEN(obj)) OBJ_FREEZE(klass);
+ if (OBJ_FROZEN(obj)) OBJ_FREEZE_RAW(klass);
return klass;
}
+void
+rb_freeze_singleton_class(VALUE x)
+{
+ /* should not propagate to meta-meta-class, and so on */
+ if (!(RBASIC(x)->flags & FL_SINGLETON)) {
+ VALUE klass = RBASIC_CLASS(x);
+ if (klass && (klass = RCLASS_ORIGIN(klass)) != 0 &&
+ FL_TEST(klass, (FL_SINGLETON|FL_FREEZE)) == FL_SINGLETON) {
+ OBJ_FREEZE_RAW(klass);
+ }
+ }
+}
+
/*!
* Returns the singleton class of \a obj, or nil if obj is not a
* singleton object.
@@ -1711,7 +1745,7 @@ rb_define_attr(VALUE klass, const char *name, int read, int write)
int
rb_obj_basic_to_s_p(VALUE obj)
{
- const rb_method_entry_t *me = rb_method_entry(CLASS_OF(obj), rb_intern("to_s"), 0);
+ const rb_method_entry_t *me = rb_method_entry(CLASS_OF(obj), rb_intern("to_s"));
if (me && me->def && me->def->type == VM_METHOD_TYPE_CFUNC &&
me->def->body.cfunc.func == rb_any_to_s)
return 1;
@@ -1853,11 +1887,12 @@ rb_scan_args(int argc, const VALUE *argv, const char *fmt, ...)
return argc;
}
-NORETURN(static void keyword_error(const char *error, VALUE keys));
-static void
-keyword_error(const char *error, VALUE keys)
+VALUE
+rb_keyword_error_new(const char *error, VALUE keys)
{
const char *msg = "";
+ VALUE error_message;
+
if (RARRAY_LEN(keys) == 1) {
keys = RARRAY_AREF(keys, 0);
}
@@ -1865,21 +1900,33 @@ keyword_error(const char *error, VALUE keys)
keys = rb_ary_join(keys, rb_usascii_str_new2(", "));
msg = "s";
}
- rb_raise(rb_eArgError, "%s keyword%s: %"PRIsVALUE, error, msg, keys);
+
+ error_message = rb_sprintf("%s keyword%s: %"PRIsVALUE, error, msg, keys);
+
+ return rb_exc_new_str(rb_eArgError, error_message);
+}
+
+NORETURN(static void rb_keyword_error(const char *error, VALUE keys));
+static void
+rb_keyword_error(const char *error, VALUE keys)
+{
+ rb_exc_raise(rb_keyword_error_new(error, keys));
}
NORETURN(static void unknown_keyword_error(VALUE hash, const ID *table, int keywords));
static void
unknown_keyword_error(VALUE hash, const ID *table, int keywords)
{
+ st_table *tbl = rb_hash_tbl_raw(hash);
VALUE keys;
int i;
for (i = 0; i < keywords; i++) {
- rb_hash_delete(hash, ID2SYM(table[i]));
+ st_data_t key = ID2SYM(table[i]);
+ st_delete(tbl, &key, NULL);
}
- keys = rb_funcall(hash, rb_intern("keys"), 0, 0);
+ keys = rb_funcallv(hash, rb_intern("keys"), 0, 0);
if (!RB_TYPE_P(keys, T_ARRAY)) rb_raise(rb_eArgError, "unknown keyword");
- keyword_error("unknown", keys);
+ rb_keyword_error("unknown", keys);
}
static int
@@ -1905,6 +1952,9 @@ rb_extract_keywords(VALUE *orighash)
}
st_foreach(rb_hash_tbl_raw(hash), separate_symbol, (st_data_t)&parthash);
*orighash = parthash[1];
+ if (parthash[1] && RBASIC_CLASS(hash) != rb_cHash) {
+ RBASIC_SET_CLASS(parthash[1], RBASIC_CLASS(hash));
+ }
return parthash[0];
}
@@ -1921,6 +1971,8 @@ rb_get_kwargs(VALUE keyword_hash, const ID *table, int required, int optional, V
st_delete(rb_hash_tbl_raw(keyword_hash), &key, (val)) : \
st_lookup(rb_hash_tbl_raw(keyword_hash), key, (val)))
+ if (NIL_P(keyword_hash)) keyword_hash = 0;
+
if (optional < 0) {
rest = 1;
optional = -1-optional;
@@ -1944,7 +1996,7 @@ rb_get_kwargs(VALUE keyword_hash, const ID *table, int required, int optional, V
rb_ary_push(missing, keyword);
}
if (!NIL_P(missing)) {
- keyword_error("missing", missing);
+ rb_keyword_error("missing", missing);
}
}
j = i;
@@ -1958,7 +2010,7 @@ rb_get_kwargs(VALUE keyword_hash, const ID *table, int required, int optional, V
}
}
if (!rest && keyword_hash) {
- if (RHASH_SIZE(keyword_hash) > (unsigned int)j) {
+ if (RHASH_SIZE(keyword_hash) > (unsigned int)(values ? 0 : j)) {
unknown_keyword_error(keyword_hash, table, required+optional);
}
}
@@ -1966,6 +2018,12 @@ rb_get_kwargs(VALUE keyword_hash, const ID *table, int required, int optional, V
#undef extract_kwarg
}
+int
+rb_class_has_methods(VALUE c)
+{
+ return rb_id_table_size(RCLASS_M_TBL(c)) == 0 ? FALSE : TRUE;
+}
+
/*!
* \}
*/
diff --git a/common.mk b/common.mk
index 0c8b7fc54a..da4608bc61 100644
--- a/common.mk
+++ b/common.mk
@@ -8,32 +8,47 @@ dll: $(LIBRUBY_SO)
V = 0
Q1 = $(V:1=)
Q = $(Q1:0=@)
-ECHO = $(ECHO1:0=@echo)
+ECHO0 = $(ECHO1:0=echo)
+ECHO = @$(ECHO0)
+
+UNICODE_VERSION = 8.0.0
RUBYLIB = $(PATH_SEPARATOR)
RUBYOPT = -
RUN_OPTS = --disable-gems
-SPEC_GIT_BASE = git://github.com/nurse
+GEM_HOME =
+GEM_PATH =
+GEM_VENDOR =
+
+SPEC_GIT_BASE = git://github.com/ruby
MSPEC_GIT_URL = $(SPEC_GIT_BASE)/mspec.git
RUBYSPEC_GIT_URL = $(SPEC_GIT_BASE)/rubyspec.git
+SIMPLECOV_GIT_URL = git://github.com/colszowka/simplecov.git
+SIMPLECOV_GIT_REF = v0.10.0
+SIMPLECOV_HTML_GIT_URL = git://github.com/colszowka/simplecov-html.git
+SIMPLECOV_HTML_GIT_REF = v0.10.0
+DOCLIE_GIT_URL = git://github.com/ms-ati/docile.git
+DOCLIE_GIT_REF = v1.1.5
+
STATIC_RUBY = static-ruby
EXTCONF = extconf.rb
LIBRUBY_EXTS = ./.libruby-with-ext.time
REVISION_H = ./.revision.time
PLATFORM_D = ./$(PLATFORM_DIR)/.time
+ENC_TRANS_D = ./enc/trans/.time
RDOCOUT = $(EXTOUT)/rdoc
+HTMLOUT = $(EXTOUT)/html
CAPIOUT = doc/capi
-DMYEXT = dmyext.$(OBJEXT)
+INITOBJS = dmyext.$(OBJEXT) dmyenc.$(OBJEXT)
NORMALMAINOBJ = main.$(OBJEXT)
MAINOBJ = $(NORMALMAINOBJ)
-EXTOBJS =
-DLDOBJS = $(DMYEXT)
+DLDOBJS = $(INITOBJS)
EXTSOLIBS =
-MINIOBJS = $(ARCHMINIOBJS) miniinit.$(OBJEXT) miniprelude.$(OBJEXT)
+MINIOBJS = $(ARCHMINIOBJS) miniinit.$(OBJEXT) dmyext.$(OBJEXT) miniprelude.$(OBJEXT)
ENC_MK = enc.mk
COMMONOBJS = array.$(OBJEXT) \
@@ -81,6 +96,7 @@ COMMONOBJS = array.$(OBJEXT) \
strftime.$(OBJEXT) \
string.$(OBJEXT) \
struct.$(OBJEXT) \
+ symbol.$(OBJEXT) \
time.$(OBJEXT) \
transcode.$(OBJEXT) \
util.$(OBJEXT) \
@@ -95,6 +111,7 @@ COMMONOBJS = array.$(OBJEXT) \
vm_trace.$(OBJEXT) \
thread.$(OBJEXT) \
cont.$(OBJEXT) \
+ $(DTRACE_OBJ) \
$(BUILTIN_ENCOBJS) \
$(BUILTIN_TRANSOBJS) \
$(MISSING)
@@ -105,21 +122,24 @@ EXPORTOBJS = $(DLNOBJ) \
$(COMMONOBJS)
OBJS = $(EXPORTOBJS) prelude.$(OBJEXT)
-ALLOBJS = $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(DMYEXT)
+ALLOBJS = $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(INITOBJS)
GOLFOBJS = goruby.$(OBJEXT) golf_prelude.$(OBJEXT)
+DEFAULT_PRELUDES = $(GEM_PRELUDE)
PRELUDE_SCRIPTS = $(srcdir)/prelude.rb $(srcdir)/enc/prelude.rb $(DEFAULT_PRELUDES)
-GEM_PRELUDE = $(srcdir)/gem_prelude.rb
-PRELUDES = prelude.c miniprelude.c
-GOLFPRELUDES = golf_prelude.c
+GEM_PRELUDE = $(srcdir)/gem_prelude.rb
+PRELUDES = {$(srcdir)}prelude.c {$(srcdir)}miniprelude.c
+GOLFPRELUDES = {$(srcdir)}golf_prelude.c
SCRIPT_ARGS = --dest-dir="$(DESTDIR)" \
--extout="$(EXTOUT)" \
--mflags="$(MFLAGS)" \
--make-flags="$(MAKEFLAGS)"
EXTMK_ARGS = $(SCRIPT_ARGS) --extension $(EXTS) --extstatic $(EXTSTATIC) \
- --make-flags="V=$(V) MINIRUBY='$(MINIRUBY)'" --
+ --make-flags="V=$(V) MINIRUBY='$(MINIRUBY)'" \
+ --gnumake=$(gnumake) --extflags="$(EXTLDFLAGS)" \
+ --
INSTRUBY = $(SUDO) $(RUNRUBY) -r./$(arch)-fake $(srcdir)/tool/rbinstall.rb
INSTRUBY_ARGS = $(SCRIPT_ARGS) \
--data-mode=$(INSTALL_DATA_MODE) \
@@ -133,21 +153,24 @@ PRE_LIBRUBY_UPDATE = $(MINIRUBY) -e 'ARGV[1] or File.unlink(ARGV[0]) rescue nil'
$(LIBRUBY_EXTS) $(LIBRUBY_SO_UPDATE)
TESTSDIR = $(srcdir)/test
+TEST_EXCLUDES = --excludes-dir=$(TESTSDIR)/excludes --name=!/memory_leak/
+EXCLUDE_TESTFRAMEWORK = --exclude=/testunit/ --exclude=/minitest/
TESTWORKDIR = testwork
+TESTOPTS = $(RUBY_TESTOPTS)
TESTRUN_SCRIPT = $(srcdir)/test.rb
-BOOTSTRAPRUBY = $(BASERUBY)
+COMPILE_PRELUDE = $(srcdir)/tool/generic_erb.rb $(srcdir)/template/prelude.c.tmpl
-COMPILE_PRELUDE = $(MINIRUBY) -I$(srcdir) $(srcdir)/tool/compile_prelude.rb
+SHOWFLAGS = showflags
-all: showflags main docs
+all: $(SHOWFLAGS) main docs
-main: showflags $(EXTSTATIC:static=lib)encs exts
+main: $(SHOWFLAGS) exts $(ENCSTATIC:static=lib)encs
@$(NULLCMD)
.PHONY: showflags
-exts enc trans: showflags
+exts enc trans: $(SHOWFLAGS)
showflags:
$(MESSAGE_BEGIN) \
" CC = $(CC)" \
@@ -177,16 +200,14 @@ $(EXTS_MK): $(MKFILES) all-incs $(PREP) $(RBCONFIG) $(LIBRUBY)
configure-ext: $(EXTS_MK)
build-ext: $(EXTS_MK)
- $(Q)$(MAKE) -f $(EXTS_MK) $(MFLAGS) $(EXTSTATIC) LIBRUBY_EXTS=$(LIBRUBY_EXTS) ENCOBJS="$(ENCOBJS)"
-
-$(MKMAIN_CMD): $(MKFILES) all-incs $(PREP) $(RBCONFIG) $(LIBRUBY)
- $(Q)$(MINIRUBY) $(srcdir)/ext/extmk.rb --make="$(MAKE)" --command-output=$@ $(EXTMK_ARGS)
+ $(Q)$(MAKE) -f $(EXTS_MK) $(MFLAGS) libdir="$(libdir)" LIBRUBY_EXTS=$(LIBRUBY_EXTS) \
+ EXTENCS="$(ENCOBJS)" UPDATE_LIBRARIES=no $(EXTSTATIC)
prog: program wprogram
$(PREP): $(MKFILES)
-miniruby$(EXEEXT): config.status $(ALLOBJS) $(ARCHFILE) $(DTRACE_OBJ)
+miniruby$(EXEEXT): config.status $(ALLOBJS) $(ARCHFILE)
objs: $(ALLOBJS)
@@ -198,21 +219,21 @@ capi: $(CAPIOUT)/.timestamp PHONY
$(CAPIOUT)/.timestamp: Doxyfile $(PREP)
$(Q) $(MAKEDIRS) "$(@D)"
$(ECHO) generating capi
- $(Q) $(DOXYGEN) -b
+ -$(Q) $(DOXYGEN) -b
$(Q) $(MINIRUBY) -e 'File.open(ARGV[0], "w"){|f| f.puts(Time.now)}' "$@"
Doxyfile: $(srcdir)/template/Doxyfile.tmpl $(PREP) $(srcdir)/tool/generic_erb.rb $(RBCONFIG)
$(ECHO) generating $@
$(Q) $(MINIRUBY) $(srcdir)/tool/generic_erb.rb -o $@ $(srcdir)/template/Doxyfile.tmpl \
- --srcdir="$(srcdir)" --miniruby="$(BASERUBY)"
+ --srcdir="$(srcdir)" --miniruby="$(MINIRUBY)"
-program: showflags $(PROGRAM)
-wprogram: showflags $(WPROGRAM)
+program: $(SHOWFLAGS) $(PROGRAM)
+wprogram: $(SHOWFLAGS) $(WPROGRAM)
mini: PHONY miniruby$(EXEEXT)
$(PROGRAM) $(WPROGRAM): $(LIBRUBY) $(MAINOBJ) $(OBJS) $(EXTOBJS) $(SETUP) $(PREP)
-$(LIBRUBY_A): $(OBJS) $(MAINOBJ) $(DTRACE_OBJ) $(DTRACE_GLOMMED_OBJ) $(DMYEXT) $(ARCHFILE)
+$(LIBRUBY_A): $(LIBRUBY_A_OBJS) $(MAINOBJ) $(INITOBJS) $(ARCHFILE)
$(LIBRUBY_SO): $(OBJS) $(DLDOBJS) $(LIBRUBY_A) $(PREP) $(LIBRUBY_SO_UPDATE) $(BUILTIN_ENCOBJS)
@@ -225,7 +246,7 @@ $(STATIC_RUBY)$(EXEEXT): $(MAINOBJ) $(DLDOBJS) $(EXTOBJS) $(LIBRUBY_A)
ruby.imp: $(COMMONOBJS)
$(Q)$(NM) -Pgp $(COMMONOBJS) | \
- awk 'BEGIN{print "#!"}; $$2~/^[BDT]$$/&&$$1!~/^(Init_|.*_threadptr_|\.)/{print $$1}' | \
+ awk 'BEGIN{print "#!"}; $$2~/^[BDT]$$/&&$$1!~/^(Init_|ruby_static_id_|.*_threadptr_|\.)/{print $$1}' | \
sort -u -o $@
install: install-$(INSTALLDOC)
@@ -234,80 +255,80 @@ pkgconfig-data: $(ruby_pc)
$(ruby_pc): $(srcdir)/template/ruby.pc.in config.status
install-all: docs pre-install-all do-install-all post-install-all
-pre-install-all:: pre-install-local pre-install-ext pre-install-doc
-do-install-all: all
+pre-install-all:: all pre-install-local pre-install-ext pre-install-doc
+do-install-all: pre-install-all
$(INSTRUBY) --make="$(MAKE)" $(INSTRUBY_ARGS) --install=all --rdoc-output="$(RDOCOUT)"
post-install-all:: post-install-local post-install-ext post-install-doc
@$(NULLCMD)
install-nodoc: pre-install-nodoc do-install-nodoc post-install-nodoc
pre-install-nodoc:: pre-install-local pre-install-ext
-do-install-nodoc: main
+do-install-nodoc: main pre-install-nodoc
$(INSTRUBY) --make="$(MAKE)" $(INSTRUBY_ARGS)
post-install-nodoc:: post-install-local post-install-ext
install-local: pre-install-local do-install-local post-install-local
pre-install-local:: pre-install-bin pre-install-lib pre-install-man
-do-install-local: $(PROGRAM)
+do-install-local: $(PROGRAM) pre-install-local
$(INSTRUBY) --make="$(MAKE)" $(INSTRUBY_ARGS) --install=local
post-install-local:: post-install-bin post-install-lib post-install-man
install-ext: pre-install-ext do-install-ext post-install-ext
pre-install-ext:: pre-install-ext-arch pre-install-ext-comm
-do-install-ext: exts
+do-install-ext: exts pre-install-ext
$(INSTRUBY) --make="$(MAKE)" $(INSTRUBY_ARGS) --install=ext
post-install-ext:: post-install-ext-arch post-install-ext-comm
install-arch: pre-install-arch do-install-arch post-install-arch
pre-install-arch:: pre-install-bin pre-install-ext-arch
-do-install-arch: main
+do-install-arch: main do-install-arch
$(INSTRUBY) --make="$(MAKE)" $(INSTRUBY_ARGS) --install=arch
post-install-arch:: post-install-bin post-install-ext-arch
install-comm: pre-install-comm do-install-comm post-install-comm
pre-install-comm:: pre-install-lib pre-install-ext-comm pre-install-man
-do-install-comm: $(PREP)
+do-install-comm: $(PREP) pre-install-comm
$(INSTRUBY) --make="$(MAKE)" $(INSTRUBY_ARGS) --install=lib --install=ext-comm --install=man
post-install-comm:: post-install-lib post-install-ext-comm post-install-man
install-bin: pre-install-bin do-install-bin post-install-bin
pre-install-bin:: install-prereq
-do-install-bin: $(PROGRAM)
+do-install-bin: $(PROGRAM) pre-install-bin
$(INSTRUBY) --make="$(MAKE)" $(INSTRUBY_ARGS) --install=bin
post-install-bin::
@$(NULLCMD)
install-lib: pre-install-lib do-install-lib post-install-lib
pre-install-lib:: install-prereq
-do-install-lib: $(PREP)
+do-install-lib: $(PREP) pre-install-lib
$(INSTRUBY) --make="$(MAKE)" $(INSTRUBY_ARGS) --install=lib
post-install-lib::
@$(NULLCMD)
install-ext-comm: pre-install-ext-comm do-install-ext-comm post-install-ext-comm
pre-install-ext-comm:: install-prereq
-do-install-ext-comm: exts
+do-install-ext-comm: exts pre-install-ext-comm
$(INSTRUBY) --make="$(MAKE)" $(INSTRUBY_ARGS) --install=ext-comm
post-install-ext-comm::
@$(NULLCMD)
install-ext-arch: pre-install-ext-arch do-install-ext-arch post-install-ext-arch
pre-install-ext-arch:: install-prereq
-do-install-ext-arch: exts
+do-install-ext-arch: exts pre-install-ext-arch
$(INSTRUBY) --make="$(MAKE)" $(INSTRUBY_ARGS) --install=ext-arch
post-install-ext-arch::
@$(NULLCMD)
install-man: pre-install-man do-install-man post-install-man
pre-install-man:: install-prereq
-do-install-man: $(PREP)
+do-install-man: $(PREP) pre-install-man
$(INSTRUBY) --make="$(MAKE)" $(INSTRUBY_ARGS) --install=man
post-install-man::
@$(NULLCMD)
install-capi: capi pre-install-capi do-install-capi post-install-capi
pre-install-capi:: install-prereq
-do-install-capi: $(PREP)
+do-install-capi: $(PREP) pre-install-capi
$(INSTRUBY) --make="$(MAKE)" $(INSTRUBY_ARGS) --install=capi
post-install-capi::
@$(NULLCMD)
@@ -322,10 +343,10 @@ dont-install-all: $(PROGRAM)
post-no-install-all:: post-no-install-local post-no-install-ext post-no-install-doc
@$(NULLCMD)
-uninstall: $(INSTALLED_LIST)
+uninstall: $(INSTALLED_LIST) sudo-precheck
$(Q)$(SUDO) $(MINIRUBY) $(srcdir)/tool/rbuninstall.rb --destdir=$(DESTDIR) $(INSTALLED_LIST)
-reinstall: uninstall install
+reinstall: all uninstall install
what-where-nodoc: no-install-nodoc
no-install-nodoc: pre-no-install-nodoc dont-install-nodoc post-no-install-nodoc
@@ -404,14 +425,14 @@ post-no-install-man::
install-doc: rdoc pre-install-doc do-install-doc post-install-doc
pre-install-doc:: install-prereq
-do-install-doc: $(PROGRAM)
+do-install-doc: $(PROGRAM) pre-install-doc
$(INSTRUBY) --make="$(MAKE)" $(INSTRUBY_ARGS) --install=rdoc --rdoc-output="$(RDOCOUT)"
post-install-doc::
@$(NULLCMD)
install-gem: pre-install-gem do-install-gem post-install-gem
pre-install-gem:: pre-install-bin pre-install-lib pre-install-man
-do-install-gem: $(PROGRAM)
+do-install-gem: $(PROGRAM) pre-install-gem
$(INSTRUBY) --make="$(MAKE)" $(INSTRUBY_ARGS) --install=gem
post-install-gem::
@$(NULLCMD)
@@ -420,6 +441,10 @@ rdoc: PHONY main
@echo Generating RDoc documentation
$(Q) $(XRUBY) "$(srcdir)/bin/rdoc" --root "$(srcdir)" --page-dir "$(srcdir)/doc" --encoding=UTF-8 --no-force-update --all --ri --op "$(RDOCOUT)" --debug $(RDOCFLAGS) "$(srcdir)"
+html: PHONY main
+ @echo Generating RDoc HTML files
+ $(Q) $(XRUBY) "$(srcdir)/bin/rdoc" --root "$(srcdir)" --page-dir "$(srcdir)/doc" --encoding=UTF-8 --no-force-update --all --op "$(HTMLOUT)" --debug $(RDOCFLAGS) "$(srcdir)"
+
rdoc-coverage: PHONY main
@echo Generating RDoc coverage report
$(Q) $(XRUBY) "$(srcdir)/bin/rdoc" --root "$(srcdir)" --encoding=UTF-8 --all --quiet -C $(RDOCFLAGS) "$(srcdir)"
@@ -446,108 +471,166 @@ post-no-install-doc::
CLEAR_INSTALLED_LIST = clear-installed-list
-install-prereq: $(CLEAR_INSTALLED_LIST) yes-fake PHONY
+install-prereq: $(CLEAR_INSTALLED_LIST) yes-fake sudo-precheck PHONY
clear-installed-list: PHONY
@> $(INSTALLED_LIST) set MAKE="$(MAKE)"
-clean: clean-ext clean-local clean-enc clean-golf clean-rdoc clean-capi clean-extout clean-platform
-clean-local:: PHONY
+clean: clean-ext clean-enc clean-golf clean-rdoc clean-capi clean-extout clean-local clean-platform
+clean-local:: clean-runnable
$(Q)$(RM) $(OBJS) $(MINIOBJS) $(MAINOBJ) $(LIBRUBY_A) $(LIBRUBY_SO) $(LIBRUBY) $(LIBRUBY_ALIASES)
- $(Q)$(RM) $(PROGRAM) $(WPROGRAM) miniruby$(EXEEXT) dmyext.$(OBJEXT) $(ARCHFILE) .*.time
- $(Q)$(RM) y.tab.c y.output encdb.h transdb.h prelude.c config.log rbconfig.rb $(ruby_pc) probes.h probes.$(OBJEXT) probes.stamp ruby-glommed.$(OBJEXT)
+ $(Q)$(RM) $(PROGRAM) $(WPROGRAM) miniruby$(EXEEXT) dmyext.$(OBJEXT) dmyenc.$(OBJEXT) $(ARCHFILE) .*.time
+ $(Q)$(RM) y.tab.c y.output encdb.h transdb.h config.log rbconfig.rb $(ruby_pc) probes.h probes.$(OBJEXT) probes.stamp ruby-glommed.$(OBJEXT)
+ $(Q)$(RM) GNUmakefile.old Makefile.old $(arch)-fake.rb bisect.sh $(ENC_TRANS_D)
+ -$(Q) $(RMDIR) enc/jis enc/trans enc 2> $(NULL) || exit 0
+clean-runnable:: PHONY
+ $(Q)$(CHDIR) bin 2>$(NULL) && $(RM) $(PROGRAM) $(WPROGRAM) $(GORUBY)$(EXEEXT) bin/*.$(DLEXT) 2>$(NULL) || exit 0
+ $(Q)$(CHDIR) lib 2>$(NULL) && $(RM) $(LIBRUBY_A) $(LIBRUBY) $(LIBRUBY_ALIASES) $(RUBY_BASE_NAME)/$(RUBY_PROGRAM_VERSION) $(RUBY_BASE_NAME)/vendor_ruby 2>$(NULL) || exit 0
+ $(Q)$(RMDIR) lib/$(RUBY_BASE_NAME) lib bin 2>$(NULL) || exit 0
clean-ext:: PHONY
clean-golf: PHONY
$(Q)$(RM) $(GORUBY)$(EXEEXT) $(GOLFOBJS)
clean-rdoc: PHONY
+clean-html: PHONY
clean-capi: PHONY
clean-platform: PHONY
clean-extout: PHONY
-clean-docs: clean-rdoc clean-capi
+ -$(Q)$(RMDIR) $(EXTOUT)/$(arch) $(EXTOUT) 2> $(NULL) || exit 0
+clean-docs: clean-rdoc clean-html clean-capi
-distclean: distclean-ext distclean-local distclean-enc distclean-golf distclean-extout distclean-platform
+distclean: distclean-ext distclean-enc distclean-golf distclean-extout distclean-local distclean-platform
distclean-local:: clean-local
- $(Q)$(RM) $(MKFILES) yasmdata.rb *.inc
+ $(Q)$(RM) $(MKFILES) yasmdata.rb *.inc $(PRELUDES)
$(Q)$(RM) config.cache config.status config.status.lineno
$(Q)$(RM) *~ *.bak *.stackdump core *.core gmon.out $(PREP)
+ -$(Q)$(RMALL) $(srcdir)/autom4te.cache
distclean-ext:: PHONY
distclean-golf: clean-golf
- $(Q)$(RM) $(GOLFPRELUDES)
distclean-rdoc: PHONY
+distclean-html: PHONY
distclean-capi: PHONY
distclean-extout: clean-extout
distclean-platform: clean-platform
realclean:: realclean-ext realclean-local realclean-enc realclean-golf realclean-extout
realclean-local:: distclean-local
- $(Q)$(RM) parse.c parse.h lex.c newline.c miniprelude.c revision.h
+ $(Q)$(RM) parse.c parse.h lex.c enc/trans/newline.c revision.h
+ $(Q)$(RM) id.c id.h probes.dmyh
+ $(Q)$(CHDIR) $(srcdir) && $(exec) $(RM) parse.c parse.h lex.c enc/trans/newline.c $(PRELUDES) revision.h
+ $(Q)$(CHDIR) $(srcdir) && $(exec) $(RM) id.c id.h probes.dmyh
+ $(Q)$(CHDIR) $(srcdir) && $(exec) $(RM) configure tool/config.guess tool/config.sub gems/*.gem
realclean-ext:: PHONY
realclean-golf: distclean-golf
+ $(Q)$(RM) $(GOLFPRELUDES)
realclean-capi: PHONY
realclean-extout: distclean-extout
clean-ext distclean-ext realclean-ext::
$(Q)$(RM) $(EXTS_MK)
$(Q)$(RM) $(EXTOUT)/.timestamp/.*.time
+ $(Q)$(RMDIR) $(EXTOUT)/.timestamp 2> $(NULL) || exit 0
clean-enc distclean-enc realclean-enc: PHONY
-check: main test test-all
+clean-enc: clean-enc.d
+
+clean-enc.d: PHONY
+ $(Q)$(RM) $(ENC_TRANS_D)
+ -$(Q) $(RMDIR) enc/jis enc/trans enc 2> $(NULL) || exit 0
+
+clean-rdoc distclean-rdoc realclean-rdoc:
+ @echo $(@:-rdoc=ing) rdoc
+ $(Q)$(RMALL) $(RDOCOUT)
+
+clean-html distclean-html realclean-html:
+ @echo $(@:-html=ing) HTML
+ $(Q)$(RMALL) $(HTMLOUT)
+
+clean-capi distclean-capi realclean-capi:
+ @echo $(@:-capi=ing) capi
+ $(Q)$(RMALL) $(CAPIOUT)
+
+clean-platform:
+ $(Q) $(RM) $(PLATFORM_D)
+ -$(Q) $(RMDIR) $(PLATFORM_DIR) 2> $(NULL) || exit 0
+
+check: main test test-testframework test-almost
$(ECHO) check succeeded
check-ruby: test test-ruby
fake: $(CROSS_COMPILING)-fake
yes-fake: $(arch)-fake.rb $(RBCONFIG) PHONY
-no-fake: PHONY
+no-fake -fake: PHONY
+
+# really doesn't depend on .o, just ensure newer than headers which
+# version.o depends on.
+$(arch)-fake.rb: $(srcdir)/template/fake.rb.in $(srcdir)/tool/generic_erb.rb version.$(OBJEXT) miniruby$(EXEEXT)
+ $(ECHO) generating $@
+ $(Q) $(CPP) $(warnflags) $(XCFLAGS) $(CPPFLAGS) "$(srcdir)/version.c" | \
+ $(BOOTSTRAPRUBY) "$(srcdir)/tool/generic_erb.rb" -o $@ "$(srcdir)/template/fake.rb.in" \
+ i=- srcdir="$(srcdir)" BASERUBY="$(BASERUBY)"
btest: $(TEST_RUNNABLE)-btest
no-btest: PHONY
yes-btest: fake miniruby$(EXEEXT) PHONY
- $(BOOTSTRAPRUBY) "$(srcdir)/bootstraptest/runner.rb" --ruby="$(BTESTRUBY) $(RUN_OPTS)" $(OPTS) $(TESTOPTS)
+ $(Q)$(exec) $(BOOTSTRAPRUBY) "$(srcdir)/bootstraptest/runner.rb" --ruby="$(BTESTRUBY) $(RUN_OPTS)" $(OPTS) $(TESTOPTS)
btest-ruby: $(TEST_RUNNABLE)-btest-ruby
no-btest-ruby: PHONY
yes-btest-ruby: prog PHONY
- $(Q)$(RUNRUBY) "$(srcdir)/bootstraptest/runner.rb" --ruby="$(PROGRAM) -I$(srcdir)/lib $(RUN_OPTS)" -q $(OPTS) $(TESTOPTS)
+ $(Q)$(exec) $(RUNRUBY) "$(srcdir)/bootstraptest/runner.rb" --ruby="$(PROGRAM) -I$(srcdir)/lib $(RUN_OPTS)" -q $(OPTS) $(TESTOPTS)
test-sample: $(TEST_RUNNABLE)-test-sample
no-test-sample: PHONY
yes-test-sample: prog PHONY
- $(Q)$(RUNRUBY) $(srcdir)/tool/rubytest.rb --run-opt=$(RUN_OPTS) $(OPTS) $(TESTOPTS)
+ $(Q)$(exec) $(RUNRUBY) "$(srcdir)/tool/rubytest.rb" --run-opt=$(RUN_OPTS) $(OPTS) $(TESTOPTS)
test-knownbugs: test-knownbug
test-knownbug: $(TEST_RUNNABLE)-test-knownbug
no-test-knownbug: PHONY
yes-test-knownbug: prog PHONY
- -$(RUNRUBY) "$(srcdir)/bootstraptest/runner.rb" --ruby="$(PROGRAM) $(RUN_OPTS)" $(OPTS) $(TESTOPTS) $(srcdir)/KNOWNBUGS.rb
+ -$(exec) $(RUNRUBY) "$(srcdir)/bootstraptest/runner.rb" --ruby="$(PROGRAM) $(RUN_OPTS)" $(OPTS) $(TESTOPTS) $(srcdir)/KNOWNBUGS.rb
+
+test-testframework: $(TEST_RUNNABLE)-test-testframework
+yes-test-testframework: prog PHONY
+ $(Q)$(exec) $(RUNRUBY) "$(srcdir)/test/runner.rb" --ruby="$(RUNRUBY)" $(TESTOPTS) testunit minitest
+no-test-testframework: PHONY
test: test-sample btest-ruby test-knownbug
+# $ make test-all TESTOPTS="--help" displays more detail
+# for example, make test-all TESTOPTS="-j2 -v -n test-name -- test-file-name"
test-all: $(TEST_RUNNABLE)-test-all
yes-test-all: prog PHONY
- $(RUNRUBY) "$(srcdir)/test/runner.rb" --ruby="$(RUNRUBY)" $(TESTOPTS) $(TESTS)
+ $(Q)$(exec) $(RUNRUBY) "$(srcdir)/test/runner.rb" --ruby="$(RUNRUBY)" $(TEST_EXCLUDES) $(TESTOPTS) $(TESTS)
TESTS_BUILD = mkmf
no-test-all: PHONY
$(MINIRUBY) -I"$(srcdir)/lib" "$(srcdir)/test/runner.rb" $(TESTOPTS) $(TESTS_BUILD)
+test-almost: $(TEST_RUNNABLE)-test-almost
+yes-test-almost: prog PHONY
+ $(Q)$(exec) $(RUNRUBY) "$(srcdir)/test/runner.rb" --ruby="$(RUNRUBY)" $(TEST_EXCLUDES) $(TESTOPTS) $(EXCLUDE_TESTFRAMEWORK) $(TESTS)
+no-test-almost: PHONY
+
test-ruby: $(TEST_RUNNABLE)-test-ruby
no-test-ruby: PHONY
yes-test-ruby: prog encs PHONY
- $(RUNRUBY) "$(srcdir)/test/runner.rb" -q $(TESTOPTS) -- ruby -ext-
+ $(RUNRUBY) "$(srcdir)/test/runner.rb" $(TEST_EXCLUDES) $(TESTOPTS) -- ruby -ext-
extconf: $(PREP)
$(Q) $(MAKEDIRS) "$(EXTCONFDIR)"
$(RUNRUBY) -C "$(EXTCONFDIR)" $(EXTCONF) $(EXTCONFARGS)
-$(RBCONFIG): $(srcdir)/tool/mkconfig.rb config.status $(srcdir)/version.h $(PREP)
- $(Q)$(MINIRUBY) $(srcdir)/tool/mkconfig.rb -timestamp=$@ \
+$(RBCONFIG): $(srcdir)/tool/mkconfig.rb config.status $(srcdir)/version.h
+ $(Q)$(BOOTSTRAPRUBY) $(srcdir)/tool/mkconfig.rb -timestamp=$@ \
+ -arch=$(arch) -version=$(RUBY_PROGRAM_VERSION) \
-install_name=$(RUBY_INSTALL_NAME) \
-so_name=$(RUBY_SO_NAME) rbconfig.rb
test-rubyspec-precheck:
-test-rubyspec: test-rubyspec-precheck
- $(RUNRUBY) $(srcdir)/spec/mspec/bin/mspec run -B $(srcdir)/spec/default.mspec $(MSPECOPT)
+test-rubyspec: test-rubyspec-precheck $(arch)-fake.rb
+ $(RUNRUBY) -r./$(arch)-fake $(srcdir)/spec/mspec/bin/mspec run -B $(srcdir)/spec/default.mspec $(MSPECOPT)
RUNNABLE = $(LIBRUBY_RELATIVE:no=un)-runnable
runnable: $(RUNNABLE) prog $(srcdir)/tool/mkrunnable.rb PHONY
@@ -556,7 +639,7 @@ yes-runnable: PHONY
encs: enc trans
libencs: libenc libtrans
-encs enc trans libencs libenc libtrans: showflags $(ENC_MK) $(LIBRUBY) $(PREP)
+encs enc trans libencs libenc libtrans: $(SHOWFLAGS) $(ENC_MK) $(LIBRUBY) $(PREP) PHONY
$(ECHO) making $@
$(Q) $(MAKE) -f $(ENC_MK) V="$(V)" \
RUBY="$(MINIRUBY)" MINIRUBY="$(MINIRUBY)" \
@@ -567,16 +650,16 @@ libenc enc: {$(VPATH)}encdb.h
libtrans trans: {$(VPATH)}transdb.h
$(ENC_MK): $(srcdir)/enc/make_encmake.rb $(srcdir)/enc/Makefile.in $(srcdir)/enc/depend \
- $(srcdir)/enc/encinit.c.erb $(srcdir)/lib/mkmf.rb $(RBCONFIG)
+ $(srcdir)/enc/encinit.c.erb $(srcdir)/lib/mkmf.rb $(RBCONFIG) fake
$(ECHO) generating $@
- $(Q) $(MINIRUBY) $(srcdir)/enc/make_encmake.rb --builtin-encs="$(BUILTIN_ENCOBJS)" --builtin-transes="$(BUILTIN_TRANSOBJS)" --module$(EXTSTATIC) $@ $(ENCS)
+ $(Q) $(MINIRUBY) $(srcdir)/enc/make_encmake.rb --builtin-encs="$(BUILTIN_ENCOBJS)" --builtin-transes="$(BUILTIN_TRANSOBJS)" --module$(ENCSTATIC) $(ENCS) $@
.PRECIOUS: $(MKFILES)
.PHONY: PHONY all fake prereq incs srcs preludes help
.PHONY: test install install-nodoc install-doc dist
.PHONY: loadpath golf capi rdoc install-prereq clear-installed-list
-.PHONY: clean clean-ext clean-local clean-enc clean-golf clean-rdoc clean-extout
+.PHONY: clean clean-ext clean-local clean-enc clean-golf clean-rdoc clean-html clean-extout
.PHONY: distclean distclean-ext distclean-local distclean-enc distclean-golf distclean-extout
.PHONY: realclean realclean-ext realclean-local realclean-enc realclean-golf realclean-extout
.PHONY: check test test-all btest btest-ruby test-sample test-knownbug
@@ -602,16 +685,18 @@ $(PLATFORM_D):
$(Q) $(MAKEDIRS) $(PLATFORM_DIR)
@exit > $@
+$(BUILTIN_ENCOBJS) $(BUILTIN_TRANSOBJS): $(ENC_TRANS_D)
+
+$(ENC_TRANS_D):
+ $(Q) $(MAKEDIRS) enc/trans
+ @exit > $@
+
###
+CCAN_DIR = {$(VPATH)}ccan
RUBY_H_INCLUDES = {$(VPATH)}ruby.h {$(VPATH)}config.h {$(VPATH)}defines.h \
{$(VPATH)}intern.h {$(VPATH)}missing.h {$(VPATH)}st.h \
{$(VPATH)}subst.h
-ENCODING_H_INCLUDES= {$(VPATH)}encoding.h {$(VPATH)}oniguruma.h
-PROBES_H_INCLUDES = {$(VPATH)}probes.h
-VM_CORE_H_INCLUDES = {$(VPATH)}vm_core.h {$(VPATH)}thread_$(THREAD_MODEL).h \
- {$(VPATH)}node.h {$(VPATH)}method.h {$(VPATH)}ruby_atomic.h \
- {$(VPATH)}vm_debug.h {$(VPATH)}id.h {$(VPATH)}thread_native.h
###
@@ -620,12 +705,13 @@ alloca.$(OBJEXT): {$(VPATH)}alloca.c {$(VPATH)}config.h
crypt.$(OBJEXT): {$(VPATH)}crypt.c
dup2.$(OBJEXT): {$(VPATH)}dup2.c
erf.$(OBJEXT): {$(VPATH)}erf.c
+explicit_bzero.$(OBJEXT): {$(VPATH)}explicit_bzero.c
finite.$(OBJEXT): {$(VPATH)}finite.c
flock.$(OBJEXT): {$(VPATH)}flock.c
memcmp.$(OBJEXT): {$(VPATH)}memcmp.c
memmove.$(OBJEXT): {$(VPATH)}memmove.c
mkdir.$(OBJEXT): {$(VPATH)}mkdir.c
-setproctitle.$(OBJEXT): {$(VPATH)}setproctitle.c {$(VPATH)}util.h $(RUBY_H_INCLUDES) $(hdrdir)/ruby.h
+setproctitle.$(OBJEXT): {$(VPATH)}setproctitle.c
strchr.$(OBJEXT): {$(VPATH)}strchr.c
strdup.$(OBJEXT): {$(VPATH)}strdup.c
strerror.$(OBJEXT): {$(VPATH)}strerror.c
@@ -635,230 +721,35 @@ strstr.$(OBJEXT): {$(VPATH)}strstr.c
strtod.$(OBJEXT): {$(VPATH)}strtod.c
strtol.$(OBJEXT): {$(VPATH)}strtol.c
nt.$(OBJEXT): {$(VPATH)}nt.c
-os2.$(OBJEXT): {$(VPATH)}os2.c
-dl_os2.$(OBJEXT): {$(VPATH)}dl_os2.c
ia64.$(OBJEXT): {$(VPATH)}ia64.s
$(CC) $(CFLAGS) -c $<
###
-addr2line.$(OBJEXT): {$(VPATH)}addr2line.c {$(VPATH)}addr2line.h {$(VPATH)}config.h
-array.$(OBJEXT): {$(VPATH)}array.c $(RUBY_H_INCLUDES) {$(VPATH)}util.h \
- $(ENCODING_H_INCLUDES) {$(VPATH)}internal.h $(PROBES_H_INCLUDES) {$(VPATH)}id.h {$(VPATH)}vm_opts.h
-bignum.$(OBJEXT): {$(VPATH)}bignum.c $(RUBY_H_INCLUDES) {$(VPATH)}util.h \
- {$(VPATH)}thread.h {$(VPATH)}internal.h
-class.$(OBJEXT): {$(VPATH)}class.c $(RUBY_H_INCLUDES) \
- $(VM_CORE_H_INCLUDES) {$(VPATH)}internal.h {$(VPATH)}constant.h {$(VPATH)}vm_opts.h
-compar.$(OBJEXT): {$(VPATH)}compar.c $(RUBY_H_INCLUDES)
-complex.$(OBJEXT): {$(VPATH)}complex.c $(RUBY_H_INCLUDES) \
- {$(VPATH)}internal.h $(hdrdir)/ruby.h
-dir.$(OBJEXT): {$(VPATH)}dir.c $(RUBY_H_INCLUDES) {$(VPATH)}util.h \
- $(ENCODING_H_INCLUDES) \
- {$(VPATH)}internal.h
-dln.$(OBJEXT): {$(VPATH)}dln.c {$(VPATH)}dln.h $(RUBY_H_INCLUDES)
-dln_find.$(OBJEXT): {$(VPATH)}dln_find.c {$(VPATH)}dln.h $(RUBY_H_INCLUDES)
-dmydln.$(OBJEXT): {$(VPATH)}dmydln.c $(RUBY_H_INCLUDES)
-dmyext.$(OBJEXT): {$(VPATH)}dmyext.c
-encoding.$(OBJEXT): {$(VPATH)}encoding.c $(RUBY_H_INCLUDES) \
- $(ENCODING_H_INCLUDES) {$(VPATH)}regenc.h {$(VPATH)}util.h \
- {$(VPATH)}internal.h
-enum.$(OBJEXT): {$(VPATH)}enum.c $(RUBY_H_INCLUDES) {$(VPATH)}node.h \
- {$(VPATH)}util.h {$(VPATH)}id.h {$(VPATH)}internal.h
-enumerator.$(OBJEXT): {$(VPATH)}enumerator.c $(RUBY_H_INCLUDES) \
- {$(VPATH)}internal.h {$(VPATH)}node.h
-error.$(OBJEXT): {$(VPATH)}error.c {$(VPATH)}known_errors.inc \
- $(RUBY_H_INCLUDES) $(VM_CORE_H_INCLUDES) $(ENCODING_H_INCLUDES) \
- {$(VPATH)}internal.h {$(VPATH)}vm_opts.h
-eval.$(OBJEXT): {$(VPATH)}eval.c {$(VPATH)}eval_intern.h {$(VPATH)}vm.h \
- $(RUBY_H_INCLUDES) $(VM_CORE_H_INCLUDES) {$(VPATH)}eval_error.c \
- {$(VPATH)}eval_jump.c {$(VPATH)}gc.h {$(VPATH)}iseq.h \
- $(ENCODING_H_INCLUDES) {$(VPATH)}internal.h $(PROBES_H_INCLUDES) {$(VPATH)}vm_opts.h {$(VPATH)}probes_helper.h
-load.$(OBJEXT): {$(VPATH)}load.c {$(VPATH)}eval_intern.h \
- {$(VPATH)}util.h $(RUBY_H_INCLUDES) $(VM_CORE_H_INCLUDES) \
- {$(VPATH)}dln.h {$(VPATH)}internal.h $(PROBES_H_INCLUDES) {$(VPATH)}vm_opts.h
-file.$(OBJEXT): {$(VPATH)}file.c $(RUBY_H_INCLUDES) {$(VPATH)}io.h \
- $(ENCODING_H_INCLUDES) {$(VPATH)}util.h {$(VPATH)}dln.h \
- {$(VPATH)}internal.h
-gc.$(OBJEXT): {$(VPATH)}gc.c $(RUBY_H_INCLUDES) {$(VPATH)}re.h \
- {$(VPATH)}regex.h $(ENCODING_H_INCLUDES) $(VM_CORE_H_INCLUDES) \
- {$(VPATH)}gc.h {$(VPATH)}io.h {$(VPATH)}eval_intern.h {$(VPATH)}util.h \
- {$(VPATH)}internal.h {$(VPATH)}constant.h \
- {$(VPATH)}thread.h $(PROBES_H_INCLUDES) {$(VPATH)}vm_opts.h {$(VPATH)}debug.h
-hash.$(OBJEXT): {$(VPATH)}hash.c $(RUBY_H_INCLUDES) {$(VPATH)}util.h \
- $(ENCODING_H_INCLUDES) {$(VPATH)}internal.h $(PROBES_H_INCLUDES) {$(VPATH)}vm_opts.h
-inits.$(OBJEXT): {$(VPATH)}inits.c $(RUBY_H_INCLUDES) \
- {$(VPATH)}internal.h
-io.$(OBJEXT): {$(VPATH)}io.c $(RUBY_H_INCLUDES) {$(VPATH)}io.h \
- {$(VPATH)}util.h $(ENCODING_H_INCLUDES) {$(VPATH)}dln.h \
- {$(VPATH)}internal.h {$(VPATH)}thread.h {$(VPATH)}id.h {$(VPATH)}ruby_atomic.h
-main.$(OBJEXT): {$(VPATH)}main.c $(RUBY_H_INCLUDES) {$(VPATH)}node.h {$(VPATH)}vm_debug.h {$(VPATH)}vm_opts.h $(hdrdir)/ruby.h
-marshal.$(OBJEXT): {$(VPATH)}marshal.c $(RUBY_H_INCLUDES) {$(VPATH)}io.h \
- $(ENCODING_H_INCLUDES) {$(VPATH)}util.h {$(VPATH)}internal.h
-math.$(OBJEXT): {$(VPATH)}math.c $(RUBY_H_INCLUDES) \
- {$(VPATH)}internal.h
-node.$(OBJEXT): {$(VPATH)}node.c $(RUBY_H_INCLUDES) \
- $(VM_CORE_H_INCLUDES) {$(VPATH)}vm_opts.h {$(VPATH)}internal.h
-numeric.$(OBJEXT): {$(VPATH)}numeric.c $(RUBY_H_INCLUDES) \
- {$(VPATH)}util.h $(ENCODING_H_INCLUDES) {$(VPATH)}internal.h {$(VPATH)}id.h
-object.$(OBJEXT): {$(VPATH)}object.c $(RUBY_H_INCLUDES) {$(VPATH)}util.h \
- {$(VPATH)}internal.h {$(VPATH)}constant.h $(ENCODING_H_INCLUDES) $(PROBES_H_INCLUDES) \
- {$(VPATH)}vm_opts.h {$(VPATH)}id.h
-pack.$(OBJEXT): {$(VPATH)}pack.c $(RUBY_H_INCLUDES) {$(VPATH)}encoding.h \
- {$(VPATH)}oniguruma.h {$(VPATH)}internal.h
-parse.$(OBJEXT): {$(VPATH)}parse.c $(RUBY_H_INCLUDES) {$(VPATH)}node.h \
- $(ENCODING_H_INCLUDES) {$(VPATH)}id.h {$(VPATH)}regenc.h \
- {$(VPATH)}regex.h {$(VPATH)}util.h {$(VPATH)}lex.c \
- {$(VPATH)}defs/keywords {$(VPATH)}id.c {$(VPATH)}parse.y \
- {$(VPATH)}parse.h {$(VPATH)}internal.h $(PROBES_H_INCLUDES) {$(VPATH)}vm_opts.h
-proc.$(OBJEXT): {$(VPATH)}proc.c {$(VPATH)}eval_intern.h \
- $(RUBY_H_INCLUDES) {$(VPATH)}gc.h $(VM_CORE_H_INCLUDES) \
- {$(VPATH)}internal.h {$(VPATH)}iseq.h {$(VPATH)}vm_opts.h
-process.$(OBJEXT): {$(VPATH)}process.c $(RUBY_H_INCLUDES) \
- {$(VPATH)}util.h {$(VPATH)}io.h $(ENCODING_H_INCLUDES) {$(VPATH)}dln.h \
- $(VM_CORE_H_INCLUDES) {$(VPATH)}internal.h \
- {$(VPATH)}thread.h {$(VPATH)}vm_opts.h
-random.$(OBJEXT): {$(VPATH)}random.c $(RUBY_H_INCLUDES) \
- {$(VPATH)}siphash.c {$(VPATH)}siphash.h {$(VPATH)}internal.h
-range.$(OBJEXT): {$(VPATH)}range.c $(RUBY_H_INCLUDES) \
- $(ENCODING_H_INCLUDES) {$(VPATH)}internal.h {$(VPATH)}id.h
-rational.$(OBJEXT): {$(VPATH)}rational.c $(RUBY_H_INCLUDES) {$(VPATH)}internal.h $(hdrdir)/ruby.h
-re.$(OBJEXT): {$(VPATH)}re.c $(RUBY_H_INCLUDES) {$(VPATH)}re.h \
- {$(VPATH)}regex.h $(ENCODING_H_INCLUDES) {$(VPATH)}util.h \
- {$(VPATH)}regint.h {$(VPATH)}regenc.h {$(VPATH)}internal.h
-regcomp.$(OBJEXT): {$(VPATH)}regcomp.c {$(VPATH)}regparse.h \
- {$(VPATH)}regint.h {$(VPATH)}regenc.h {$(VPATH)}oniguruma.h \
- $(RUBY_H_INCLUDES)
-regenc.$(OBJEXT): {$(VPATH)}regenc.c {$(VPATH)}regint.h \
- {$(VPATH)}regenc.h {$(VPATH)}oniguruma.h $(RUBY_H_INCLUDES)
-regerror.$(OBJEXT): {$(VPATH)}regerror.c {$(VPATH)}regint.h \
- {$(VPATH)}regenc.h {$(VPATH)}oniguruma.h $(RUBY_H_INCLUDES)
-regexec.$(OBJEXT): {$(VPATH)}regexec.c {$(VPATH)}regint.h \
- {$(VPATH)}regenc.h {$(VPATH)}oniguruma.h $(RUBY_H_INCLUDES)
-regparse.$(OBJEXT): {$(VPATH)}regparse.c {$(VPATH)}regparse.h \
- {$(VPATH)}regint.h {$(VPATH)}regenc.h {$(VPATH)}oniguruma.h \
- $(RUBY_H_INCLUDES)
-regsyntax.$(OBJEXT): {$(VPATH)}regsyntax.c {$(VPATH)}regint.h \
- {$(VPATH)}regenc.h {$(VPATH)}oniguruma.h $(RUBY_H_INCLUDES)
-ruby.$(OBJEXT): {$(VPATH)}ruby.c $(RUBY_H_INCLUDES) {$(VPATH)}util.h \
- $(ENCODING_H_INCLUDES) {$(VPATH)}eval_intern.h $(VM_CORE_H_INCLUDES) \
- {$(VPATH)}dln.h {$(VPATH)}internal.h {$(VPATH)}vm_opts.h
-safe.$(OBJEXT): {$(VPATH)}safe.c $(RUBY_H_INCLUDES) $(VM_CORE_H_INCLUDES) {$(VPATH)}vm_opts.h {$(VPATH)}internal.h
-signal.$(OBJEXT): {$(VPATH)}signal.c $(RUBY_H_INCLUDES) \
- $(VM_CORE_H_INCLUDES) {$(VPATH)}vm_opts.h {$(VPATH)}internal.h {$(VPATH)}ruby_atomic.h {$(VPATH)}eval_intern.h
-sprintf.$(OBJEXT): {$(VPATH)}sprintf.c $(RUBY_H_INCLUDES) {$(VPATH)}re.h \
- {$(VPATH)}regex.h {$(VPATH)}vsnprintf.c $(ENCODING_H_INCLUDES) {$(VPATH)}internal.h
-st.$(OBJEXT): {$(VPATH)}st.c $(RUBY_H_INCLUDES)
-strftime.$(OBJEXT): {$(VPATH)}strftime.c $(RUBY_H_INCLUDES) \
- {$(VPATH)}timev.h $(ENCODING_H_INCLUDES)
-string.$(OBJEXT): {$(VPATH)}string.c $(RUBY_H_INCLUDES) {$(VPATH)}re.h \
- {$(VPATH)}regex.h $(ENCODING_H_INCLUDES) {$(VPATH)}internal.h $(PROBES_H_INCLUDES) {$(VPATH)}vm_opts.h {$(VPATH)}node.h {$(VPATH)}ruby_atomic.h {$(VPATH)}vm_core.h {$(VPATH)}vm_debug.h {$(VPATH)}id.h {$(VPATH)}method.h {$(VPATH)}thread_$(THREAD_MODEL).h {$(VPATH)}thread_native.h
-struct.$(OBJEXT): {$(VPATH)}struct.c $(RUBY_H_INCLUDES) {$(VPATH)}internal.h
-thread.$(OBJEXT): {$(VPATH)}thread.c {$(VPATH)}eval_intern.h \
- $(RUBY_H_INCLUDES) {$(VPATH)}gc.h $(VM_CORE_H_INCLUDES) \
- {$(VPATH)}thread_$(THREAD_MODEL).c $(ENCODING_H_INCLUDES) \
- {$(VPATH)}internal.h {$(VPATH)}io.h {$(VPATH)}thread.h {$(VPATH)}timev.h {$(VPATH)}vm_opts.h
-transcode.$(OBJEXT): {$(VPATH)}transcode.c $(RUBY_H_INCLUDES) \
- $(ENCODING_H_INCLUDES) {$(VPATH)}transcode_data.h {$(VPATH)}internal.h
-cont.$(OBJEXT): {$(VPATH)}cont.c $(RUBY_H_INCLUDES) \
- $(VM_CORE_H_INCLUDES) {$(VPATH)}gc.h {$(VPATH)}eval_intern.h \
- {$(VPATH)}internal.h {$(VPATH)}vm_opts.h
-time.$(OBJEXT): {$(VPATH)}time.c $(RUBY_H_INCLUDES) \
- $(ENCODING_H_INCLUDES) {$(VPATH)}timev.h {$(VPATH)}internal.h
-util.$(OBJEXT): {$(VPATH)}util.c $(RUBY_H_INCLUDES) {$(VPATH)}util.h \
- {$(VPATH)}internal.h
-variable.$(OBJEXT): {$(VPATH)}variable.c $(RUBY_H_INCLUDES) \
- {$(VPATH)}node.h {$(VPATH)}util.h {$(VPATH)}encoding.h {$(VPATH)}id.h \
- {$(VPATH)}oniguruma.h {$(VPATH)}internal.h {$(VPATH)}constant.h
-version.$(OBJEXT): {$(VPATH)}version.c $(RUBY_H_INCLUDES) \
- $(srcdir)/include/ruby/version.h $(srcdir)/version.h $(srcdir)/revision.h {$(VPATH)}config.h
-loadpath.$(OBJEXT): {$(VPATH)}loadpath.c $(RUBY_H_INCLUDES) \
- $(srcdir)/include/ruby/version.h $(srcdir)/version.h {$(VPATH)}config.h \
- verconf.h
-localeinit.$(OBJEXT): {$(VPATH)}localeinit.c $(RUBY_H_INCLUDES) \
- $(ENCODING_H_INCLUDES) {$(VPATH)}internal.h
-miniinit.$(OBJEXT): {$(VPATH)}miniinit.c $(RUBY_H_INCLUDES) \
- $(ENCODING_H_INCLUDES)
-
-compile.$(OBJEXT): {$(VPATH)}compile.c {$(VPATH)}iseq.h \
- $(RUBY_H_INCLUDES) $(VM_CORE_H_INCLUDES) {$(VPATH)}insns.inc \
- {$(VPATH)}insns_info.inc {$(VPATH)}optinsn.inc \
- {$(VPATH)}optunifs.inc {$(VPATH)}opt_sc.inc {$(VPATH)}insns.inc \
- {$(VPATH)}internal.h {$(VPATH)}vm_opts.h
-iseq.$(OBJEXT): {$(VPATH)}iseq.c {$(VPATH)}gc.h {$(VPATH)}iseq.h \
- $(RUBY_H_INCLUDES) $(VM_CORE_H_INCLUDES) {$(VPATH)}insns.inc \
- {$(VPATH)}insns_info.inc {$(VPATH)}node_name.inc {$(VPATH)}internal.h {$(VPATH)}vm_opts.h {$(VPATH)}ruby_atomic.h {$(VPATH)}eval_intern.h
-vm.$(OBJEXT): {$(VPATH)}vm.c {$(VPATH)}gc.h {$(VPATH)}iseq.h \
- {$(VPATH)}eval_intern.h $(RUBY_H_INCLUDES) $(ENCODING_H_INCLUDES) \
- $(VM_CORE_H_INCLUDES) {$(VPATH)}vm_method.c {$(VPATH)}vm_eval.c \
- {$(VPATH)}vm_insnhelper.c {$(VPATH)}vm_insnhelper.h {$(VPATH)}vm_exec.c \
- {$(VPATH)}vm_exec.h {$(VPATH)}insns.def {$(VPATH)}vmtc.inc \
- {$(VPATH)}vm.inc {$(VPATH)}insns.inc \
- {$(VPATH)}internal.h {$(VPATH)}vm.h {$(VPATH)}constant.h \
- $(PROBES_H_INCLUDES) {$(VPATH)}probes_helper.h {$(VPATH)}vm_opts.h
-vm_dump.$(OBJEXT): {$(VPATH)}vm_dump.c $(RUBY_H_INCLUDES) \
- $(VM_CORE_H_INCLUDES) {$(VPATH)}addr2line.h \
- {$(VPATH)}internal.h {$(VPATH)}vm_opts.h
-debug.$(OBJEXT): {$(VPATH)}debug.c $(RUBY_H_INCLUDES) \
- $(ENCODING_H_INCLUDES) $(VM_CORE_H_INCLUDES) {$(VPATH)}eval_intern.h \
- {$(VPATH)}util.h {$(VPATH)}vm_opts.h {$(VPATH)}internal.h
-id.$(OBJEXT): {$(VPATH)}id.c $(RUBY_H_INCLUDES) {$(VPATH)}id.h {$(VPATH)}vm_opts.h
-vm_backtrace.$(OBJEXT): {$(VPATH)}vm_backtrace.c \
- $(VM_CORE_H_INCLUDES) $(RUBY_H_INCLUDES) $(ENCODING_H_INCLUDES) \
- {$(VPATH)}internal.h {$(VPATH)}iseq.h {$(VPATH)}debug.h {$(VPATH)}vm_opts.h {$(VPATH)}ruby_atomic.h {$(VPATH)}eval_intern.h
-vm_trace.$(OBJEXT): {$(VPATH)}vm_trace.c $(ENCODING_H_INCLUDES) \
- $(VM_CORE_H_INCLUDES) $(RUBY_H_INCLUDES) {$(VPATH)}debug.h \
- {$(VPATH)}internal.h {$(VPATH)}vm_opts.h {$(VPATH)}ruby_atomic.h {$(VPATH)}eval_intern.h
-miniprelude.$(OBJEXT): {$(VPATH)}miniprelude.c $(RUBY_H_INCLUDES) \
- $(VM_CORE_H_INCLUDES) {$(VPATH)}internal.h {$(VPATH)}vm_opts.h
-prelude.$(OBJEXT): {$(VPATH)}prelude.c $(RUBY_H_INCLUDES) \
- $(VM_CORE_H_INCLUDES) {$(VPATH)}internal.h {$(VPATH)}vm_opts.h
-golf_prelude.$(OBJEXT): {$(VPATH)}golf_prelude.c $(RUBY_H_INCLUDES) \
- $(VM_CORE_H_INCLUDES) {$(VPATH)}internal.h {$(VPATH)}vm_opts.h
-goruby.$(OBJEXT): {$(VPATH)}goruby.c {$(VPATH)}main.c $(RUBY_H_INCLUDES) \
- {$(VPATH)}vm_debug.h {$(VPATH)}node.h $(hdrdir)/ruby.h
-
-sizes.$(OBJEXT): {$(VPATH)}sizes.c $(RUBY_H_INCLUDES)
-
-ascii.$(OBJEXT): {$(VPATH)}ascii.c {$(VPATH)}regenc.h {$(VPATH)}config.h \
- {$(VPATH)}oniguruma.h {$(VPATH)}missing.h $(RUBY_H_INCLUDES)
-us_ascii.$(OBJEXT): {$(VPATH)}us_ascii.c {$(VPATH)}regenc.h \
- {$(VPATH)}config.h {$(VPATH)}oniguruma.h {$(VPATH)}missing.h $(RUBY_H_INCLUDES)
-unicode.$(OBJEXT): {$(VPATH)}unicode.c {$(VPATH)}regint.h \
- {$(VPATH)}config.h {$(VPATH)}defines.h {$(VPATH)}regenc.h \
- {$(VPATH)}oniguruma.h {$(VPATH)}st.h {$(VPATH)}ruby.h \
- {$(VPATH)}missing.h {$(VPATH)}intern.h \
- {$(VPATH)}enc/unicode/name2ctype.h {$(VPATH)}enc/unicode/casefold.h \
- {$(VPATH)}subst.h $(RUBY_H_INCLUDES)
-
-utf_8.$(OBJEXT): {$(VPATH)}utf_8.c {$(VPATH)}regenc.h {$(VPATH)}config.h \
- {$(VPATH)}oniguruma.h {$(VPATH)}missing.h $(RUBY_H_INCLUDES)
-
-win32/win32.$(OBJEXT): {$(VPATH)}win32/win32.c {$(VPATH)}dln.h {$(VPATH)}dln_find.c \
- {$(VPATH)}internal.h $(RUBY_H_INCLUDES) $(PLATFORM_D)
-win32/file.$(OBJEXT): {$(VPATH)}win32/file.c $(RUBY_H_INCLUDES) $(PLATFORM_D)
+# dependencies for generated C sources.
+parse.$(OBJEXT): {$(VPATH)}parse.c
+miniprelude.$(OBJEXT): {$(VPATH)}miniprelude.c
+prelude.$(OBJEXT): {$(VPATH)}prelude.c
+
+# dependencies for optional sources.
+compile.$(OBJEXT): {$(VPATH)}opt_sc.inc {$(VPATH)}optunifs.inc
+
+win32/win32.$(OBJEXT): {$(VPATH)}win32/win32.c {$(VPATH)}win32/file.h \
+ {$(VPATH)}dln.h {$(VPATH)}dln_find.c {$(VPATH)}encindex.h \
+ {$(VPATH)}internal.h {$(VPATH)}util.h $(RUBY_H_INCLUDES) $(PLATFORM_D)
+win32/file.$(OBJEXT): {$(VPATH)}win32/file.c {$(VPATH)}win32/file.h \
+ $(RUBY_H_INCLUDES) $(PLATFORM_D)
$(NEWLINE_C): $(srcdir)/enc/trans/newline.trans $(srcdir)/tool/transcode-tblgen.rb
+ $(Q) $(MAKEDIRS) $(@D)
$(Q) $(BASERUBY) "$(srcdir)/tool/transcode-tblgen.rb" -vo $@ $(srcdir)/enc/trans/newline.trans
-newline.$(OBJEXT): $(NEWLINE_C) {$(VPATH)}defines.h \
- {$(VPATH)}intern.h {$(VPATH)}missing.h {$(VPATH)}st.h \
- {$(VPATH)}transcode_data.h {$(VPATH)}ruby.h {$(VPATH)}config.h {$(VPATH)}subst.h
+enc/trans/newline.$(OBJEXT): $(NEWLINE_C)
-verconf.h: $(srcdir)/template/verconf.h.in $(srcdir)/tool/generic_erb.rb $(RBCONFIG)
+verconf.h: $(srcdir)/template/verconf.h.tmpl $(srcdir)/tool/generic_erb.rb
$(ECHO) creating $@
- $(Q) $(MINIRUBY) "$(srcdir)/tool/generic_erb.rb" $(srcdir)/template/verconf.h.in > $@
-
-DTRACE_DEPENDENT_OBJS = array.$(OBJEXT) \
- eval.$(OBJEXT) \
- gc.$(OBJEXT) \
- hash.$(OBJEXT) \
- load.$(OBJEXT) \
- object.$(OBJEXT) \
- parse.$(OBJEXT) \
- string.$(OBJEXT) \
- vm.$(OBJEXT)
+ $(Q) $(BOOTSTRAPRUBY) "$(srcdir)/tool/generic_erb.rb" -o $@ $(srcdir)/template/verconf.h.tmpl
-probes.$(OBJEXT): $(DTRACE_DEPENDENT_OBJS)
-ruby-glommed.$(OBJEXT): $(OBJS) $(DTRACE_OBJ)
+ruby-glommed.$(OBJEXT): $(OBJS)
$(OBJS): {$(VPATH)}config.h {$(VPATH)}missing.h
@@ -880,20 +771,31 @@ INSNS2VMOPT = --srcdir="$(srcdir)"
{$(VPATH)}vm.inc: $(srcdir)/template/vm.inc.tmpl
-srcs: {$(VPATH)}parse.c {$(VPATH)}lex.c {$(VPATH)}newline.c {$(VPATH)}id.c srcs-ext srcs-enc
+common-srcs: {$(VPATH)}parse.c {$(VPATH)}lex.c {$(VPATH)}enc/trans/newline.c {$(VPATH)}id.c \
+ srcs-lib srcs-ext
-EXT_SRCS = $(srcdir)/ext/ripper/ripper.c $(srcdir)/ext/json/parser/parser.c \
- $(srcdir)/ext/dl/callback/callback.c $(srcdir)/ext/rbconfig/sizeof/sizes.c
+srcs: common-srcs srcs-enc
+
+EXT_SRCS = $(srcdir)/ext/ripper/ripper.c \
+ $(srcdir)/ext/rbconfig/sizeof/sizes.c
srcs-ext: $(EXT_SRCS)
+srcs-extra: $(srcdir)/ext/json/parser/parser.c
+
+LIB_SRCS = $(srcdir)/lib/unicode_normalize/tables.rb
+
+srcs-lib: $(LIB_SRCS)
+
srcs-enc: $(ENC_MK)
$(ECHO) making srcs under enc
$(Q) $(MAKE) -f $(ENC_MK) RUBY="$(MINIRUBY)" MINIRUBY="$(MINIRUBY)" $(MFLAGS) srcs
-all-incs: incs
-incs: $(INSNS) {$(VPATH)}node_name.inc {$(VPATH)}encdb.h {$(VPATH)}transdb.h {$(VPATH)}known_errors.inc \
- $(srcdir)/revision.h $(REVISION_H) enc/unicode/name2ctype.h {$(VPATH)}id.h {$(VPATH)}probes.dmyh
+all-incs: incs {$(VPATH)}encdb.h {$(VPATH)}transdb.h
+incs: $(INSNS) {$(VPATH)}node_name.inc {$(VPATH)}known_errors.inc \
+ {$(VPATH)}vm_call_iseq_optimized.inc $(srcdir)/revision.h \
+ $(REVISION_H) enc/unicode/name2ctype.h enc/jis/props.h \
+ {$(VPATH)}id.h {$(VPATH)}probes.dmyh
insns: $(INSNS)
@@ -925,20 +827,27 @@ known_errors.inc: $(srcdir)/template/known_errors.inc.tmpl $(srcdir)/defs/known_
$(ECHO) generating $@
$(Q) $(BASERUBY) $(srcdir)/tool/generic_erb.rb -c -o $@ $(srcdir)/template/known_errors.inc.tmpl $(srcdir)/defs/known_errors.def
-$(MINIPRELUDE_C): $(srcdir)/tool/compile_prelude.rb $(srcdir)/prelude.rb
+vm_call_iseq_optimized.inc: $(srcdir)/tool/mk_call_iseq_optimized.rb
+ $(ECHO) generating $@
+ $(Q) $(BASERUBY) $(srcdir)/tool/mk_call_iseq_optimized.rb > $@
+
+$(MINIPRELUDE_C): $(COMPILE_PRELUDE)
$(ECHO) generating $@
- $(Q) $(BASERUBY) -I$(srcdir) $(srcdir)/tool/compile_prelude.rb $(srcdir)/prelude.rb $@
+ $(Q) $(BASERUBY) $(srcdir)/tool/generic_erb.rb -I$(srcdir) -o $@ \
+ $(srcdir)/template/prelude.c.tmpl
-prelude.c: $(srcdir)/tool/compile_prelude.rb $(RBCONFIG) \
- $(srcdir)/lib/rubygems/defaults.rb \
- $(srcdir)/lib/rubygems/core_ext/kernel_gem.rb \
- $(PRELUDE_SCRIPTS) $(PREP)
+$(PRELUDE_C): $(COMPILE_PRELUDE) \
+ {$(srcdir)}lib/rubygems/defaults.rb \
+ {$(srcdir)}lib/rubygems/core_ext/kernel_gem.rb \
+ $(PRELUDE_SCRIPTS) $(LIB_SRCS)
$(ECHO) generating $@
- $(Q) $(COMPILE_PRELUDE) $(PRELUDE_SCRIPTS) $@
+ $(Q) $(BASERUBY) $(srcdir)/tool/generic_erb.rb -I$(srcdir) -c -o $@ \
+ $(srcdir)/template/prelude.c.tmpl $(PRELUDE_SCRIPTS)
-golf_prelude.c: $(srcdir)/tool/compile_prelude.rb $(RBCONFIG) $(srcdir)/prelude.rb $(srcdir)/golf_prelude.rb $(PREP)
+{$(VPATH)}golf_prelude.c: $(COMPILE_PRELUDE) {$(srcdir)}golf_prelude.rb
$(ECHO) generating $@
- $(Q) $(COMPILE_PRELUDE) $(srcdir)/golf_prelude.rb $@
+ $(Q) $(BASERUBY) $(srcdir)/tool/generic_erb.rb -I$(srcdir) -c -o $@ \
+ $(srcdir)/template/prelude.c.tmpl golf_prelude.rb
probes.dmyh: {$(srcdir)}probes.d $(srcdir)/tool/gen_dummy_probes.rb
$(BASERUBY) $(srcdir)/tool/gen_dummy_probes.rb $(srcdir)/probes.d > $@
@@ -947,6 +856,7 @@ probes.h: {$(VPATH)}probes.$(DTRACE_EXT)
prereq: incs srcs preludes PHONY
+preludes: {$(VPATH)}prelude.c
preludes: {$(VPATH)}miniprelude.c
preludes: {$(srcdir)}golf_prelude.c
@@ -959,23 +869,23 @@ $(REVISION_H): $(srcdir)/version.h $(srcdir)/ChangeLog $(srcdir)/tool/file2lastr
$(srcdir)/ext/ripper/ripper.c: parse.y id.h
$(ECHO) generating $@
- $(Q) $(CHDIR) $(@D) && $(exec) $(MAKE) -f depend $(MFLAGS) \
- Q=$(Q) ECHO=$(ECHO) top_srcdir=../.. srcdir=. VPATH=../.. RUBY="$(BASERUBY)" PATH_SEPARATOR="$(PATH_SEPARATOR)"
+ $(Q) $(CHDIR) $(@D) && \
+ sed /AUTOGENERATED/q depend | \
+ $(exec) $(MAKE) -f - $(MFLAGS) \
+ Q=$(Q) ECHO=$(ECHO) RM="$(RM)" top_srcdir=../.. srcdir=. VPATH="$(PWD)" \
+ RUBY="$(BASERUBY)" PATH_SEPARATOR="$(PATH_SEPARATOR)"
$(srcdir)/ext/json/parser/parser.c: $(srcdir)/ext/json/parser/parser.rl
$(ECHO) generating $@
$(Q) $(CHDIR) $(@D) && $(exec) $(MAKE) -f prereq.mk $(MFLAGS) \
Q=$(Q) ECHO=$(ECHO) top_srcdir=../../.. srcdir=. VPATH=../../.. BASERUBY="$(BASERUBY)"
-$(srcdir)/ext/dl/callback/callback.c: $(srcdir)/ext/dl/callback/mkcallback.rb $(srcdir)/ext/dl/dl.h
- $(ECHO) generating $@
- $(Q) $(CHDIR) $(@D) && $(exec) $(MAKE) -f depend $(MFLAGS) \
- Q=$(Q) ECHO=$(ECHO) top_srcdir=../.. srcdir=. VPATH=../.. RUBY="$(BASERUBY)"
-
$(srcdir)/ext/rbconfig/sizeof/sizes.c: $(srcdir)/ext/rbconfig/sizeof/depend \
$(srcdir)/tool/generic_erb.rb $(srcdir)/template/sizes.c.tmpl $(srcdir)/configure.in
$(ECHO) generating $@
- $(Q) $(CHDIR) $(@D) && $(exec) $(MAKE) -f depend $(MFLAGS) \
+ $(Q) $(CHDIR) $(@D) && \
+ sed /AUTOGENERATED/q depend | \
+ $(exec) $(MAKE) -f - $(MFLAGS) \
Q=$(Q) ECHO=$(ECHO) top_srcdir=../../.. srcdir=. VPATH=../../.. RUBY="$(BASERUBY)"
##
@@ -999,6 +909,11 @@ COMPARE_RUBY = $(BASERUBY)
ITEM =
OPTS =
+# You can pass several options through OPTS environment variable.
+# $ make benchmark OPTS="--help" displays more detail.
+# for example,
+# $ make benchmark COMPARE_RUBY="ruby-trunk" OPTS="-e ruby-2.2.2"
+# This command compares trunk and built-ruby and 2.2.2
benchmark: $(PROGRAM) PHONY
$(BASERUBY) $(srcdir)/benchmark/driver.rb -v \
--executables="$(COMPARE_RUBY); built-ruby::$(RUNRUBY)" \
@@ -1036,38 +951,123 @@ gdb-ruby: $(PROGRAM) run.gdb PHONY
$(Q) $(RUNRUBY_COMMAND) $(RUNRUBY_DEBUGGER) -- $(TESTRUN_SCRIPT)
dist:
- $(BASERUBY) $(srcdir)/tool/make-snapshot tmp $(RELNAME)
+ $(BASERUBY) $(srcdir)/tool/make-snapshot -srcdir=$(srcdir) tmp $(RELNAME)
up::
- -$(Q)$(MAKE) $(MFLAGS) REVISION_FORCE=PHONY "$(REVISION_H)"
+ -$(Q)$(MAKE) $(MFLAGS) Q=$(Q) REVISION_FORCE=PHONY "$(REVISION_H)"
-update-config_files: $(srcdir)/tool/config.guess $(srcdir)/tool/config.sub
-$(srcdir)/tool/config.guess:
- $(Q) $(BASERUBY) -C $(@D) get-config_files $(@F)
-$(srcdir)/tool/config.sub:
- $(Q) $(BASERUBY) -C $(@D) get-config_files $(@F)
+up::
+ -$(Q)$(MAKE) $(MFLAGS) Q=$(Q) after-update
+
+after-update:: update-unicode update-gems extract-extlibs
+
+update-config_files: PHONY
+ $(Q) $(BASERUBY) -C "$(srcdir)/tool" \
+ ../tool/downloader.rb -e gnu \
+ config.guess config.sub
+
+update-gems: PHONY
+ $(ECHO) Downloading bundled gem files...
+ $(Q) $(BASERUBY) -C "$(srcdir)/gems" \
+ -I../tool -rdownloader -answ \
+ -e 'gem, ver = *$$F' \
+ -e 'old = Dir.glob("#{gem}-*.gem")' \
+ -e 'gem = "#{gem}-#{ver}.gem"' \
+ -e 'Downloader::RubyGems.download(gem, nil, nil) and' \
+ -e 'File.unlink(*(old-[gem]))' \
+ bundled_gems
+
+extract-gems: PHONY
+ $(ECHO) Extracting bundled gem files...
+ $(Q) $(RUNRUBY) -C "$(srcdir)/gems" \
+ -I../tool -rgem-unpack -answ \
+ -e 'gem, ver = *$$F' \
+ -e 'Gem.unpack("#{gem}-#{ver}.gem")' \
+ bundled_gems
+
+UPDATE_LIBRARIES = no
+
+### set the following environment variable or uncomment the line if
+### the Unicode data files are updated every minute.
+# ALWAYS_UPDATE_UNICODE = yes
+
+UNICODE_FILES = $(srcdir)/enc/unicode/data/$(UNICODE_VERSION)/UnicodeData.txt \
+ $(srcdir)/enc/unicode/data/$(UNICODE_VERSION)/CompositionExclusions.txt \
+ $(srcdir)/enc/unicode/data/$(UNICODE_VERSION)/NormalizationTest.txt
+
+update-unicode: $(UNICODE_FILES) PHONY
+
+UNICODE_FILES_DEPS0 = $(UPDATE_LIBRARIES:yes=download-unicode-data)
+UNICODE_FILES_DEPS = $(UNICODE_FILES_DEPS0:no=)
+$(UNICODE_FILES): $(UNICODE_FILES_DEPS)
+
+download-unicode-data: ./.unicode-$(UNICODE_VERSION).time
+./.unicode-$(UNICODE_VERSION).time: PHONY
+ $(ECHO) Downloading Unicode $(UNICODE_VERSION) data files...
+ $(Q) $(MAKEDIRS) "$(srcdir)/enc/unicode/data/$(UNICODE_VERSION)"
+ $(Q) $(BASERUBY) -C "$(srcdir)" tool/downloader.rb \
+ -d enc/unicode/data/$(UNICODE_VERSION) \
+ -e $(ALWAYS_UPDATE_UNICODE:yes=-a) unicode \
+ $(UNICODE_VERSION)/ucd/UnicodeData.txt \
+ $(UNICODE_VERSION)/ucd/CompositionExclusions.txt \
+ $(UNICODE_VERSION)/ucd/NormalizationTest.txt
+ @exit > $@
+
+$(srcdir)/$(HAVE_BASERUBY:yes=lib/unicode_normalize/tables.rb): \
+ $(UNICODE_FILES_DEPS:download-unicode-data=./.unicode-tables.time)
+
+./.unicode-tables.time: $(srcdir)/tool/generic_erb.rb \
+ $(UNICODE_FILES) $(UNICODE_FILES_DEPS) \
+ $(srcdir)/template/unicode_norm_gen.tmpl
+ $(Q) $(BASERUBY) $(srcdir)/tool/generic_erb.rb \
+ -c -t$@ -o $(srcdir)/lib/unicode_normalize/tables.rb \
+ -I $(srcdir) \
+ $(srcdir)/template/unicode_norm_gen.tmpl \
+ enc/unicode/data/$(UNICODE_VERSION) lib/unicode_normalize
+
+download-extlibs:
+ $(Q) $(BASERUBY) -C $(srcdir) -w tool/extlibs.rb --download ext
+
+extract-extlibs:
+ $(Q) $(BASERUBY) -C $(srcdir) -w tool/extlibs.rb --all ext
+
+clean-extlibs:
+ $(Q) $(RMALL) $(srcdir)/.downloaded-cache
+
+clean-gems:
+ $(Q) $(RM) gems/*.gem
+
+CLEAN_CACHE = clean-extlibs
info: info-program info-libruby_a info-libruby_so info-arch
-info-program:
+info-program: PHONY
@echo PROGRAM=$(PROGRAM)
-info-libruby_a:
+info-libruby_a: PHONY
@echo LIBRUBY_A=$(LIBRUBY_A)
-info-libruby_so:
+info-libruby_so: PHONY
@echo LIBRUBY_SO=$(LIBRUBY_SO)
-info-arch:
+info-arch: PHONY
@echo arch=$(arch)
change: PHONY
$(BASERUBY) -C "$(srcdir)" ./tool/change_maker.rb $(CHANGES) > change.log
-love: sudo-precheck up all test install test-all
+exam: check test-rubyspec
+
+love: sudo-precheck up all test install check
@echo love is all you need
yes-test-all: sudo-precheck
-sudo-precheck:
+sudo-precheck: PHONY
@$(SUDO) echo > $(NULL)
+update-man-date: PHONY
+ -$(Q) $(BASERUBY) -I"$(srcdir)/tool" -rvcs -i -p \
+ -e 'BEGIN{@vcs=VCS.detect(ARGV.shift)}' \
+ -e '$$_.sub!(/^(\.Dd ).*/){$$1+@vcs.modified(ARGF.path).strftime("%B %d, %Y")}' \
+ "$(srcdir)" "$(srcdir)"/man/*.1
+
help: PHONY
$(MESSAGE_BEGIN) \
" Makefile of Ruby" \
@@ -1084,11 +1084,12 @@ help: PHONY
" gdb: runs test.rb by miniruby under gdb" \
" gdb-ruby: runs test.rb by ruby under gdb" \
" check: equals make test test-all" \
+ " exam: equals make check test-rubyspec" \
" test: ruby core tests" \
- " test-all: all ruby tests [TESTS=<test files>]" \
+ " test-all: all ruby tests [TESTOPTS=-j4 TESTS=\"<test files>\"]" \
" test-rubyspec: run RubySpec test suite" \
" update-rubyspec: update local copy of RubySpec" \
- " benchmark: benchmark this ruby and COMPARE_RUBY" \
+ " benchmark: benchmark this ruby and COMPARE_RUBY." \
" gcbench: gc benchmark [GCBENCH_ITEM=<item_name>]" \
" gcbench-rdoc: gc benchmark with GCBENCH_ITEM=rdoc" \
" install: install all ruby distributions" \
@@ -1100,5 +1101,1411 @@ help: PHONY
" golf: for golfers" \
"" \
"see DeveloperHowto for more detail: " \
- " http://bugs.ruby-lang.org/wiki/ruby/DeveloperHowto" \
+ " https://bugs.ruby-lang.org/projects/ruby/wiki/DeveloperHowto" \
$(MESSAGE_END)
+
+# AUTOGENERATED DEPENDENCIES START
+addr2line.$(OBJEXT): {$(VPATH)}addr2line.c
+addr2line.$(OBJEXT): {$(VPATH)}addr2line.h
+addr2line.$(OBJEXT): {$(VPATH)}config.h
+addr2line.$(OBJEXT): {$(VPATH)}missing.h
+array.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+array.$(OBJEXT): $(top_srcdir)/include/ruby.h
+array.$(OBJEXT): {$(VPATH)}array.c
+array.$(OBJEXT): {$(VPATH)}config.h
+array.$(OBJEXT): {$(VPATH)}defines.h
+array.$(OBJEXT): {$(VPATH)}encoding.h
+array.$(OBJEXT): {$(VPATH)}id.h
+array.$(OBJEXT): {$(VPATH)}intern.h
+array.$(OBJEXT): {$(VPATH)}internal.h
+array.$(OBJEXT): {$(VPATH)}io.h
+array.$(OBJEXT): {$(VPATH)}missing.h
+array.$(OBJEXT): {$(VPATH)}oniguruma.h
+array.$(OBJEXT): {$(VPATH)}probes.h
+array.$(OBJEXT): {$(VPATH)}st.h
+array.$(OBJEXT): {$(VPATH)}subst.h
+array.$(OBJEXT): {$(VPATH)}util.h
+array.$(OBJEXT): {$(VPATH)}vm_opts.h
+bignum.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+bignum.$(OBJEXT): $(top_srcdir)/include/ruby.h
+bignum.$(OBJEXT): {$(VPATH)}bignum.c
+bignum.$(OBJEXT): {$(VPATH)}config.h
+bignum.$(OBJEXT): {$(VPATH)}defines.h
+bignum.$(OBJEXT): {$(VPATH)}encoding.h
+bignum.$(OBJEXT): {$(VPATH)}intern.h
+bignum.$(OBJEXT): {$(VPATH)}internal.h
+bignum.$(OBJEXT): {$(VPATH)}io.h
+bignum.$(OBJEXT): {$(VPATH)}missing.h
+bignum.$(OBJEXT): {$(VPATH)}oniguruma.h
+bignum.$(OBJEXT): {$(VPATH)}st.h
+bignum.$(OBJEXT): {$(VPATH)}subst.h
+bignum.$(OBJEXT): {$(VPATH)}thread.h
+bignum.$(OBJEXT): {$(VPATH)}util.h
+class.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
+class.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
+class.$(OBJEXT): $(CCAN_DIR)/list/list.h
+class.$(OBJEXT): $(CCAN_DIR)/str/str.h
+class.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+class.$(OBJEXT): $(top_srcdir)/include/ruby.h
+class.$(OBJEXT): {$(VPATH)}class.c
+class.$(OBJEXT): {$(VPATH)}config.h
+class.$(OBJEXT): {$(VPATH)}constant.h
+class.$(OBJEXT): {$(VPATH)}defines.h
+class.$(OBJEXT): {$(VPATH)}encoding.h
+class.$(OBJEXT): {$(VPATH)}id.h
+class.$(OBJEXT): {$(VPATH)}id_table.h
+class.$(OBJEXT): {$(VPATH)}intern.h
+class.$(OBJEXT): {$(VPATH)}internal.h
+class.$(OBJEXT): {$(VPATH)}io.h
+class.$(OBJEXT): {$(VPATH)}method.h
+class.$(OBJEXT): {$(VPATH)}missing.h
+class.$(OBJEXT): {$(VPATH)}node.h
+class.$(OBJEXT): {$(VPATH)}oniguruma.h
+class.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+class.$(OBJEXT): {$(VPATH)}st.h
+class.$(OBJEXT): {$(VPATH)}subst.h
+class.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
+class.$(OBJEXT): {$(VPATH)}thread_native.h
+class.$(OBJEXT): {$(VPATH)}vm_core.h
+class.$(OBJEXT): {$(VPATH)}vm_debug.h
+class.$(OBJEXT): {$(VPATH)}vm_opts.h
+compar.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+compar.$(OBJEXT): {$(VPATH)}compar.c
+compar.$(OBJEXT): {$(VPATH)}config.h
+compar.$(OBJEXT): {$(VPATH)}defines.h
+compar.$(OBJEXT): {$(VPATH)}intern.h
+compar.$(OBJEXT): {$(VPATH)}missing.h
+compar.$(OBJEXT): {$(VPATH)}st.h
+compar.$(OBJEXT): {$(VPATH)}subst.h
+compile.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
+compile.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
+compile.$(OBJEXT): $(CCAN_DIR)/list/list.h
+compile.$(OBJEXT): $(CCAN_DIR)/str/str.h
+compile.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+compile.$(OBJEXT): $(top_srcdir)/include/ruby.h
+compile.$(OBJEXT): {$(VPATH)}compile.c
+compile.$(OBJEXT): {$(VPATH)}config.h
+compile.$(OBJEXT): {$(VPATH)}defines.h
+compile.$(OBJEXT): {$(VPATH)}encindex.h
+compile.$(OBJEXT): {$(VPATH)}encoding.h
+compile.$(OBJEXT): {$(VPATH)}gc.h
+compile.$(OBJEXT): {$(VPATH)}id.h
+compile.$(OBJEXT): {$(VPATH)}insns.inc
+compile.$(OBJEXT): {$(VPATH)}insns_info.inc
+compile.$(OBJEXT): {$(VPATH)}intern.h
+compile.$(OBJEXT): {$(VPATH)}internal.h
+compile.$(OBJEXT): {$(VPATH)}io.h
+compile.$(OBJEXT): {$(VPATH)}iseq.h
+compile.$(OBJEXT): {$(VPATH)}method.h
+compile.$(OBJEXT): {$(VPATH)}missing.h
+compile.$(OBJEXT): {$(VPATH)}node.h
+compile.$(OBJEXT): {$(VPATH)}oniguruma.h
+compile.$(OBJEXT): {$(VPATH)}optinsn.inc
+compile.$(OBJEXT): {$(VPATH)}re.h
+compile.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+compile.$(OBJEXT): {$(VPATH)}st.h
+compile.$(OBJEXT): {$(VPATH)}subst.h
+compile.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
+compile.$(OBJEXT): {$(VPATH)}thread_native.h
+compile.$(OBJEXT): {$(VPATH)}vm_core.h
+compile.$(OBJEXT): {$(VPATH)}vm_debug.h
+compile.$(OBJEXT): {$(VPATH)}vm_opts.h
+complex.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+complex.$(OBJEXT): $(top_srcdir)/include/ruby.h
+complex.$(OBJEXT): {$(VPATH)}complex.c
+complex.$(OBJEXT): {$(VPATH)}config.h
+complex.$(OBJEXT): {$(VPATH)}defines.h
+complex.$(OBJEXT): {$(VPATH)}encoding.h
+complex.$(OBJEXT): {$(VPATH)}intern.h
+complex.$(OBJEXT): {$(VPATH)}internal.h
+complex.$(OBJEXT): {$(VPATH)}io.h
+complex.$(OBJEXT): {$(VPATH)}missing.h
+complex.$(OBJEXT): {$(VPATH)}oniguruma.h
+complex.$(OBJEXT): {$(VPATH)}st.h
+complex.$(OBJEXT): {$(VPATH)}subst.h
+cont.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
+cont.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
+cont.$(OBJEXT): $(CCAN_DIR)/list/list.h
+cont.$(OBJEXT): $(CCAN_DIR)/str/str.h
+cont.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+cont.$(OBJEXT): $(top_srcdir)/include/ruby.h
+cont.$(OBJEXT): {$(VPATH)}config.h
+cont.$(OBJEXT): {$(VPATH)}cont.c
+cont.$(OBJEXT): {$(VPATH)}defines.h
+cont.$(OBJEXT): {$(VPATH)}encoding.h
+cont.$(OBJEXT): {$(VPATH)}eval_intern.h
+cont.$(OBJEXT): {$(VPATH)}gc.h
+cont.$(OBJEXT): {$(VPATH)}id.h
+cont.$(OBJEXT): {$(VPATH)}intern.h
+cont.$(OBJEXT): {$(VPATH)}internal.h
+cont.$(OBJEXT): {$(VPATH)}io.h
+cont.$(OBJEXT): {$(VPATH)}method.h
+cont.$(OBJEXT): {$(VPATH)}missing.h
+cont.$(OBJEXT): {$(VPATH)}node.h
+cont.$(OBJEXT): {$(VPATH)}oniguruma.h
+cont.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+cont.$(OBJEXT): {$(VPATH)}st.h
+cont.$(OBJEXT): {$(VPATH)}subst.h
+cont.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
+cont.$(OBJEXT): {$(VPATH)}thread_native.h
+cont.$(OBJEXT): {$(VPATH)}vm_core.h
+cont.$(OBJEXT): {$(VPATH)}vm_debug.h
+cont.$(OBJEXT): {$(VPATH)}vm_opts.h
+debug.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
+debug.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
+debug.$(OBJEXT): $(CCAN_DIR)/list/list.h
+debug.$(OBJEXT): $(CCAN_DIR)/str/str.h
+debug.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+debug.$(OBJEXT): $(top_srcdir)/include/ruby.h
+debug.$(OBJEXT): {$(VPATH)}config.h
+debug.$(OBJEXT): {$(VPATH)}debug.c
+debug.$(OBJEXT): {$(VPATH)}defines.h
+debug.$(OBJEXT): {$(VPATH)}encoding.h
+debug.$(OBJEXT): {$(VPATH)}eval_intern.h
+debug.$(OBJEXT): {$(VPATH)}id.h
+debug.$(OBJEXT): {$(VPATH)}intern.h
+debug.$(OBJEXT): {$(VPATH)}internal.h
+debug.$(OBJEXT): {$(VPATH)}io.h
+debug.$(OBJEXT): {$(VPATH)}method.h
+debug.$(OBJEXT): {$(VPATH)}missing.h
+debug.$(OBJEXT): {$(VPATH)}node.h
+debug.$(OBJEXT): {$(VPATH)}oniguruma.h
+debug.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+debug.$(OBJEXT): {$(VPATH)}st.h
+debug.$(OBJEXT): {$(VPATH)}subst.h
+debug.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
+debug.$(OBJEXT): {$(VPATH)}thread_native.h
+debug.$(OBJEXT): {$(VPATH)}util.h
+debug.$(OBJEXT): {$(VPATH)}vm_core.h
+debug.$(OBJEXT): {$(VPATH)}vm_debug.h
+debug.$(OBJEXT): {$(VPATH)}vm_opts.h
+dir.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+dir.$(OBJEXT): $(top_srcdir)/include/ruby.h
+dir.$(OBJEXT): {$(VPATH)}config.h
+dir.$(OBJEXT): {$(VPATH)}defines.h
+dir.$(OBJEXT): {$(VPATH)}dir.c
+dir.$(OBJEXT): {$(VPATH)}encindex.h
+dir.$(OBJEXT): {$(VPATH)}encoding.h
+dir.$(OBJEXT): {$(VPATH)}intern.h
+dir.$(OBJEXT): {$(VPATH)}internal.h
+dir.$(OBJEXT): {$(VPATH)}io.h
+dir.$(OBJEXT): {$(VPATH)}missing.h
+dir.$(OBJEXT): {$(VPATH)}oniguruma.h
+dir.$(OBJEXT): {$(VPATH)}st.h
+dir.$(OBJEXT): {$(VPATH)}subst.h
+dir.$(OBJEXT): {$(VPATH)}util.h
+dln.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+dln.$(OBJEXT): {$(VPATH)}config.h
+dln.$(OBJEXT): {$(VPATH)}defines.h
+dln.$(OBJEXT): {$(VPATH)}dln.c
+dln.$(OBJEXT): {$(VPATH)}dln.h
+dln.$(OBJEXT): {$(VPATH)}intern.h
+dln.$(OBJEXT): {$(VPATH)}missing.h
+dln.$(OBJEXT): {$(VPATH)}st.h
+dln.$(OBJEXT): {$(VPATH)}subst.h
+dln_find.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+dln_find.$(OBJEXT): {$(VPATH)}config.h
+dln_find.$(OBJEXT): {$(VPATH)}defines.h
+dln_find.$(OBJEXT): {$(VPATH)}dln.h
+dln_find.$(OBJEXT): {$(VPATH)}dln_find.c
+dln_find.$(OBJEXT): {$(VPATH)}intern.h
+dln_find.$(OBJEXT): {$(VPATH)}missing.h
+dln_find.$(OBJEXT): {$(VPATH)}st.h
+dln_find.$(OBJEXT): {$(VPATH)}subst.h
+dmydln.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+dmydln.$(OBJEXT): {$(VPATH)}config.h
+dmydln.$(OBJEXT): {$(VPATH)}defines.h
+dmydln.$(OBJEXT): {$(VPATH)}dmydln.c
+dmydln.$(OBJEXT): {$(VPATH)}intern.h
+dmydln.$(OBJEXT): {$(VPATH)}missing.h
+dmydln.$(OBJEXT): {$(VPATH)}st.h
+dmydln.$(OBJEXT): {$(VPATH)}subst.h
+dmyenc.$(OBJEXT): {$(VPATH)}dmyenc.c
+dmyext.$(OBJEXT): {$(VPATH)}dmyext.c
+enc/ascii.$(OBJEXT): {$(VPATH)}config.h
+enc/ascii.$(OBJEXT): {$(VPATH)}defines.h
+enc/ascii.$(OBJEXT): {$(VPATH)}enc/ascii.c
+enc/ascii.$(OBJEXT): {$(VPATH)}encindex.h
+enc/ascii.$(OBJEXT): {$(VPATH)}missing.h
+enc/ascii.$(OBJEXT): {$(VPATH)}oniguruma.h
+enc/ascii.$(OBJEXT): {$(VPATH)}regenc.h
+enc/trans/newline.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}config.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}defines.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}enc/trans/newline.c
+enc/trans/newline.$(OBJEXT): {$(VPATH)}intern.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}missing.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}st.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}subst.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}transcode_data.h
+enc/unicode.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+enc/unicode.$(OBJEXT): {$(VPATH)}config.h
+enc/unicode.$(OBJEXT): {$(VPATH)}defines.h
+enc/unicode.$(OBJEXT): {$(VPATH)}enc/unicode.c
+enc/unicode.$(OBJEXT): {$(VPATH)}enc/unicode/casefold.h
+enc/unicode.$(OBJEXT): {$(VPATH)}enc/unicode/name2ctype.h
+enc/unicode.$(OBJEXT): {$(VPATH)}intern.h
+enc/unicode.$(OBJEXT): {$(VPATH)}missing.h
+enc/unicode.$(OBJEXT): {$(VPATH)}oniguruma.h
+enc/unicode.$(OBJEXT): {$(VPATH)}regenc.h
+enc/unicode.$(OBJEXT): {$(VPATH)}regint.h
+enc/unicode.$(OBJEXT): {$(VPATH)}st.h
+enc/unicode.$(OBJEXT): {$(VPATH)}subst.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}config.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}defines.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}enc/us_ascii.c
+enc/us_ascii.$(OBJEXT): {$(VPATH)}encindex.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}missing.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}oniguruma.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}regenc.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}config.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}defines.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}enc/utf_8.c
+enc/utf_8.$(OBJEXT): {$(VPATH)}encindex.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}missing.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}oniguruma.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}regenc.h
+encoding.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+encoding.$(OBJEXT): $(top_srcdir)/include/ruby.h
+encoding.$(OBJEXT): {$(VPATH)}config.h
+encoding.$(OBJEXT): {$(VPATH)}defines.h
+encoding.$(OBJEXT): {$(VPATH)}encindex.h
+encoding.$(OBJEXT): {$(VPATH)}encoding.c
+encoding.$(OBJEXT): {$(VPATH)}encoding.h
+encoding.$(OBJEXT): {$(VPATH)}intern.h
+encoding.$(OBJEXT): {$(VPATH)}internal.h
+encoding.$(OBJEXT): {$(VPATH)}io.h
+encoding.$(OBJEXT): {$(VPATH)}missing.h
+encoding.$(OBJEXT): {$(VPATH)}oniguruma.h
+encoding.$(OBJEXT): {$(VPATH)}regenc.h
+encoding.$(OBJEXT): {$(VPATH)}st.h
+encoding.$(OBJEXT): {$(VPATH)}subst.h
+encoding.$(OBJEXT): {$(VPATH)}util.h
+enum.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+enum.$(OBJEXT): $(top_srcdir)/include/ruby.h
+enum.$(OBJEXT): {$(VPATH)}config.h
+enum.$(OBJEXT): {$(VPATH)}defines.h
+enum.$(OBJEXT): {$(VPATH)}encoding.h
+enum.$(OBJEXT): {$(VPATH)}enum.c
+enum.$(OBJEXT): {$(VPATH)}id.h
+enum.$(OBJEXT): {$(VPATH)}intern.h
+enum.$(OBJEXT): {$(VPATH)}internal.h
+enum.$(OBJEXT): {$(VPATH)}io.h
+enum.$(OBJEXT): {$(VPATH)}missing.h
+enum.$(OBJEXT): {$(VPATH)}oniguruma.h
+enum.$(OBJEXT): {$(VPATH)}st.h
+enum.$(OBJEXT): {$(VPATH)}subst.h
+enum.$(OBJEXT): {$(VPATH)}util.h
+enumerator.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+enumerator.$(OBJEXT): $(top_srcdir)/include/ruby.h
+enumerator.$(OBJEXT): {$(VPATH)}config.h
+enumerator.$(OBJEXT): {$(VPATH)}defines.h
+enumerator.$(OBJEXT): {$(VPATH)}encoding.h
+enumerator.$(OBJEXT): {$(VPATH)}enumerator.c
+enumerator.$(OBJEXT): {$(VPATH)}intern.h
+enumerator.$(OBJEXT): {$(VPATH)}internal.h
+enumerator.$(OBJEXT): {$(VPATH)}io.h
+enumerator.$(OBJEXT): {$(VPATH)}missing.h
+enumerator.$(OBJEXT): {$(VPATH)}oniguruma.h
+enumerator.$(OBJEXT): {$(VPATH)}st.h
+enumerator.$(OBJEXT): {$(VPATH)}subst.h
+error.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
+error.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
+error.$(OBJEXT): $(CCAN_DIR)/list/list.h
+error.$(OBJEXT): $(CCAN_DIR)/str/str.h
+error.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+error.$(OBJEXT): $(top_srcdir)/include/ruby.h
+error.$(OBJEXT): {$(VPATH)}config.h
+error.$(OBJEXT): {$(VPATH)}defines.h
+error.$(OBJEXT): {$(VPATH)}encoding.h
+error.$(OBJEXT): {$(VPATH)}error.c
+error.$(OBJEXT): {$(VPATH)}id.h
+error.$(OBJEXT): {$(VPATH)}intern.h
+error.$(OBJEXT): {$(VPATH)}internal.h
+error.$(OBJEXT): {$(VPATH)}io.h
+error.$(OBJEXT): {$(VPATH)}known_errors.inc
+error.$(OBJEXT): {$(VPATH)}method.h
+error.$(OBJEXT): {$(VPATH)}missing.h
+error.$(OBJEXT): {$(VPATH)}node.h
+error.$(OBJEXT): {$(VPATH)}oniguruma.h
+error.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+error.$(OBJEXT): {$(VPATH)}st.h
+error.$(OBJEXT): {$(VPATH)}subst.h
+error.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
+error.$(OBJEXT): {$(VPATH)}thread_native.h
+error.$(OBJEXT): {$(VPATH)}vm_core.h
+error.$(OBJEXT): {$(VPATH)}vm_debug.h
+error.$(OBJEXT): {$(VPATH)}vm_opts.h
+eval.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
+eval.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
+eval.$(OBJEXT): $(CCAN_DIR)/list/list.h
+eval.$(OBJEXT): $(CCAN_DIR)/str/str.h
+eval.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+eval.$(OBJEXT): $(top_srcdir)/include/ruby.h
+eval.$(OBJEXT): {$(VPATH)}config.h
+eval.$(OBJEXT): {$(VPATH)}defines.h
+eval.$(OBJEXT): {$(VPATH)}encoding.h
+eval.$(OBJEXT): {$(VPATH)}eval.c
+eval.$(OBJEXT): {$(VPATH)}eval_error.c
+eval.$(OBJEXT): {$(VPATH)}eval_intern.h
+eval.$(OBJEXT): {$(VPATH)}eval_jump.c
+eval.$(OBJEXT): {$(VPATH)}gc.h
+eval.$(OBJEXT): {$(VPATH)}id.h
+eval.$(OBJEXT): {$(VPATH)}intern.h
+eval.$(OBJEXT): {$(VPATH)}internal.h
+eval.$(OBJEXT): {$(VPATH)}io.h
+eval.$(OBJEXT): {$(VPATH)}iseq.h
+eval.$(OBJEXT): {$(VPATH)}method.h
+eval.$(OBJEXT): {$(VPATH)}missing.h
+eval.$(OBJEXT): {$(VPATH)}node.h
+eval.$(OBJEXT): {$(VPATH)}oniguruma.h
+eval.$(OBJEXT): {$(VPATH)}probes.h
+eval.$(OBJEXT): {$(VPATH)}probes_helper.h
+eval.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+eval.$(OBJEXT): {$(VPATH)}st.h
+eval.$(OBJEXT): {$(VPATH)}subst.h
+eval.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
+eval.$(OBJEXT): {$(VPATH)}thread_native.h
+eval.$(OBJEXT): {$(VPATH)}vm.h
+eval.$(OBJEXT): {$(VPATH)}vm_core.h
+eval.$(OBJEXT): {$(VPATH)}vm_debug.h
+eval.$(OBJEXT): {$(VPATH)}vm_opts.h
+file.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+file.$(OBJEXT): $(top_srcdir)/include/ruby.h
+file.$(OBJEXT): {$(VPATH)}config.h
+file.$(OBJEXT): {$(VPATH)}defines.h
+file.$(OBJEXT): {$(VPATH)}dln.h
+file.$(OBJEXT): {$(VPATH)}encindex.h
+file.$(OBJEXT): {$(VPATH)}encoding.h
+file.$(OBJEXT): {$(VPATH)}file.c
+file.$(OBJEXT): {$(VPATH)}intern.h
+file.$(OBJEXT): {$(VPATH)}internal.h
+file.$(OBJEXT): {$(VPATH)}io.h
+file.$(OBJEXT): {$(VPATH)}missing.h
+file.$(OBJEXT): {$(VPATH)}oniguruma.h
+file.$(OBJEXT): {$(VPATH)}st.h
+file.$(OBJEXT): {$(VPATH)}subst.h
+file.$(OBJEXT): {$(VPATH)}util.h
+gc.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
+gc.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
+gc.$(OBJEXT): $(CCAN_DIR)/list/list.h
+gc.$(OBJEXT): $(CCAN_DIR)/str/str.h
+gc.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+gc.$(OBJEXT): $(top_srcdir)/include/ruby.h
+gc.$(OBJEXT): {$(VPATH)}config.h
+gc.$(OBJEXT): {$(VPATH)}constant.h
+gc.$(OBJEXT): {$(VPATH)}debug.h
+gc.$(OBJEXT): {$(VPATH)}defines.h
+gc.$(OBJEXT): {$(VPATH)}encoding.h
+gc.$(OBJEXT): {$(VPATH)}eval_intern.h
+gc.$(OBJEXT): {$(VPATH)}gc.c
+gc.$(OBJEXT): {$(VPATH)}gc.h
+gc.$(OBJEXT): {$(VPATH)}id.h
+gc.$(OBJEXT): {$(VPATH)}id_table.h
+gc.$(OBJEXT): {$(VPATH)}intern.h
+gc.$(OBJEXT): {$(VPATH)}internal.h
+gc.$(OBJEXT): {$(VPATH)}io.h
+gc.$(OBJEXT): {$(VPATH)}method.h
+gc.$(OBJEXT): {$(VPATH)}missing.h
+gc.$(OBJEXT): {$(VPATH)}node.h
+gc.$(OBJEXT): {$(VPATH)}oniguruma.h
+gc.$(OBJEXT): {$(VPATH)}probes.h
+gc.$(OBJEXT): {$(VPATH)}re.h
+gc.$(OBJEXT): {$(VPATH)}regenc.h
+gc.$(OBJEXT): {$(VPATH)}regex.h
+gc.$(OBJEXT): {$(VPATH)}regint.h
+gc.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+gc.$(OBJEXT): {$(VPATH)}st.h
+gc.$(OBJEXT): {$(VPATH)}subst.h
+gc.$(OBJEXT): {$(VPATH)}thread.h
+gc.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
+gc.$(OBJEXT): {$(VPATH)}thread_native.h
+gc.$(OBJEXT): {$(VPATH)}util.h
+gc.$(OBJEXT): {$(VPATH)}vm_core.h
+gc.$(OBJEXT): {$(VPATH)}vm_debug.h
+gc.$(OBJEXT): {$(VPATH)}vm_opts.h
+golf_prelude.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
+golf_prelude.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
+golf_prelude.$(OBJEXT): $(CCAN_DIR)/list/list.h
+golf_prelude.$(OBJEXT): $(CCAN_DIR)/str/str.h
+golf_prelude.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+golf_prelude.$(OBJEXT): $(top_srcdir)/include/ruby.h
+golf_prelude.$(OBJEXT): {$(VPATH)}config.h
+golf_prelude.$(OBJEXT): {$(VPATH)}defines.h
+golf_prelude.$(OBJEXT): {$(VPATH)}encoding.h
+golf_prelude.$(OBJEXT): {$(VPATH)}golf_prelude.c
+golf_prelude.$(OBJEXT): {$(VPATH)}id.h
+golf_prelude.$(OBJEXT): {$(VPATH)}intern.h
+golf_prelude.$(OBJEXT): {$(VPATH)}internal.h
+golf_prelude.$(OBJEXT): {$(VPATH)}io.h
+golf_prelude.$(OBJEXT): {$(VPATH)}method.h
+golf_prelude.$(OBJEXT): {$(VPATH)}missing.h
+golf_prelude.$(OBJEXT): {$(VPATH)}node.h
+golf_prelude.$(OBJEXT): {$(VPATH)}oniguruma.h
+golf_prelude.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+golf_prelude.$(OBJEXT): {$(VPATH)}st.h
+golf_prelude.$(OBJEXT): {$(VPATH)}subst.h
+golf_prelude.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
+golf_prelude.$(OBJEXT): {$(VPATH)}thread_native.h
+golf_prelude.$(OBJEXT): {$(VPATH)}vm_core.h
+golf_prelude.$(OBJEXT): {$(VPATH)}vm_debug.h
+golf_prelude.$(OBJEXT): {$(VPATH)}vm_opts.h
+goruby.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+goruby.$(OBJEXT): $(top_srcdir)/include/ruby.h
+goruby.$(OBJEXT): {$(VPATH)}config.h
+goruby.$(OBJEXT): {$(VPATH)}defines.h
+goruby.$(OBJEXT): {$(VPATH)}goruby.c
+goruby.$(OBJEXT): {$(VPATH)}intern.h
+goruby.$(OBJEXT): {$(VPATH)}main.c
+goruby.$(OBJEXT): {$(VPATH)}missing.h
+goruby.$(OBJEXT): {$(VPATH)}node.h
+goruby.$(OBJEXT): {$(VPATH)}st.h
+goruby.$(OBJEXT): {$(VPATH)}subst.h
+goruby.$(OBJEXT): {$(VPATH)}vm_debug.h
+hash.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+hash.$(OBJEXT): $(top_srcdir)/include/ruby.h
+hash.$(OBJEXT): {$(VPATH)}config.h
+hash.$(OBJEXT): {$(VPATH)}defines.h
+hash.$(OBJEXT): {$(VPATH)}encoding.h
+hash.$(OBJEXT): {$(VPATH)}hash.c
+hash.$(OBJEXT): {$(VPATH)}id.h
+hash.$(OBJEXT): {$(VPATH)}intern.h
+hash.$(OBJEXT): {$(VPATH)}internal.h
+hash.$(OBJEXT): {$(VPATH)}io.h
+hash.$(OBJEXT): {$(VPATH)}missing.h
+hash.$(OBJEXT): {$(VPATH)}oniguruma.h
+hash.$(OBJEXT): {$(VPATH)}probes.h
+hash.$(OBJEXT): {$(VPATH)}st.h
+hash.$(OBJEXT): {$(VPATH)}subst.h
+hash.$(OBJEXT): {$(VPATH)}symbol.h
+hash.$(OBJEXT): {$(VPATH)}util.h
+hash.$(OBJEXT): {$(VPATH)}vm_opts.h
+inits.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+inits.$(OBJEXT): $(top_srcdir)/include/ruby.h
+inits.$(OBJEXT): {$(VPATH)}config.h
+inits.$(OBJEXT): {$(VPATH)}defines.h
+inits.$(OBJEXT): {$(VPATH)}encoding.h
+inits.$(OBJEXT): {$(VPATH)}inits.c
+inits.$(OBJEXT): {$(VPATH)}intern.h
+inits.$(OBJEXT): {$(VPATH)}internal.h
+inits.$(OBJEXT): {$(VPATH)}io.h
+inits.$(OBJEXT): {$(VPATH)}missing.h
+inits.$(OBJEXT): {$(VPATH)}oniguruma.h
+inits.$(OBJEXT): {$(VPATH)}st.h
+inits.$(OBJEXT): {$(VPATH)}subst.h
+io.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+io.$(OBJEXT): $(top_srcdir)/include/ruby.h
+io.$(OBJEXT): {$(VPATH)}config.h
+io.$(OBJEXT): {$(VPATH)}defines.h
+io.$(OBJEXT): {$(VPATH)}dln.h
+io.$(OBJEXT): {$(VPATH)}encindex.h
+io.$(OBJEXT): {$(VPATH)}encoding.h
+io.$(OBJEXT): {$(VPATH)}id.h
+io.$(OBJEXT): {$(VPATH)}intern.h
+io.$(OBJEXT): {$(VPATH)}internal.h
+io.$(OBJEXT): {$(VPATH)}io.c
+io.$(OBJEXT): {$(VPATH)}io.h
+io.$(OBJEXT): {$(VPATH)}missing.h
+io.$(OBJEXT): {$(VPATH)}oniguruma.h
+io.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+io.$(OBJEXT): {$(VPATH)}st.h
+io.$(OBJEXT): {$(VPATH)}subst.h
+io.$(OBJEXT): {$(VPATH)}thread.h
+io.$(OBJEXT): {$(VPATH)}util.h
+iseq.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
+iseq.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
+iseq.$(OBJEXT): $(CCAN_DIR)/list/list.h
+iseq.$(OBJEXT): $(CCAN_DIR)/str/str.h
+iseq.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+iseq.$(OBJEXT): $(top_srcdir)/include/ruby.h
+iseq.$(OBJEXT): {$(VPATH)}config.h
+iseq.$(OBJEXT): {$(VPATH)}defines.h
+iseq.$(OBJEXT): {$(VPATH)}encoding.h
+iseq.$(OBJEXT): {$(VPATH)}eval_intern.h
+iseq.$(OBJEXT): {$(VPATH)}gc.h
+iseq.$(OBJEXT): {$(VPATH)}id.h
+iseq.$(OBJEXT): {$(VPATH)}insns.inc
+iseq.$(OBJEXT): {$(VPATH)}insns_info.inc
+iseq.$(OBJEXT): {$(VPATH)}intern.h
+iseq.$(OBJEXT): {$(VPATH)}internal.h
+iseq.$(OBJEXT): {$(VPATH)}io.h
+iseq.$(OBJEXT): {$(VPATH)}iseq.c
+iseq.$(OBJEXT): {$(VPATH)}iseq.h
+iseq.$(OBJEXT): {$(VPATH)}method.h
+iseq.$(OBJEXT): {$(VPATH)}missing.h
+iseq.$(OBJEXT): {$(VPATH)}node.h
+iseq.$(OBJEXT): {$(VPATH)}node_name.inc
+iseq.$(OBJEXT): {$(VPATH)}oniguruma.h
+iseq.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+iseq.$(OBJEXT): {$(VPATH)}st.h
+iseq.$(OBJEXT): {$(VPATH)}subst.h
+iseq.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
+iseq.$(OBJEXT): {$(VPATH)}thread_native.h
+iseq.$(OBJEXT): {$(VPATH)}util.h
+iseq.$(OBJEXT): {$(VPATH)}vm_core.h
+iseq.$(OBJEXT): {$(VPATH)}vm_debug.h
+iseq.$(OBJEXT): {$(VPATH)}vm_opts.h
+load.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
+load.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
+load.$(OBJEXT): $(CCAN_DIR)/list/list.h
+load.$(OBJEXT): $(CCAN_DIR)/str/str.h
+load.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+load.$(OBJEXT): $(top_srcdir)/include/ruby.h
+load.$(OBJEXT): {$(VPATH)}config.h
+load.$(OBJEXT): {$(VPATH)}defines.h
+load.$(OBJEXT): {$(VPATH)}dln.h
+load.$(OBJEXT): {$(VPATH)}encoding.h
+load.$(OBJEXT): {$(VPATH)}eval_intern.h
+load.$(OBJEXT): {$(VPATH)}id.h
+load.$(OBJEXT): {$(VPATH)}intern.h
+load.$(OBJEXT): {$(VPATH)}internal.h
+load.$(OBJEXT): {$(VPATH)}io.h
+load.$(OBJEXT): {$(VPATH)}load.c
+load.$(OBJEXT): {$(VPATH)}method.h
+load.$(OBJEXT): {$(VPATH)}missing.h
+load.$(OBJEXT): {$(VPATH)}node.h
+load.$(OBJEXT): {$(VPATH)}oniguruma.h
+load.$(OBJEXT): {$(VPATH)}probes.h
+load.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+load.$(OBJEXT): {$(VPATH)}st.h
+load.$(OBJEXT): {$(VPATH)}subst.h
+load.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
+load.$(OBJEXT): {$(VPATH)}thread_native.h
+load.$(OBJEXT): {$(VPATH)}util.h
+load.$(OBJEXT): {$(VPATH)}vm_core.h
+load.$(OBJEXT): {$(VPATH)}vm_debug.h
+load.$(OBJEXT): {$(VPATH)}vm_opts.h
+loadpath.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+loadpath.$(OBJEXT): $(hdrdir)/ruby/version.h
+loadpath.$(OBJEXT): $(top_srcdir)/version.h
+loadpath.$(OBJEXT): {$(VPATH)}config.h
+loadpath.$(OBJEXT): {$(VPATH)}defines.h
+loadpath.$(OBJEXT): {$(VPATH)}intern.h
+loadpath.$(OBJEXT): {$(VPATH)}loadpath.c
+loadpath.$(OBJEXT): {$(VPATH)}missing.h
+loadpath.$(OBJEXT): {$(VPATH)}st.h
+loadpath.$(OBJEXT): {$(VPATH)}subst.h
+loadpath.$(OBJEXT): {$(VPATH)}verconf.h
+localeinit.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+localeinit.$(OBJEXT): $(top_srcdir)/include/ruby.h
+localeinit.$(OBJEXT): {$(VPATH)}config.h
+localeinit.$(OBJEXT): {$(VPATH)}defines.h
+localeinit.$(OBJEXT): {$(VPATH)}encindex.h
+localeinit.$(OBJEXT): {$(VPATH)}encoding.h
+localeinit.$(OBJEXT): {$(VPATH)}intern.h
+localeinit.$(OBJEXT): {$(VPATH)}internal.h
+localeinit.$(OBJEXT): {$(VPATH)}io.h
+localeinit.$(OBJEXT): {$(VPATH)}localeinit.c
+localeinit.$(OBJEXT): {$(VPATH)}missing.h
+localeinit.$(OBJEXT): {$(VPATH)}oniguruma.h
+localeinit.$(OBJEXT): {$(VPATH)}st.h
+localeinit.$(OBJEXT): {$(VPATH)}subst.h
+main.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+main.$(OBJEXT): $(top_srcdir)/include/ruby.h
+main.$(OBJEXT): {$(VPATH)}config.h
+main.$(OBJEXT): {$(VPATH)}defines.h
+main.$(OBJEXT): {$(VPATH)}intern.h
+main.$(OBJEXT): {$(VPATH)}main.c
+main.$(OBJEXT): {$(VPATH)}missing.h
+main.$(OBJEXT): {$(VPATH)}node.h
+main.$(OBJEXT): {$(VPATH)}st.h
+main.$(OBJEXT): {$(VPATH)}subst.h
+main.$(OBJEXT): {$(VPATH)}vm_debug.h
+marshal.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+marshal.$(OBJEXT): $(top_srcdir)/include/ruby.h
+marshal.$(OBJEXT): {$(VPATH)}config.h
+marshal.$(OBJEXT): {$(VPATH)}defines.h
+marshal.$(OBJEXT): {$(VPATH)}encindex.h
+marshal.$(OBJEXT): {$(VPATH)}encoding.h
+marshal.$(OBJEXT): {$(VPATH)}id_table.h
+marshal.$(OBJEXT): {$(VPATH)}intern.h
+marshal.$(OBJEXT): {$(VPATH)}internal.h
+marshal.$(OBJEXT): {$(VPATH)}io.h
+marshal.$(OBJEXT): {$(VPATH)}marshal.c
+marshal.$(OBJEXT): {$(VPATH)}missing.h
+marshal.$(OBJEXT): {$(VPATH)}oniguruma.h
+marshal.$(OBJEXT): {$(VPATH)}st.h
+marshal.$(OBJEXT): {$(VPATH)}subst.h
+marshal.$(OBJEXT): {$(VPATH)}util.h
+math.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+math.$(OBJEXT): $(top_srcdir)/include/ruby.h
+math.$(OBJEXT): {$(VPATH)}config.h
+math.$(OBJEXT): {$(VPATH)}defines.h
+math.$(OBJEXT): {$(VPATH)}encoding.h
+math.$(OBJEXT): {$(VPATH)}intern.h
+math.$(OBJEXT): {$(VPATH)}internal.h
+math.$(OBJEXT): {$(VPATH)}io.h
+math.$(OBJEXT): {$(VPATH)}math.c
+math.$(OBJEXT): {$(VPATH)}missing.h
+math.$(OBJEXT): {$(VPATH)}oniguruma.h
+math.$(OBJEXT): {$(VPATH)}st.h
+math.$(OBJEXT): {$(VPATH)}subst.h
+miniinit.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+miniinit.$(OBJEXT): {$(VPATH)}config.h
+miniinit.$(OBJEXT): {$(VPATH)}defines.h
+miniinit.$(OBJEXT): {$(VPATH)}encoding.h
+miniinit.$(OBJEXT): {$(VPATH)}intern.h
+miniinit.$(OBJEXT): {$(VPATH)}miniinit.c
+miniinit.$(OBJEXT): {$(VPATH)}missing.h
+miniinit.$(OBJEXT): {$(VPATH)}oniguruma.h
+miniinit.$(OBJEXT): {$(VPATH)}st.h
+miniinit.$(OBJEXT): {$(VPATH)}subst.h
+miniprelude.$(OBJEXT): {$(VPATH)}miniprelude.c
+node.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
+node.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
+node.$(OBJEXT): $(CCAN_DIR)/list/list.h
+node.$(OBJEXT): $(CCAN_DIR)/str/str.h
+node.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+node.$(OBJEXT): $(top_srcdir)/include/ruby.h
+node.$(OBJEXT): {$(VPATH)}config.h
+node.$(OBJEXT): {$(VPATH)}defines.h
+node.$(OBJEXT): {$(VPATH)}encoding.h
+node.$(OBJEXT): {$(VPATH)}id.h
+node.$(OBJEXT): {$(VPATH)}intern.h
+node.$(OBJEXT): {$(VPATH)}internal.h
+node.$(OBJEXT): {$(VPATH)}io.h
+node.$(OBJEXT): {$(VPATH)}method.h
+node.$(OBJEXT): {$(VPATH)}missing.h
+node.$(OBJEXT): {$(VPATH)}node.c
+node.$(OBJEXT): {$(VPATH)}node.h
+node.$(OBJEXT): {$(VPATH)}oniguruma.h
+node.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+node.$(OBJEXT): {$(VPATH)}st.h
+node.$(OBJEXT): {$(VPATH)}subst.h
+node.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
+node.$(OBJEXT): {$(VPATH)}thread_native.h
+node.$(OBJEXT): {$(VPATH)}vm_core.h
+node.$(OBJEXT): {$(VPATH)}vm_debug.h
+node.$(OBJEXT): {$(VPATH)}vm_opts.h
+numeric.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+numeric.$(OBJEXT): $(top_srcdir)/include/ruby.h
+numeric.$(OBJEXT): {$(VPATH)}config.h
+numeric.$(OBJEXT): {$(VPATH)}defines.h
+numeric.$(OBJEXT): {$(VPATH)}encoding.h
+numeric.$(OBJEXT): {$(VPATH)}id.h
+numeric.$(OBJEXT): {$(VPATH)}intern.h
+numeric.$(OBJEXT): {$(VPATH)}internal.h
+numeric.$(OBJEXT): {$(VPATH)}io.h
+numeric.$(OBJEXT): {$(VPATH)}missing.h
+numeric.$(OBJEXT): {$(VPATH)}numeric.c
+numeric.$(OBJEXT): {$(VPATH)}oniguruma.h
+numeric.$(OBJEXT): {$(VPATH)}st.h
+numeric.$(OBJEXT): {$(VPATH)}subst.h
+numeric.$(OBJEXT): {$(VPATH)}util.h
+object.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+object.$(OBJEXT): $(top_srcdir)/include/ruby.h
+object.$(OBJEXT): {$(VPATH)}config.h
+object.$(OBJEXT): {$(VPATH)}constant.h
+object.$(OBJEXT): {$(VPATH)}defines.h
+object.$(OBJEXT): {$(VPATH)}encoding.h
+object.$(OBJEXT): {$(VPATH)}id.h
+object.$(OBJEXT): {$(VPATH)}intern.h
+object.$(OBJEXT): {$(VPATH)}internal.h
+object.$(OBJEXT): {$(VPATH)}io.h
+object.$(OBJEXT): {$(VPATH)}missing.h
+object.$(OBJEXT): {$(VPATH)}object.c
+object.$(OBJEXT): {$(VPATH)}oniguruma.h
+object.$(OBJEXT): {$(VPATH)}probes.h
+object.$(OBJEXT): {$(VPATH)}st.h
+object.$(OBJEXT): {$(VPATH)}subst.h
+object.$(OBJEXT): {$(VPATH)}util.h
+object.$(OBJEXT): {$(VPATH)}vm_opts.h
+pack.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+pack.$(OBJEXT): $(top_srcdir)/include/ruby.h
+pack.$(OBJEXT): {$(VPATH)}config.h
+pack.$(OBJEXT): {$(VPATH)}defines.h
+pack.$(OBJEXT): {$(VPATH)}encoding.h
+pack.$(OBJEXT): {$(VPATH)}intern.h
+pack.$(OBJEXT): {$(VPATH)}internal.h
+pack.$(OBJEXT): {$(VPATH)}io.h
+pack.$(OBJEXT): {$(VPATH)}missing.h
+pack.$(OBJEXT): {$(VPATH)}oniguruma.h
+pack.$(OBJEXT): {$(VPATH)}pack.c
+pack.$(OBJEXT): {$(VPATH)}st.h
+pack.$(OBJEXT): {$(VPATH)}subst.h
+parse.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+parse.$(OBJEXT): $(top_srcdir)/include/ruby.h
+parse.$(OBJEXT): {$(VPATH)}config.h
+parse.$(OBJEXT): {$(VPATH)}defines.h
+parse.$(OBJEXT): {$(VPATH)}defs/keywords
+parse.$(OBJEXT): {$(VPATH)}encoding.h
+parse.$(OBJEXT): {$(VPATH)}id.h
+parse.$(OBJEXT): {$(VPATH)}intern.h
+parse.$(OBJEXT): {$(VPATH)}internal.h
+parse.$(OBJEXT): {$(VPATH)}io.h
+parse.$(OBJEXT): {$(VPATH)}lex.c
+parse.$(OBJEXT): {$(VPATH)}missing.h
+parse.$(OBJEXT): {$(VPATH)}node.h
+parse.$(OBJEXT): {$(VPATH)}oniguruma.h
+parse.$(OBJEXT): {$(VPATH)}parse.c
+parse.$(OBJEXT): {$(VPATH)}parse.h
+parse.$(OBJEXT): {$(VPATH)}parse.y
+parse.$(OBJEXT): {$(VPATH)}probes.h
+parse.$(OBJEXT): {$(VPATH)}regenc.h
+parse.$(OBJEXT): {$(VPATH)}regex.h
+parse.$(OBJEXT): {$(VPATH)}st.h
+parse.$(OBJEXT): {$(VPATH)}subst.h
+parse.$(OBJEXT): {$(VPATH)}symbol.h
+parse.$(OBJEXT): {$(VPATH)}util.h
+parse.$(OBJEXT): {$(VPATH)}vm_opts.h
+prelude.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
+prelude.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
+prelude.$(OBJEXT): $(CCAN_DIR)/list/list.h
+prelude.$(OBJEXT): $(CCAN_DIR)/str/str.h
+prelude.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+prelude.$(OBJEXT): $(top_srcdir)/include/ruby.h
+prelude.$(OBJEXT): {$(VPATH)}config.h
+prelude.$(OBJEXT): {$(VPATH)}defines.h
+prelude.$(OBJEXT): {$(VPATH)}encoding.h
+prelude.$(OBJEXT): {$(VPATH)}id.h
+prelude.$(OBJEXT): {$(VPATH)}intern.h
+prelude.$(OBJEXT): {$(VPATH)}internal.h
+prelude.$(OBJEXT): {$(VPATH)}io.h
+prelude.$(OBJEXT): {$(VPATH)}method.h
+prelude.$(OBJEXT): {$(VPATH)}missing.h
+prelude.$(OBJEXT): {$(VPATH)}node.h
+prelude.$(OBJEXT): {$(VPATH)}oniguruma.h
+prelude.$(OBJEXT): {$(VPATH)}prelude.c
+prelude.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+prelude.$(OBJEXT): {$(VPATH)}st.h
+prelude.$(OBJEXT): {$(VPATH)}subst.h
+prelude.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
+prelude.$(OBJEXT): {$(VPATH)}thread_native.h
+prelude.$(OBJEXT): {$(VPATH)}vm_core.h
+prelude.$(OBJEXT): {$(VPATH)}vm_debug.h
+prelude.$(OBJEXT): {$(VPATH)}vm_opts.h
+proc.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
+proc.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
+proc.$(OBJEXT): $(CCAN_DIR)/list/list.h
+proc.$(OBJEXT): $(CCAN_DIR)/str/str.h
+proc.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+proc.$(OBJEXT): $(top_srcdir)/include/ruby.h
+proc.$(OBJEXT): {$(VPATH)}config.h
+proc.$(OBJEXT): {$(VPATH)}defines.h
+proc.$(OBJEXT): {$(VPATH)}encoding.h
+proc.$(OBJEXT): {$(VPATH)}eval_intern.h
+proc.$(OBJEXT): {$(VPATH)}gc.h
+proc.$(OBJEXT): {$(VPATH)}id.h
+proc.$(OBJEXT): {$(VPATH)}intern.h
+proc.$(OBJEXT): {$(VPATH)}internal.h
+proc.$(OBJEXT): {$(VPATH)}io.h
+proc.$(OBJEXT): {$(VPATH)}iseq.h
+proc.$(OBJEXT): {$(VPATH)}method.h
+proc.$(OBJEXT): {$(VPATH)}missing.h
+proc.$(OBJEXT): {$(VPATH)}node.h
+proc.$(OBJEXT): {$(VPATH)}oniguruma.h
+proc.$(OBJEXT): {$(VPATH)}proc.c
+proc.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+proc.$(OBJEXT): {$(VPATH)}st.h
+proc.$(OBJEXT): {$(VPATH)}subst.h
+proc.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
+proc.$(OBJEXT): {$(VPATH)}thread_native.h
+proc.$(OBJEXT): {$(VPATH)}vm_core.h
+proc.$(OBJEXT): {$(VPATH)}vm_debug.h
+proc.$(OBJEXT): {$(VPATH)}vm_opts.h
+process.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
+process.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
+process.$(OBJEXT): $(CCAN_DIR)/list/list.h
+process.$(OBJEXT): $(CCAN_DIR)/str/str.h
+process.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+process.$(OBJEXT): $(top_srcdir)/include/ruby.h
+process.$(OBJEXT): {$(VPATH)}config.h
+process.$(OBJEXT): {$(VPATH)}defines.h
+process.$(OBJEXT): {$(VPATH)}dln.h
+process.$(OBJEXT): {$(VPATH)}encoding.h
+process.$(OBJEXT): {$(VPATH)}id.h
+process.$(OBJEXT): {$(VPATH)}intern.h
+process.$(OBJEXT): {$(VPATH)}internal.h
+process.$(OBJEXT): {$(VPATH)}io.h
+process.$(OBJEXT): {$(VPATH)}method.h
+process.$(OBJEXT): {$(VPATH)}missing.h
+process.$(OBJEXT): {$(VPATH)}node.h
+process.$(OBJEXT): {$(VPATH)}oniguruma.h
+process.$(OBJEXT): {$(VPATH)}process.c
+process.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+process.$(OBJEXT): {$(VPATH)}st.h
+process.$(OBJEXT): {$(VPATH)}subst.h
+process.$(OBJEXT): {$(VPATH)}thread.h
+process.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
+process.$(OBJEXT): {$(VPATH)}thread_native.h
+process.$(OBJEXT): {$(VPATH)}util.h
+process.$(OBJEXT): {$(VPATH)}vm_core.h
+process.$(OBJEXT): {$(VPATH)}vm_debug.h
+process.$(OBJEXT): {$(VPATH)}vm_opts.h
+random.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+random.$(OBJEXT): $(top_srcdir)/include/ruby.h
+random.$(OBJEXT): {$(VPATH)}config.h
+random.$(OBJEXT): {$(VPATH)}defines.h
+random.$(OBJEXT): {$(VPATH)}encoding.h
+random.$(OBJEXT): {$(VPATH)}intern.h
+random.$(OBJEXT): {$(VPATH)}internal.h
+random.$(OBJEXT): {$(VPATH)}io.h
+random.$(OBJEXT): {$(VPATH)}missing.h
+random.$(OBJEXT): {$(VPATH)}oniguruma.h
+random.$(OBJEXT): {$(VPATH)}random.c
+random.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+random.$(OBJEXT): {$(VPATH)}siphash.c
+random.$(OBJEXT): {$(VPATH)}siphash.h
+random.$(OBJEXT): {$(VPATH)}st.h
+random.$(OBJEXT): {$(VPATH)}subst.h
+range.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+range.$(OBJEXT): $(top_srcdir)/include/ruby.h
+range.$(OBJEXT): {$(VPATH)}config.h
+range.$(OBJEXT): {$(VPATH)}defines.h
+range.$(OBJEXT): {$(VPATH)}encoding.h
+range.$(OBJEXT): {$(VPATH)}id.h
+range.$(OBJEXT): {$(VPATH)}intern.h
+range.$(OBJEXT): {$(VPATH)}internal.h
+range.$(OBJEXT): {$(VPATH)}io.h
+range.$(OBJEXT): {$(VPATH)}missing.h
+range.$(OBJEXT): {$(VPATH)}oniguruma.h
+range.$(OBJEXT): {$(VPATH)}range.c
+range.$(OBJEXT): {$(VPATH)}st.h
+range.$(OBJEXT): {$(VPATH)}subst.h
+rational.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+rational.$(OBJEXT): $(top_srcdir)/include/ruby.h
+rational.$(OBJEXT): {$(VPATH)}config.h
+rational.$(OBJEXT): {$(VPATH)}defines.h
+rational.$(OBJEXT): {$(VPATH)}encoding.h
+rational.$(OBJEXT): {$(VPATH)}intern.h
+rational.$(OBJEXT): {$(VPATH)}internal.h
+rational.$(OBJEXT): {$(VPATH)}io.h
+rational.$(OBJEXT): {$(VPATH)}missing.h
+rational.$(OBJEXT): {$(VPATH)}oniguruma.h
+rational.$(OBJEXT): {$(VPATH)}rational.c
+rational.$(OBJEXT): {$(VPATH)}st.h
+rational.$(OBJEXT): {$(VPATH)}subst.h
+re.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+re.$(OBJEXT): $(top_srcdir)/include/ruby.h
+re.$(OBJEXT): {$(VPATH)}config.h
+re.$(OBJEXT): {$(VPATH)}defines.h
+re.$(OBJEXT): {$(VPATH)}encindex.h
+re.$(OBJEXT): {$(VPATH)}encoding.h
+re.$(OBJEXT): {$(VPATH)}intern.h
+re.$(OBJEXT): {$(VPATH)}internal.h
+re.$(OBJEXT): {$(VPATH)}io.h
+re.$(OBJEXT): {$(VPATH)}missing.h
+re.$(OBJEXT): {$(VPATH)}oniguruma.h
+re.$(OBJEXT): {$(VPATH)}re.c
+re.$(OBJEXT): {$(VPATH)}re.h
+re.$(OBJEXT): {$(VPATH)}regenc.h
+re.$(OBJEXT): {$(VPATH)}regex.h
+re.$(OBJEXT): {$(VPATH)}regint.h
+re.$(OBJEXT): {$(VPATH)}st.h
+re.$(OBJEXT): {$(VPATH)}subst.h
+re.$(OBJEXT): {$(VPATH)}util.h
+regcomp.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+regcomp.$(OBJEXT): {$(VPATH)}config.h
+regcomp.$(OBJEXT): {$(VPATH)}defines.h
+regcomp.$(OBJEXT): {$(VPATH)}intern.h
+regcomp.$(OBJEXT): {$(VPATH)}missing.h
+regcomp.$(OBJEXT): {$(VPATH)}oniguruma.h
+regcomp.$(OBJEXT): {$(VPATH)}regcomp.c
+regcomp.$(OBJEXT): {$(VPATH)}regenc.h
+regcomp.$(OBJEXT): {$(VPATH)}regint.h
+regcomp.$(OBJEXT): {$(VPATH)}regparse.h
+regcomp.$(OBJEXT): {$(VPATH)}st.h
+regcomp.$(OBJEXT): {$(VPATH)}subst.h
+regenc.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+regenc.$(OBJEXT): {$(VPATH)}config.h
+regenc.$(OBJEXT): {$(VPATH)}defines.h
+regenc.$(OBJEXT): {$(VPATH)}intern.h
+regenc.$(OBJEXT): {$(VPATH)}missing.h
+regenc.$(OBJEXT): {$(VPATH)}oniguruma.h
+regenc.$(OBJEXT): {$(VPATH)}regenc.c
+regenc.$(OBJEXT): {$(VPATH)}regenc.h
+regenc.$(OBJEXT): {$(VPATH)}regint.h
+regenc.$(OBJEXT): {$(VPATH)}st.h
+regenc.$(OBJEXT): {$(VPATH)}subst.h
+regerror.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+regerror.$(OBJEXT): {$(VPATH)}config.h
+regerror.$(OBJEXT): {$(VPATH)}defines.h
+regerror.$(OBJEXT): {$(VPATH)}intern.h
+regerror.$(OBJEXT): {$(VPATH)}missing.h
+regerror.$(OBJEXT): {$(VPATH)}oniguruma.h
+regerror.$(OBJEXT): {$(VPATH)}regenc.h
+regerror.$(OBJEXT): {$(VPATH)}regerror.c
+regerror.$(OBJEXT): {$(VPATH)}regint.h
+regerror.$(OBJEXT): {$(VPATH)}st.h
+regerror.$(OBJEXT): {$(VPATH)}subst.h
+regexec.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+regexec.$(OBJEXT): {$(VPATH)}config.h
+regexec.$(OBJEXT): {$(VPATH)}defines.h
+regexec.$(OBJEXT): {$(VPATH)}intern.h
+regexec.$(OBJEXT): {$(VPATH)}missing.h
+regexec.$(OBJEXT): {$(VPATH)}oniguruma.h
+regexec.$(OBJEXT): {$(VPATH)}regenc.h
+regexec.$(OBJEXT): {$(VPATH)}regexec.c
+regexec.$(OBJEXT): {$(VPATH)}regint.h
+regexec.$(OBJEXT): {$(VPATH)}st.h
+regexec.$(OBJEXT): {$(VPATH)}subst.h
+regparse.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+regparse.$(OBJEXT): {$(VPATH)}config.h
+regparse.$(OBJEXT): {$(VPATH)}defines.h
+regparse.$(OBJEXT): {$(VPATH)}intern.h
+regparse.$(OBJEXT): {$(VPATH)}missing.h
+regparse.$(OBJEXT): {$(VPATH)}oniguruma.h
+regparse.$(OBJEXT): {$(VPATH)}regenc.h
+regparse.$(OBJEXT): {$(VPATH)}regint.h
+regparse.$(OBJEXT): {$(VPATH)}regparse.c
+regparse.$(OBJEXT): {$(VPATH)}regparse.h
+regparse.$(OBJEXT): {$(VPATH)}st.h
+regparse.$(OBJEXT): {$(VPATH)}subst.h
+regsyntax.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+regsyntax.$(OBJEXT): {$(VPATH)}config.h
+regsyntax.$(OBJEXT): {$(VPATH)}defines.h
+regsyntax.$(OBJEXT): {$(VPATH)}intern.h
+regsyntax.$(OBJEXT): {$(VPATH)}missing.h
+regsyntax.$(OBJEXT): {$(VPATH)}oniguruma.h
+regsyntax.$(OBJEXT): {$(VPATH)}regenc.h
+regsyntax.$(OBJEXT): {$(VPATH)}regint.h
+regsyntax.$(OBJEXT): {$(VPATH)}regsyntax.c
+regsyntax.$(OBJEXT): {$(VPATH)}st.h
+regsyntax.$(OBJEXT): {$(VPATH)}subst.h
+ruby.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
+ruby.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
+ruby.$(OBJEXT): $(CCAN_DIR)/list/list.h
+ruby.$(OBJEXT): $(CCAN_DIR)/str/str.h
+ruby.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+ruby.$(OBJEXT): $(top_srcdir)/include/ruby.h
+ruby.$(OBJEXT): {$(VPATH)}config.h
+ruby.$(OBJEXT): {$(VPATH)}defines.h
+ruby.$(OBJEXT): {$(VPATH)}dln.h
+ruby.$(OBJEXT): {$(VPATH)}encoding.h
+ruby.$(OBJEXT): {$(VPATH)}eval_intern.h
+ruby.$(OBJEXT): {$(VPATH)}id.h
+ruby.$(OBJEXT): {$(VPATH)}intern.h
+ruby.$(OBJEXT): {$(VPATH)}internal.h
+ruby.$(OBJEXT): {$(VPATH)}io.h
+ruby.$(OBJEXT): {$(VPATH)}method.h
+ruby.$(OBJEXT): {$(VPATH)}missing.h
+ruby.$(OBJEXT): {$(VPATH)}node.h
+ruby.$(OBJEXT): {$(VPATH)}oniguruma.h
+ruby.$(OBJEXT): {$(VPATH)}ruby.c
+ruby.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+ruby.$(OBJEXT): {$(VPATH)}st.h
+ruby.$(OBJEXT): {$(VPATH)}subst.h
+ruby.$(OBJEXT): {$(VPATH)}thread.h
+ruby.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
+ruby.$(OBJEXT): {$(VPATH)}thread_native.h
+ruby.$(OBJEXT): {$(VPATH)}util.h
+ruby.$(OBJEXT): {$(VPATH)}vm_core.h
+ruby.$(OBJEXT): {$(VPATH)}vm_debug.h
+ruby.$(OBJEXT): {$(VPATH)}vm_opts.h
+safe.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
+safe.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
+safe.$(OBJEXT): $(CCAN_DIR)/list/list.h
+safe.$(OBJEXT): $(CCAN_DIR)/str/str.h
+safe.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+safe.$(OBJEXT): $(top_srcdir)/include/ruby.h
+safe.$(OBJEXT): {$(VPATH)}config.h
+safe.$(OBJEXT): {$(VPATH)}defines.h
+safe.$(OBJEXT): {$(VPATH)}encoding.h
+safe.$(OBJEXT): {$(VPATH)}id.h
+safe.$(OBJEXT): {$(VPATH)}intern.h
+safe.$(OBJEXT): {$(VPATH)}internal.h
+safe.$(OBJEXT): {$(VPATH)}io.h
+safe.$(OBJEXT): {$(VPATH)}method.h
+safe.$(OBJEXT): {$(VPATH)}missing.h
+safe.$(OBJEXT): {$(VPATH)}node.h
+safe.$(OBJEXT): {$(VPATH)}oniguruma.h
+safe.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+safe.$(OBJEXT): {$(VPATH)}safe.c
+safe.$(OBJEXT): {$(VPATH)}st.h
+safe.$(OBJEXT): {$(VPATH)}subst.h
+safe.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
+safe.$(OBJEXT): {$(VPATH)}thread_native.h
+safe.$(OBJEXT): {$(VPATH)}vm_core.h
+safe.$(OBJEXT): {$(VPATH)}vm_debug.h
+safe.$(OBJEXT): {$(VPATH)}vm_opts.h
+setproctitle.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+setproctitle.$(OBJEXT): $(top_srcdir)/include/ruby.h
+setproctitle.$(OBJEXT): {$(VPATH)}config.h
+setproctitle.$(OBJEXT): {$(VPATH)}defines.h
+setproctitle.$(OBJEXT): {$(VPATH)}intern.h
+setproctitle.$(OBJEXT): {$(VPATH)}missing.h
+setproctitle.$(OBJEXT): {$(VPATH)}setproctitle.c
+setproctitle.$(OBJEXT): {$(VPATH)}st.h
+setproctitle.$(OBJEXT): {$(VPATH)}subst.h
+setproctitle.$(OBJEXT): {$(VPATH)}util.h
+signal.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
+signal.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
+signal.$(OBJEXT): $(CCAN_DIR)/list/list.h
+signal.$(OBJEXT): $(CCAN_DIR)/str/str.h
+signal.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+signal.$(OBJEXT): $(top_srcdir)/include/ruby.h
+signal.$(OBJEXT): {$(VPATH)}config.h
+signal.$(OBJEXT): {$(VPATH)}defines.h
+signal.$(OBJEXT): {$(VPATH)}encoding.h
+signal.$(OBJEXT): {$(VPATH)}eval_intern.h
+signal.$(OBJEXT): {$(VPATH)}id.h
+signal.$(OBJEXT): {$(VPATH)}intern.h
+signal.$(OBJEXT): {$(VPATH)}internal.h
+signal.$(OBJEXT): {$(VPATH)}io.h
+signal.$(OBJEXT): {$(VPATH)}method.h
+signal.$(OBJEXT): {$(VPATH)}missing.h
+signal.$(OBJEXT): {$(VPATH)}node.h
+signal.$(OBJEXT): {$(VPATH)}oniguruma.h
+signal.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+signal.$(OBJEXT): {$(VPATH)}signal.c
+signal.$(OBJEXT): {$(VPATH)}st.h
+signal.$(OBJEXT): {$(VPATH)}subst.h
+signal.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
+signal.$(OBJEXT): {$(VPATH)}thread_native.h
+signal.$(OBJEXT): {$(VPATH)}vm_core.h
+signal.$(OBJEXT): {$(VPATH)}vm_debug.h
+signal.$(OBJEXT): {$(VPATH)}vm_opts.h
+sprintf.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+sprintf.$(OBJEXT): $(top_srcdir)/include/ruby.h
+sprintf.$(OBJEXT): {$(VPATH)}config.h
+sprintf.$(OBJEXT): {$(VPATH)}defines.h
+sprintf.$(OBJEXT): {$(VPATH)}encoding.h
+sprintf.$(OBJEXT): {$(VPATH)}id.h
+sprintf.$(OBJEXT): {$(VPATH)}intern.h
+sprintf.$(OBJEXT): {$(VPATH)}internal.h
+sprintf.$(OBJEXT): {$(VPATH)}io.h
+sprintf.$(OBJEXT): {$(VPATH)}missing.h
+sprintf.$(OBJEXT): {$(VPATH)}oniguruma.h
+sprintf.$(OBJEXT): {$(VPATH)}re.h
+sprintf.$(OBJEXT): {$(VPATH)}regex.h
+sprintf.$(OBJEXT): {$(VPATH)}sprintf.c
+sprintf.$(OBJEXT): {$(VPATH)}st.h
+sprintf.$(OBJEXT): {$(VPATH)}subst.h
+sprintf.$(OBJEXT): {$(VPATH)}vsnprintf.c
+st.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
+st.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
+st.$(OBJEXT): $(CCAN_DIR)/list/list.h
+st.$(OBJEXT): $(CCAN_DIR)/str/str.h
+st.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+st.$(OBJEXT): $(top_srcdir)/include/ruby.h
+st.$(OBJEXT): {$(VPATH)}config.h
+st.$(OBJEXT): {$(VPATH)}defines.h
+st.$(OBJEXT): {$(VPATH)}encoding.h
+st.$(OBJEXT): {$(VPATH)}intern.h
+st.$(OBJEXT): {$(VPATH)}internal.h
+st.$(OBJEXT): {$(VPATH)}io.h
+st.$(OBJEXT): {$(VPATH)}missing.h
+st.$(OBJEXT): {$(VPATH)}oniguruma.h
+st.$(OBJEXT): {$(VPATH)}st.c
+st.$(OBJEXT): {$(VPATH)}st.h
+st.$(OBJEXT): {$(VPATH)}subst.h
+strftime.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+strftime.$(OBJEXT): {$(VPATH)}config.h
+strftime.$(OBJEXT): {$(VPATH)}defines.h
+strftime.$(OBJEXT): {$(VPATH)}encoding.h
+strftime.$(OBJEXT): {$(VPATH)}intern.h
+strftime.$(OBJEXT): {$(VPATH)}missing.h
+strftime.$(OBJEXT): {$(VPATH)}oniguruma.h
+strftime.$(OBJEXT): {$(VPATH)}st.h
+strftime.$(OBJEXT): {$(VPATH)}strftime.c
+strftime.$(OBJEXT): {$(VPATH)}subst.h
+strftime.$(OBJEXT): {$(VPATH)}timev.h
+string.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+string.$(OBJEXT): $(top_srcdir)/include/ruby.h
+string.$(OBJEXT): {$(VPATH)}config.h
+string.$(OBJEXT): {$(VPATH)}defines.h
+string.$(OBJEXT): {$(VPATH)}encindex.h
+string.$(OBJEXT): {$(VPATH)}encoding.h
+string.$(OBJEXT): {$(VPATH)}gc.h
+string.$(OBJEXT): {$(VPATH)}id.h
+string.$(OBJEXT): {$(VPATH)}intern.h
+string.$(OBJEXT): {$(VPATH)}internal.h
+string.$(OBJEXT): {$(VPATH)}io.h
+string.$(OBJEXT): {$(VPATH)}missing.h
+string.$(OBJEXT): {$(VPATH)}oniguruma.h
+string.$(OBJEXT): {$(VPATH)}probes.h
+string.$(OBJEXT): {$(VPATH)}re.h
+string.$(OBJEXT): {$(VPATH)}regex.h
+string.$(OBJEXT): {$(VPATH)}st.h
+string.$(OBJEXT): {$(VPATH)}string.c
+string.$(OBJEXT): {$(VPATH)}subst.h
+string.$(OBJEXT): {$(VPATH)}vm_opts.h
+strlcat.$(OBJEXT): {$(VPATH)}config.h
+strlcat.$(OBJEXT): {$(VPATH)}missing.h
+strlcat.$(OBJEXT): {$(VPATH)}strlcat.c
+strlcpy.$(OBJEXT): {$(VPATH)}config.h
+strlcpy.$(OBJEXT): {$(VPATH)}missing.h
+strlcpy.$(OBJEXT): {$(VPATH)}strlcpy.c
+struct.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
+struct.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
+struct.$(OBJEXT): $(CCAN_DIR)/list/list.h
+struct.$(OBJEXT): $(CCAN_DIR)/str/str.h
+struct.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+struct.$(OBJEXT): $(top_srcdir)/include/ruby.h
+struct.$(OBJEXT): {$(VPATH)}config.h
+struct.$(OBJEXT): {$(VPATH)}defines.h
+struct.$(OBJEXT): {$(VPATH)}encoding.h
+struct.$(OBJEXT): {$(VPATH)}id.h
+struct.$(OBJEXT): {$(VPATH)}intern.h
+struct.$(OBJEXT): {$(VPATH)}internal.h
+struct.$(OBJEXT): {$(VPATH)}io.h
+struct.$(OBJEXT): {$(VPATH)}method.h
+struct.$(OBJEXT): {$(VPATH)}missing.h
+struct.$(OBJEXT): {$(VPATH)}node.h
+struct.$(OBJEXT): {$(VPATH)}oniguruma.h
+struct.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+struct.$(OBJEXT): {$(VPATH)}st.h
+struct.$(OBJEXT): {$(VPATH)}struct.c
+struct.$(OBJEXT): {$(VPATH)}subst.h
+struct.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
+struct.$(OBJEXT): {$(VPATH)}thread_native.h
+struct.$(OBJEXT): {$(VPATH)}vm_core.h
+struct.$(OBJEXT): {$(VPATH)}vm_debug.h
+struct.$(OBJEXT): {$(VPATH)}vm_opts.h
+symbol.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+symbol.$(OBJEXT): $(top_srcdir)/include/ruby.h
+symbol.$(OBJEXT): {$(VPATH)}config.h
+symbol.$(OBJEXT): {$(VPATH)}defines.h
+symbol.$(OBJEXT): {$(VPATH)}encoding.h
+symbol.$(OBJEXT): {$(VPATH)}gc.h
+symbol.$(OBJEXT): {$(VPATH)}id.c
+symbol.$(OBJEXT): {$(VPATH)}id.h
+symbol.$(OBJEXT): {$(VPATH)}intern.h
+symbol.$(OBJEXT): {$(VPATH)}internal.h
+symbol.$(OBJEXT): {$(VPATH)}io.h
+symbol.$(OBJEXT): {$(VPATH)}missing.h
+symbol.$(OBJEXT): {$(VPATH)}oniguruma.h
+symbol.$(OBJEXT): {$(VPATH)}probes.h
+symbol.$(OBJEXT): {$(VPATH)}st.h
+symbol.$(OBJEXT): {$(VPATH)}subst.h
+symbol.$(OBJEXT): {$(VPATH)}symbol.c
+symbol.$(OBJEXT): {$(VPATH)}id_table.c
+symbol.$(OBJEXT): {$(VPATH)}id_table.h
+symbol.$(OBJEXT): {$(VPATH)}symbol.h
+symbol.$(OBJEXT): {$(VPATH)}vm_opts.h
+thread.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
+thread.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
+thread.$(OBJEXT): $(CCAN_DIR)/list/list.h
+thread.$(OBJEXT): $(CCAN_DIR)/str/str.h
+thread.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+thread.$(OBJEXT): $(top_srcdir)/include/ruby.h
+thread.$(OBJEXT): {$(VPATH)}config.h
+thread.$(OBJEXT): {$(VPATH)}defines.h
+thread.$(OBJEXT): {$(VPATH)}encoding.h
+thread.$(OBJEXT): {$(VPATH)}eval_intern.h
+thread.$(OBJEXT): {$(VPATH)}gc.h
+thread.$(OBJEXT): {$(VPATH)}id.h
+thread.$(OBJEXT): {$(VPATH)}intern.h
+thread.$(OBJEXT): {$(VPATH)}internal.h
+thread.$(OBJEXT): {$(VPATH)}io.h
+thread.$(OBJEXT): {$(VPATH)}method.h
+thread.$(OBJEXT): {$(VPATH)}missing.h
+thread.$(OBJEXT): {$(VPATH)}node.h
+thread.$(OBJEXT): {$(VPATH)}oniguruma.h
+thread.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+thread.$(OBJEXT): {$(VPATH)}st.h
+thread.$(OBJEXT): {$(VPATH)}subst.h
+thread.$(OBJEXT): {$(VPATH)}thread.c
+thread.$(OBJEXT): {$(VPATH)}thread.h
+thread.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).c
+thread.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
+thread.$(OBJEXT): {$(VPATH)}thread_native.h
+thread.$(OBJEXT): {$(VPATH)}thread_sync.c
+thread.$(OBJEXT): {$(VPATH)}timev.h
+thread.$(OBJEXT): {$(VPATH)}vm_core.h
+thread.$(OBJEXT): {$(VPATH)}vm_debug.h
+thread.$(OBJEXT): {$(VPATH)}vm_opts.h
+time.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+time.$(OBJEXT): $(top_srcdir)/include/ruby.h
+time.$(OBJEXT): {$(VPATH)}config.h
+time.$(OBJEXT): {$(VPATH)}defines.h
+time.$(OBJEXT): {$(VPATH)}encoding.h
+time.$(OBJEXT): {$(VPATH)}intern.h
+time.$(OBJEXT): {$(VPATH)}internal.h
+time.$(OBJEXT): {$(VPATH)}io.h
+time.$(OBJEXT): {$(VPATH)}missing.h
+time.$(OBJEXT): {$(VPATH)}oniguruma.h
+time.$(OBJEXT): {$(VPATH)}st.h
+time.$(OBJEXT): {$(VPATH)}subst.h
+time.$(OBJEXT): {$(VPATH)}time.c
+time.$(OBJEXT): {$(VPATH)}timev.h
+transcode.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+transcode.$(OBJEXT): $(top_srcdir)/include/ruby.h
+transcode.$(OBJEXT): {$(VPATH)}config.h
+transcode.$(OBJEXT): {$(VPATH)}defines.h
+transcode.$(OBJEXT): {$(VPATH)}encoding.h
+transcode.$(OBJEXT): {$(VPATH)}intern.h
+transcode.$(OBJEXT): {$(VPATH)}internal.h
+transcode.$(OBJEXT): {$(VPATH)}io.h
+transcode.$(OBJEXT): {$(VPATH)}missing.h
+transcode.$(OBJEXT): {$(VPATH)}oniguruma.h
+transcode.$(OBJEXT): {$(VPATH)}st.h
+transcode.$(OBJEXT): {$(VPATH)}subst.h
+transcode.$(OBJEXT): {$(VPATH)}transcode.c
+transcode.$(OBJEXT): {$(VPATH)}transcode_data.h
+util.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+util.$(OBJEXT): $(top_srcdir)/include/ruby.h
+util.$(OBJEXT): {$(VPATH)}config.h
+util.$(OBJEXT): {$(VPATH)}defines.h
+util.$(OBJEXT): {$(VPATH)}encoding.h
+util.$(OBJEXT): {$(VPATH)}intern.h
+util.$(OBJEXT): {$(VPATH)}internal.h
+util.$(OBJEXT): {$(VPATH)}io.h
+util.$(OBJEXT): {$(VPATH)}missing.h
+util.$(OBJEXT): {$(VPATH)}oniguruma.h
+util.$(OBJEXT): {$(VPATH)}st.h
+util.$(OBJEXT): {$(VPATH)}subst.h
+util.$(OBJEXT): {$(VPATH)}util.c
+util.$(OBJEXT): {$(VPATH)}util.h
+variable.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+variable.$(OBJEXT): $(top_srcdir)/include/ruby.h
+variable.$(OBJEXT): {$(VPATH)}config.h
+variable.$(OBJEXT): {$(VPATH)}constant.h
+variable.$(OBJEXT): {$(VPATH)}defines.h
+variable.$(OBJEXT): {$(VPATH)}encoding.h
+variable.$(OBJEXT): {$(VPATH)}id.h
+variable.$(OBJEXT): {$(VPATH)}intern.h
+variable.$(OBJEXT): {$(VPATH)}internal.h
+variable.$(OBJEXT): {$(VPATH)}io.h
+variable.$(OBJEXT): {$(VPATH)}missing.h
+variable.$(OBJEXT): {$(VPATH)}oniguruma.h
+variable.$(OBJEXT): {$(VPATH)}st.h
+variable.$(OBJEXT): {$(VPATH)}subst.h
+variable.$(OBJEXT): {$(VPATH)}util.h
+variable.$(OBJEXT): {$(VPATH)}variable.c
+version.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+version.$(OBJEXT): $(hdrdir)/ruby/version.h
+version.$(OBJEXT): $(top_srcdir)/revision.h
+version.$(OBJEXT): $(top_srcdir)/version.h
+version.$(OBJEXT): {$(VPATH)}config.h
+version.$(OBJEXT): {$(VPATH)}defines.h
+version.$(OBJEXT): {$(VPATH)}intern.h
+version.$(OBJEXT): {$(VPATH)}missing.h
+version.$(OBJEXT): {$(VPATH)}st.h
+version.$(OBJEXT): {$(VPATH)}subst.h
+version.$(OBJEXT): {$(VPATH)}version.c
+vm.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
+vm.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
+vm.$(OBJEXT): $(CCAN_DIR)/list/list.h
+vm.$(OBJEXT): $(CCAN_DIR)/str/str.h
+vm.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+vm.$(OBJEXT): $(top_srcdir)/include/ruby.h
+vm.$(OBJEXT): {$(VPATH)}config.h
+vm.$(OBJEXT): {$(VPATH)}constant.h
+vm.$(OBJEXT): {$(VPATH)}defines.h
+vm.$(OBJEXT): {$(VPATH)}encoding.h
+vm.$(OBJEXT): {$(VPATH)}eval_intern.h
+vm.$(OBJEXT): {$(VPATH)}gc.h
+vm.$(OBJEXT): {$(VPATH)}id.h
+vm.$(OBJEXT): {$(VPATH)}id_table.h
+vm.$(OBJEXT): {$(VPATH)}insns.def
+vm.$(OBJEXT): {$(VPATH)}insns.inc
+vm.$(OBJEXT): {$(VPATH)}intern.h
+vm.$(OBJEXT): {$(VPATH)}internal.h
+vm.$(OBJEXT): {$(VPATH)}io.h
+vm.$(OBJEXT): {$(VPATH)}iseq.h
+vm.$(OBJEXT): {$(VPATH)}method.h
+vm.$(OBJEXT): {$(VPATH)}missing.h
+vm.$(OBJEXT): {$(VPATH)}node.h
+vm.$(OBJEXT): {$(VPATH)}oniguruma.h
+vm.$(OBJEXT): {$(VPATH)}probes.h
+vm.$(OBJEXT): {$(VPATH)}probes_helper.h
+vm.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+vm.$(OBJEXT): {$(VPATH)}st.h
+vm.$(OBJEXT): {$(VPATH)}subst.h
+vm.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
+vm.$(OBJEXT): {$(VPATH)}thread_native.h
+vm.$(OBJEXT): {$(VPATH)}vm.c
+vm.$(OBJEXT): {$(VPATH)}vm.h
+vm.$(OBJEXT): {$(VPATH)}vm.inc
+vm.$(OBJEXT): {$(VPATH)}vm_call_iseq_optimized.inc
+vm.$(OBJEXT): {$(VPATH)}vm_args.c
+vm.$(OBJEXT): {$(VPATH)}vm_core.h
+vm.$(OBJEXT): {$(VPATH)}vm_debug.h
+vm.$(OBJEXT): {$(VPATH)}vm_eval.c
+vm.$(OBJEXT): {$(VPATH)}vm_exec.c
+vm.$(OBJEXT): {$(VPATH)}vm_exec.h
+vm.$(OBJEXT): {$(VPATH)}vm_insnhelper.c
+vm.$(OBJEXT): {$(VPATH)}vm_insnhelper.h
+vm.$(OBJEXT): {$(VPATH)}vm_method.c
+vm.$(OBJEXT): {$(VPATH)}vm_opts.h
+vm.$(OBJEXT): {$(VPATH)}vmtc.inc
+vm_backtrace.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
+vm_backtrace.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
+vm_backtrace.$(OBJEXT): $(CCAN_DIR)/list/list.h
+vm_backtrace.$(OBJEXT): $(CCAN_DIR)/str/str.h
+vm_backtrace.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+vm_backtrace.$(OBJEXT): $(top_srcdir)/include/ruby.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}config.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}debug.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}defines.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}encoding.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}eval_intern.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}id.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}intern.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}io.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}iseq.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}method.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}missing.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}node.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}oniguruma.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}st.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}subst.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
+vm_backtrace.$(OBJEXT): {$(VPATH)}thread_native.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}vm_backtrace.c
+vm_backtrace.$(OBJEXT): {$(VPATH)}vm_core.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}vm_debug.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}vm_opts.h
+vm_call.$(OBJEXT): $(top_srcdir)/include/ruby.h
+vm_call.$(OBJEXT): {$(VPATH)}vm_core.h
+vm_call.$(OBJEXT): {$(VPATH)}vm_call_iseq_optimized.inc
+vm_dump.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
+vm_dump.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
+vm_dump.$(OBJEXT): $(CCAN_DIR)/list/list.h
+vm_dump.$(OBJEXT): $(CCAN_DIR)/str/str.h
+vm_dump.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+vm_dump.$(OBJEXT): $(top_srcdir)/include/ruby.h
+vm_dump.$(OBJEXT): {$(VPATH)}addr2line.h
+vm_dump.$(OBJEXT): {$(VPATH)}config.h
+vm_dump.$(OBJEXT): {$(VPATH)}defines.h
+vm_dump.$(OBJEXT): {$(VPATH)}encoding.h
+vm_dump.$(OBJEXT): {$(VPATH)}id.h
+vm_dump.$(OBJEXT): {$(VPATH)}intern.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal.h
+vm_dump.$(OBJEXT): {$(VPATH)}io.h
+vm_dump.$(OBJEXT): {$(VPATH)}iseq.h
+vm_dump.$(OBJEXT): {$(VPATH)}method.h
+vm_dump.$(OBJEXT): {$(VPATH)}missing.h
+vm_dump.$(OBJEXT): {$(VPATH)}node.h
+vm_dump.$(OBJEXT): {$(VPATH)}oniguruma.h
+vm_dump.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+vm_dump.$(OBJEXT): {$(VPATH)}st.h
+vm_dump.$(OBJEXT): {$(VPATH)}subst.h
+vm_dump.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
+vm_dump.$(OBJEXT): {$(VPATH)}thread_native.h
+vm_dump.$(OBJEXT): {$(VPATH)}vm_core.h
+vm_dump.$(OBJEXT): {$(VPATH)}vm_debug.h
+vm_dump.$(OBJEXT): {$(VPATH)}vm_dump.c
+vm_dump.$(OBJEXT): {$(VPATH)}vm_opts.h
+vm_trace.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
+vm_trace.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
+vm_trace.$(OBJEXT): $(CCAN_DIR)/list/list.h
+vm_trace.$(OBJEXT): $(CCAN_DIR)/str/str.h
+vm_trace.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+vm_trace.$(OBJEXT): $(top_srcdir)/include/ruby.h
+vm_trace.$(OBJEXT): {$(VPATH)}config.h
+vm_trace.$(OBJEXT): {$(VPATH)}debug.h
+vm_trace.$(OBJEXT): {$(VPATH)}defines.h
+vm_trace.$(OBJEXT): {$(VPATH)}encoding.h
+vm_trace.$(OBJEXT): {$(VPATH)}eval_intern.h
+vm_trace.$(OBJEXT): {$(VPATH)}id.h
+vm_trace.$(OBJEXT): {$(VPATH)}intern.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal.h
+vm_trace.$(OBJEXT): {$(VPATH)}io.h
+vm_trace.$(OBJEXT): {$(VPATH)}method.h
+vm_trace.$(OBJEXT): {$(VPATH)}missing.h
+vm_trace.$(OBJEXT): {$(VPATH)}node.h
+vm_trace.$(OBJEXT): {$(VPATH)}oniguruma.h
+vm_trace.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+vm_trace.$(OBJEXT): {$(VPATH)}st.h
+vm_trace.$(OBJEXT): {$(VPATH)}subst.h
+vm_trace.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
+vm_trace.$(OBJEXT): {$(VPATH)}thread_native.h
+vm_trace.$(OBJEXT): {$(VPATH)}vm_core.h
+vm_trace.$(OBJEXT): {$(VPATH)}vm_debug.h
+vm_trace.$(OBJEXT): {$(VPATH)}vm_opts.h
+vm_trace.$(OBJEXT): {$(VPATH)}vm_trace.c
+# AUTOGENERATED DEPENDENCIES END
diff --git a/compar.c b/compar.c
index 2f4db291a4..b040641651 100644
--- a/compar.c
+++ b/compar.c
@@ -18,17 +18,16 @@ static ID cmp;
void
rb_cmperr(VALUE x, VALUE y)
{
- const char *classname;
+ VALUE classname;
- if (SPECIAL_CONST_P(y)) {
- y = rb_inspect(y);
- classname = StringValuePtr(y);
+ if (SPECIAL_CONST_P(y) || BUILTIN_TYPE(y) == T_FLOAT) {
+ classname = rb_inspect(y);
}
else {
- classname = rb_obj_classname(y);
+ classname = rb_obj_class(y);
}
- rb_raise(rb_eArgError, "comparison of %s with %s failed",
- rb_obj_classname(x), classname);
+ rb_raise(rb_eArgError, "comparison of %"PRIsVALUE" with %"PRIsVALUE" failed",
+ rb_obj_class(x), classname);
}
static VALUE
@@ -54,26 +53,10 @@ rb_invcmp(VALUE x, VALUE y)
static VALUE
cmp_eq_recursive(VALUE arg1, VALUE arg2, int recursive)
{
- if (recursive) return Qfalse;
+ if (recursive) return Qnil;
return rb_funcallv(arg1, cmp, 1, &arg2);
}
-static VALUE
-cmp_eq(VALUE *a)
-{
- VALUE c = rb_exec_recursive_paired_outer(cmp_eq_recursive, a[0], a[1], a[1]);
-
- if (NIL_P(c)) return Qfalse;
- if (rb_cmpint(c, a[0], a[1]) == 0) return Qtrue;
- return Qfalse;
-}
-
-static VALUE
-cmp_failed(void)
-{
- return Qfalse;
-}
-
/*
* call-seq:
* obj == other -> true or false
@@ -81,20 +64,19 @@ cmp_failed(void)
* Compares two objects based on the receiver's <code><=></code>
* method, returning true if it returns 0. Also returns true if
* _obj_ and _other_ are the same object.
- *
- * Even if _obj_ <=> _other_ raised an exception, the exception
- * is ignored and returns false.
*/
static VALUE
cmp_equal(VALUE x, VALUE y)
{
- VALUE a[2];
-
+ VALUE c;
if (x == y) return Qtrue;
- a[0] = x; a[1] = y;
- return rb_rescue(cmp_eq, (VALUE)a, cmp_failed, 0);
+ c = rb_exec_recursive_paired_outer(cmp_eq_recursive, x, y, y);
+
+ if (NIL_P(c)) return Qfalse;
+ if (rb_cmpint(c, x, y) == 0) return Qtrue;
+ return Qfalse;
}
/*
@@ -203,8 +185,8 @@ cmp_between(VALUE x, VALUE min, VALUE max)
* class SizeMatters
* include Comparable
* attr :str
- * def <=>(anOther)
- * str.size <=> anOther.str.size
+ * def <=>(other)
+ * str.size <=> other.str.size
* end
* def initialize(str)
* @str = str
diff --git a/compile.c b/compile.c
index e96a9829d4..0aea3acd92 100644
--- a/compile.c
+++ b/compile.c
@@ -9,8 +9,9 @@
**********************************************************************/
-#include "ruby/ruby.h"
#include "internal.h"
+#include "ruby/re.h"
+#include "encindex.h"
#include <math.h>
#define USE_INSN_STACK_INCREASE 1
@@ -18,6 +19,16 @@
#include "iseq.h"
#include "insns.inc"
#include "insns_info.inc"
+#include "gc.h"
+
+#ifdef HAVE_DLADDR
+# include <dlfcn.h>
+#endif
+
+#undef RUBY_UNTYPED_DATA_WARNING
+#define RUBY_UNTYPED_DATA_WARNING 0
+
+#define ISEQ_TYPE_ONCE_GUARD ISEQ_TYPE_DEFINED_GUARD
#define FIXNUM_INC(n, i) ((n)+(INT2FIX(i)&~FIXNUM_FLAG))
#define FIXNUM_OR(n, i) ((n)|INT2FIX(i))
@@ -38,6 +49,13 @@ typedef struct iseq_link_anchor {
LINK_ELEMENT *last;
} LINK_ANCHOR;
+typedef enum {
+ LABEL_RESCUE_NONE,
+ LABEL_RESCUE_BEG,
+ LABEL_RESCUE_END,
+ LABEL_RESCUE_TYPE_MAX
+} LABEL_RESCUE_TYPE;
+
typedef struct iseq_label_data {
LINK_ELEMENT link;
int label_no;
@@ -45,6 +63,8 @@ typedef struct iseq_label_data {
int sc_state;
int set;
int sp;
+ int refcnt;
+ unsigned int rescued: 2;
} LABEL;
typedef struct iseq_insn_data {
@@ -94,7 +114,7 @@ struct iseq_compile_data_ensure_node_stack {
#if CPDEBUG >= 0
#define compile_debug CPDEBUG
#else
-#define compile_debug iseq->compile_data->option->debug_level
+#define compile_debug ISEQ_COMPILE_DATA(iseq)->option->debug_level
#endif
#if CPDEBUG
@@ -153,6 +173,7 @@ r_value(VALUE value)
#endif
#if CPDEBUG > 1 || CPDEBUG < 0
+#define printf ruby_debug_printf
#define debugs if (compile_debug_print_indent(1)) ruby_debug_printf
#define debug_compile(msg, v) ((void)(compile_debug_print_indent(1) && fputs((msg), stderr)), (v))
#else
@@ -164,17 +185,14 @@ r_value(VALUE value)
/* create new label */
#define NEW_LABEL(l) new_label_body(iseq, (l))
-#define iseq_path(iseq) \
- (((rb_iseq_t*)DATA_PTR(iseq))->location.path)
+#define iseq_path(iseq) ((iseq)->body->location.path)
+#define iseq_absolute_path(iseq) ((iseq)->body->location.absolute_path)
-#define iseq_absolute_path(iseq) \
- (((rb_iseq_t*)DATA_PTR(iseq))->location.absolute_path)
-
-#define NEW_ISEQVAL(node, name, type, line_no) \
+#define NEW_ISEQ(node, name, type, line_no) \
new_child_iseq(iseq, (node), rb_fstring(name), 0, (type), (line_no))
-#define NEW_CHILD_ISEQVAL(node, name, type, line_no) \
- new_child_iseq(iseq, (node), rb_fstring(name), iseq->self, (type), (line_no))
+#define NEW_CHILD_ISEQ(node, name, type, line_no) \
+ new_child_iseq(iseq, (node), rb_fstring(name), iseq, (type), (line_no))
/* add instructions */
#define ADD_SEQ(seq1, seq2) \
@@ -184,13 +202,24 @@ r_value(VALUE value)
#define ADD_INSN(seq, line, insn) \
ADD_ELEM((seq), (LINK_ELEMENT *) new_insn_body(iseq, (line), BIN(insn), 0))
+/* insert an instruction before prev */
+#define INSERT_BEFORE_INSN(prev, line, insn) \
+ INSERT_ELEM_PREV(&(prev)->link, (LINK_ELEMENT *) new_insn_body(iseq, (line), BIN(insn), 0))
+
/* add an instruction with some operands (1, 2, 3, 5) */
#define ADD_INSN1(seq, line, insn, op1) \
ADD_ELEM((seq), (LINK_ELEMENT *) \
new_insn_body(iseq, (line), BIN(insn), 1, (VALUE)(op1)))
+/* insert an instruction with some operands (1, 2, 3, 5) before prev */
+#define INSERT_BEFORE_INSN1(prev, line, insn, op1) \
+ INSERT_ELEM_PREV(&(prev)->link, (LINK_ELEMENT *) \
+ new_insn_body(iseq, (line), BIN(insn), 1, (VALUE)(op1)))
+
+#define LABEL_REF(label) ((label)->refcnt++)
+
/* add an instruction with label operand (alias of ADD_INSN1) */
-#define ADD_INSNL(seq, line, insn, label) ADD_INSN1(seq, line, insn, label)
+#define ADD_INSNL(seq, line, insn, label) (ADD_INSN1(seq, line, insn, label), LABEL_REF(label))
#define ADD_INSN2(seq, line, insn, op1, op2) \
ADD_ELEM((seq), (LINK_ELEMENT *) \
@@ -202,31 +231,36 @@ r_value(VALUE value)
/* Specific Insn factory */
#define ADD_SEND(seq, line, id, argc) \
- ADD_SEND_R((seq), (line), (id), (argc), (VALUE)Qfalse, (VALUE)INT2FIX(0))
+ ADD_SEND_R((seq), (line), (id), (argc), NULL, (VALUE)INT2FIX(0), NULL)
+
+#define ADD_SEND_WITH_FLAG(seq, line, id, argc, flag) \
+ ADD_SEND_R((seq), (line), (id), (argc), NULL, (VALUE)(flag), NULL)
+
+#define ADD_SEND_WITH_BLOCK(seq, line, id, argc, block) \
+ ADD_SEND_R((seq), (line), (id), (argc), (block), (VALUE)INT2FIX(0), NULL)
#define ADD_CALL_RECEIVER(seq, line) \
ADD_INSN((seq), (line), putself)
#define ADD_CALL(seq, line, id, argc) \
- ADD_SEND_R((seq), (line), (id), (argc), (VALUE)Qfalse, (VALUE)INT2FIX(VM_CALL_FCALL))
+ ADD_SEND_R((seq), (line), (id), (argc), NULL, (VALUE)INT2FIX(VM_CALL_FCALL), NULL)
#define ADD_CALL_WITH_BLOCK(seq, line, id, argc, block) \
- ADD_SEND_R((seq), (line), (id), (argc), (block), (VALUE)INT2FIX(VM_CALL_FCALL))
+ ADD_SEND_R((seq), (line), (id), (argc), (block), (VALUE)INT2FIX(VM_CALL_FCALL), NULL)
-#define ADD_SEND_R(seq, line, id, argc, block, flag) \
- ADD_ELEM((seq), (LINK_ELEMENT *) \
- new_insn_send(iseq, (line), \
- (VALUE)(id), (VALUE)(argc), (VALUE)(block), (VALUE)(flag)))
+#define ADD_SEND_R(seq, line, id, argc, block, flag, keywords) \
+ ADD_ELEM((seq), (LINK_ELEMENT *) new_insn_send(iseq, (line), (id), (VALUE)(argc), (block), (VALUE)(flag), (keywords)))
#define ADD_TRACE(seq, line, event) \
do { \
- if ((event) == RUBY_EVENT_LINE && iseq->coverage && \
- (line) != iseq->compile_data->last_coverable_line) { \
- RARRAY_ASET(iseq->coverage, (line) - 1, INT2FIX(0)); \
- iseq->compile_data->last_coverable_line = (line); \
+ if ((event) == RUBY_EVENT_LINE && ISEQ_COVERAGE(iseq) && \
+ (line) > 0 && \
+ (line) != ISEQ_COMPILE_DATA(iseq)->last_coverable_line) { \
+ RARRAY_ASET(ISEQ_COVERAGE(iseq), (line) - 1, INT2FIX(0)); \
+ ISEQ_COMPILE_DATA(iseq)->last_coverable_line = (line); \
ADD_INSN1((seq), (line), trace, INT2FIX(RUBY_EVENT_COVERAGE)); \
} \
- if (iseq->compile_data->option->trace_instruction) { \
+ if (ISEQ_COMPILE_DATA(iseq)->option->trace_instruction) { \
ADD_INSN1((seq), (line), trace, INT2FIX(event)); \
} \
} while (0)
@@ -244,11 +278,15 @@ r_value(VALUE value)
#define ADD_ADJUST_RESTORE(seq, label) \
ADD_ELEM((seq), (LINK_ELEMENT *) new_adjust_body(iseq, (label), -1))
-#define ADD_CATCH_ENTRY(type, ls, le, iseqv, lc) \
- (rb_ary_push(iseq->compile_data->catch_table_ary, \
- rb_ary_new3(5, (type), \
- (VALUE)(ls) | 1, (VALUE)(le) | 1, \
- (VALUE)(iseqv), (VALUE)(lc) | 1)))
+#define ADD_CATCH_ENTRY(type, ls, le, iseqv, lc) do { \
+ VALUE _e = rb_ary_new3(5, (type), \
+ (VALUE)(ls) | 1, (VALUE)(le) | 1, \
+ (VALUE)(iseqv), (VALUE)(lc) | 1); \
+ if (ls) LABEL_REF(ls); \
+ if (le) LABEL_REF(le); \
+ if (lc) LABEL_REF(lc); \
+ rb_ary_push(ISEQ_COMPILE_DATA(iseq)->catch_table_ary, freeze_hide_obj(_e)); \
+} while (0)
/* compile node */
#define COMPILE(anchor, desc, node) \
@@ -265,6 +303,11 @@ r_value(VALUE value)
(debug_compile("== " desc "\n", \
iseq_compile_each(iseq, (anchor), (node), (poped))))
+#define COMPILE_RECV(anchor, desc, node) \
+ (private_recv_p(node) ? \
+ (ADD_INSN(anchor, nd_line(node), putself), VM_CALL_FCALL) : \
+ (COMPILE(anchor, desc, node->nd_recv), 0))
+
#define OPERAND_AT(insn, idx) \
(((INSN*)(insn))->operands[(idx)])
@@ -272,20 +315,69 @@ r_value(VALUE value)
(((INSN*)(insn))->insn_id)
/* error */
-#define COMPILE_ERROR(strs) \
-{ \
- VALUE tmp = GET_THREAD()->errinfo; \
- if (compile_debug) rb_compile_bug strs; \
- GET_THREAD()->errinfo = iseq->compile_data->err_info; \
- rb_compile_error strs; \
- RB_OBJ_WRITE(iseq->self, &iseq->compile_data->err_info, GET_THREAD()->errinfo); \
- GET_THREAD()->errinfo = tmp; \
- ret = 0; \
- break; \
+typedef void (*compile_error_func)(VALUE, int, const char *, ...);
+
+static void
+append_compile_error(VALUE file, int line, const char *fmt, ...)
+{
+ VALUE err_info = rb_errinfo();
+ VALUE str = rb_attr_get(err_info, idMesg);
+ va_list args;
+
+ if (RSTRING_LEN(str)) rb_str_cat2(str, "\n");
+ if (file) {
+ rb_str_concat(str, file);
+ if (line) rb_str_catf(str, ":%d", line);
+ rb_str_cat2(str, ": ");
+ }
+ va_start(args, fmt);
+ rb_str_vcatf(str, fmt, args);
+ va_end(args);
+}
+
+NOINLINE(static compile_error_func prepare_compile_error(rb_iseq_t *iseq));
+
+static compile_error_func
+prepare_compile_error(rb_iseq_t *iseq)
+{
+ VALUE err_info = ISEQ_COMPILE_DATA(iseq)->err_info;
+ if (compile_debug) return rb_compile_bug_str;
+ if (NIL_P(err_info)) {
+ err_info = rb_exc_new_cstr(rb_eSyntaxError, "");
+ RB_OBJ_WRITE(iseq, &ISEQ_COMPILE_DATA(iseq)->err_info, err_info);
+ }
+ rb_set_errinfo(err_info);
+ return append_compile_error;
}
-#define ERROR_ARGS ruby_sourcefile, nd_line(node),
+#define COMPILE_ERROR prepare_compile_error(iseq)
+
+#define ERROR_ARGS_AT(n) ruby_sourcefile_string, nd_line(n),
+#define ERROR_ARGS ERROR_ARGS_AT(node)
+
+#define EXPECT_NODE(prefix, node, ndtype) \
+do { \
+ NODE *error_node = (node); \
+ enum node_type error_type = nd_type(error_node); \
+ if (error_type != (ndtype)) { \
+ rb_compile_bug_str(ERROR_ARGS_AT(error_node) \
+ prefix ": " #ndtype " is expected, but %s", \
+ ruby_node_name(error_type)); \
+ } \
+} while (0)
+
+#define EXPECT_NODE_NONULL(prefix, parent, ndtype) \
+do { \
+ rb_compile_bug_str(ERROR_ARGS_AT(parent) \
+ prefix ": must be " #ndtype ", but 0"); \
+} while (0)
+#define UNKNOWN_NODE(prefix, node) \
+do { \
+ NODE *error_node = (node); \
+ rb_compile_bug_str(ERROR_ARGS_AT(error_node) prefix ": unknown node (%s)", \
+ ruby_node_name(nd_type(error_node))); \
+} while (0)
#define COMPILE_OK 1
#define COMPILE_NG 0
@@ -298,7 +390,13 @@ r_value(VALUE value)
#define INIT_ANCHOR(name) \
(name##_body__.last = &name##_body__.anchor, name = &name##_body__)
-#define hide_obj(obj) do {OBJ_FREEZE(obj); RBASIC_CLEAR_CLASS(obj);} while (0)
+static inline VALUE
+freeze_hide_obj(VALUE obj)
+{
+ OBJ_FREEZE(obj);
+ RBASIC_CLEAR_CLASS(obj);
+ return obj;
+}
#include "optinsn.inc"
#if OPT_INSTRUCTIONS_UNIFICATION
@@ -315,10 +413,7 @@ r_value(VALUE value)
#endif
#if CPDEBUG
-#define gl_node_level iseq->compile_data->node_level
-#if 0
-static void debug_list(ISEQ_ARG_DECLARE LINK_ANCHOR *anchor);
-#endif
+#define gl_node_level ISEQ_COMPILE_DATA(iseq)->node_level
#endif
static void dump_disasm_list(LINK_ELEMENT *elem);
@@ -326,7 +421,7 @@ static void dump_disasm_list(LINK_ELEMENT *elem);
static int insn_data_length(INSN *iobj);
static int calc_sp_depth(int depth, INSN *iobj);
-static INSN *new_insn_body(rb_iseq_t *iseq, int line_no, int insn_id, int argc, ...);
+static INSN *new_insn_body(rb_iseq_t *iseq, int line_no, enum ruby_vminsn_type insn_id, int argc, ...);
static LABEL *new_label_body(rb_iseq_t *iseq, long line);
static ADJUST *new_adjust_body(rb_iseq_t *iseq, LABEL *label, int line);
@@ -335,7 +430,7 @@ static int iseq_setup(rb_iseq_t *iseq, LINK_ANCHOR *anchor);
static int iseq_optimize(rb_iseq_t *iseq, LINK_ANCHOR *anchor);
static int iseq_insns_unification(rb_iseq_t *iseq, LINK_ANCHOR *anchor);
-static int iseq_set_local_table(rb_iseq_t *iseq, ID *tbl);
+static int iseq_set_local_table(rb_iseq_t *iseq, const ID *tbl);
static int iseq_set_exception_local_table(rb_iseq_t *iseq);
static int iseq_set_arguments(rb_iseq_t *iseq, LINK_ANCHOR *anchor, NODE * node);
@@ -407,11 +502,11 @@ APPEND_ELEM(ISEQ_ARG_DECLARE LINK_ANCHOR *anchor, LINK_ELEMENT *before, LINK_ELE
}
#if CPDEBUG < 0
#define ADD_ELEM(anchor, elem) ADD_ELEM(iseq, (anchor), (elem))
-#define APPEND_ELEM(anchor, before, elem) ADD_ELEM(iseq, (anchor), (before), (elem))
+#define APPEND_ELEM(anchor, before, elem) APPEND_ELEM(iseq, (anchor), (before), (elem))
#endif
static int
-iseq_add_mark_object(rb_iseq_t *iseq, VALUE v)
+iseq_add_mark_object(const rb_iseq_t *iseq, VALUE v)
{
if (!SPECIAL_CONST_P(v)) {
rb_iseq_add_mark_object(iseq, v);
@@ -419,13 +514,14 @@ iseq_add_mark_object(rb_iseq_t *iseq, VALUE v)
return COMPILE_OK;
}
-#define ruby_sourcefile RSTRING_PTR(iseq->location.path)
+#define ruby_sourcefile_string (iseq->body->location.path)
+#define ruby_sourcefile RSTRING_PTR(iseq->body->location.path)
static int
-iseq_add_mark_object_compile_time(rb_iseq_t *iseq, VALUE v)
+iseq_add_mark_object_compile_time(const rb_iseq_t *iseq, VALUE v)
{
if (!SPECIAL_CONST_P(v)) {
- rb_ary_push(iseq->compile_data->mark_ary, v);
+ rb_ary_push(ISEQ_COMPILE_DATA(iseq)->mark_ary, v);
}
return COMPILE_OK;
}
@@ -437,10 +533,9 @@ validate_label(st_data_t name, st_data_t label, st_data_t arg)
LABEL *lobj = (LABEL *)label;
if (!lobj->link.next) {
do {
- int ret;
- COMPILE_ERROR((ruby_sourcefile, lobj->position,
- "%s: undefined label", rb_id2name((ID)name)));
- if (ret) break;
+ COMPILE_ERROR(ruby_sourcefile_string, lobj->position,
+ "%"PRIsVALUE": undefined label",
+ rb_id2str((ID)name));
} while (0);
}
return ST_CONTINUE;
@@ -450,18 +545,14 @@ static void
validate_labels(rb_iseq_t *iseq, st_table *labels_table)
{
st_foreach(labels_table, validate_label, (st_data_t)iseq);
- if (!NIL_P(iseq->compile_data->err_info)) {
- rb_exc_raise(iseq->compile_data->err_info);
- }
+ st_free_table(labels_table);
}
VALUE
-rb_iseq_compile_node(VALUE self, NODE *node)
+rb_iseq_compile_node(rb_iseq_t *iseq, NODE *node)
{
DECL_ANCHOR(ret);
- rb_iseq_t *iseq;
INIT_ANCHOR(ret);
- GetISeqPtr(self, iseq);
if (node == 0) {
COMPILE(ret, "nil", node);
@@ -472,14 +563,17 @@ rb_iseq_compile_node(VALUE self, NODE *node)
iseq_set_local_table(iseq, node->nd_tbl);
iseq_set_arguments(iseq, ret, node->nd_args);
- switch (iseq->type) {
+ switch (iseq->body->type) {
case ISEQ_TYPE_BLOCK:
{
- LABEL *start = iseq->compile_data->start_label = NEW_LABEL(0);
- LABEL *end = iseq->compile_data->end_label = NEW_LABEL(0);
+ LABEL *start = ISEQ_COMPILE_DATA(iseq)->start_label = NEW_LABEL(0);
+ LABEL *end = ISEQ_COMPILE_DATA(iseq)->end_label = NEW_LABEL(0);
+
+ start->rescued = LABEL_RESCUE_BEG;
+ end->rescued = LABEL_RESCUE_END;
+ ADD_TRACE(ret, FIX2INT(iseq->body->location.first_lineno), RUBY_EVENT_B_CALL);
ADD_LABEL(ret, start);
- ADD_TRACE(ret, FIX2INT(iseq->location.first_lineno), RUBY_EVENT_B_CALL);
COMPILE(ret, "block body", node->nd_body);
ADD_LABEL(ret, end);
ADD_TRACE(ret, nd_line(node), RUBY_EVENT_B_RETURN);
@@ -491,14 +585,14 @@ rb_iseq_compile_node(VALUE self, NODE *node)
}
case ISEQ_TYPE_CLASS:
{
- ADD_TRACE(ret, FIX2INT(iseq->location.first_lineno), RUBY_EVENT_CLASS);
+ ADD_TRACE(ret, FIX2INT(iseq->body->location.first_lineno), RUBY_EVENT_CLASS);
COMPILE(ret, "scoped node", node->nd_body);
ADD_TRACE(ret, nd_line(node), RUBY_EVENT_END);
break;
}
case ISEQ_TYPE_METHOD:
{
- ADD_TRACE(ret, FIX2INT(iseq->location.first_lineno), RUBY_EVENT_CALL);
+ ADD_TRACE(ret, FIX2INT(iseq->body->location.first_lineno), RUBY_EVENT_CALL);
COMPILE(ret, "scoped node", node->nd_body);
ADD_TRACE(ret, nd_line(node), RUBY_EVENT_RETURN);
break;
@@ -509,21 +603,22 @@ rb_iseq_compile_node(VALUE self, NODE *node)
}
}
}
- else if (nd_type(node) == NODE_IFUNC) {
+ else if (RB_TYPE_P((VALUE)node, T_IMEMO)) {
+ const struct vm_ifunc *ifunc = (struct vm_ifunc *)node;
/* user callback */
- (*node->nd_cfnc)(iseq, ret, node->nd_tval);
+ (*ifunc->func)(iseq, ret, ifunc->data);
}
else {
- switch (iseq->type) {
+ switch (iseq->body->type) {
case ISEQ_TYPE_METHOD:
case ISEQ_TYPE_CLASS:
case ISEQ_TYPE_BLOCK:
case ISEQ_TYPE_EVAL:
case ISEQ_TYPE_MAIN:
case ISEQ_TYPE_TOP:
- rb_compile_error(ERROR_ARGS "compile/should not be reached: %s:%d",
- __FILE__, __LINE__);
- break;
+ COMPILE_ERROR(ERROR_ARGS "compile/should not be reached: %s:%d",
+ __FILE__, __LINE__);
+ return COMPILE_NG;
case ISEQ_TYPE_RESCUE:
iseq_set_exception_local_table(iseq);
COMPILE(ret, "rescue", node);
@@ -533,25 +628,27 @@ rb_iseq_compile_node(VALUE self, NODE *node)
COMPILE_POPED(ret, "ensure", node);
break;
case ISEQ_TYPE_DEFINED_GUARD:
- iseq_set_local_table(iseq, 0);
+ iseq_set_exception_local_table(iseq);
COMPILE(ret, "defined guard", node);
break;
default:
- rb_bug("unknown scope");
+ rb_compile_bug_str(ERROR_ARGS "unknown scope");
}
}
- if (iseq->type == ISEQ_TYPE_RESCUE || iseq->type == ISEQ_TYPE_ENSURE) {
+ if (iseq->body->type == ISEQ_TYPE_RESCUE || iseq->body->type == ISEQ_TYPE_ENSURE) {
ADD_INSN2(ret, 0, getlocal, INT2FIX(2), INT2FIX(0));
ADD_INSN1(ret, 0, throw, INT2FIX(0) /* continue throw */ );
}
else {
- ADD_INSN(ret, iseq->compile_data->last_line, leave);
+ ADD_INSN(ret, ISEQ_COMPILE_DATA(iseq)->last_line, leave);
}
#if SUPPORT_JOKE
- if (iseq->compile_data->labels_table) {
- validate_labels(iseq, iseq->compile_data->labels_table);
+ if (ISEQ_COMPILE_DATA(iseq)->labels_table) {
+ st_table *labels_table = ISEQ_COMPILE_DATA(iseq)->labels_table;
+ ISEQ_COMPILE_DATA(iseq)->labels_table = 0;
+ validate_labels(iseq, labels_table);
}
#endif
return iseq_setup(iseq, ret);
@@ -562,54 +659,150 @@ rb_iseq_translate_threaded_code(rb_iseq_t *iseq)
{
#if OPT_DIRECT_THREADED_CODE || OPT_CALL_THREADED_CODE
const void * const *table = rb_vm_get_insns_address_table();
- unsigned long i;
-
- iseq->iseq_encoded = ALLOC_N(VALUE, iseq->iseq_size);
- MEMCPY(iseq->iseq_encoded, iseq->iseq, VALUE, iseq->iseq_size);
+ unsigned int i;
+ VALUE *encoded = (VALUE *)iseq->body->iseq_encoded;
- for (i = 0; i < iseq->iseq_size; /* */ ) {
- int insn = (int)iseq->iseq_encoded[i];
+ for (i = 0; i < iseq->body->iseq_size; /* */ ) {
+ int insn = (int)iseq->body->iseq_encoded[i];
int len = insn_len(insn);
- iseq->iseq_encoded[i] = (VALUE)table[insn];
+ encoded[i] = (VALUE)table[insn];
i += len;
}
-#else
- iseq->iseq_encoded = iseq->iseq;
#endif
return COMPILE_OK;
}
+#if OPT_DIRECT_THREADED_CODE || OPT_CALL_THREADED_CODE
+static int
+rb_vm_insn_addr2insn(const void *addr) /* cold path */
+{
+ int insn;
+ const void * const *table = rb_vm_get_insns_address_table();
+
+ for (insn = 0; insn < VM_INSTRUCTION_SIZE; insn++) {
+ if (table[insn] == addr) {
+ return insn;
+ }
+ }
+ rb_bug("rb_vm_insn_addr2insn: invalid insn address: %p", addr);
+}
+#endif
+
+VALUE *
+rb_iseq_original_iseq(const rb_iseq_t *iseq) /* cold path */
+{
+ VALUE *original_code;
+
+ if (ISEQ_ORIGINAL_ISEQ(iseq)) return ISEQ_ORIGINAL_ISEQ(iseq);
+ original_code = ISEQ_ORIGINAL_ISEQ_ALLOC(iseq, iseq->body->iseq_size);
+ MEMCPY(original_code, iseq->body->iseq_encoded, VALUE, iseq->body->iseq_size);
+
+#if OPT_DIRECT_THREADED_CODE || OPT_CALL_THREADED_CODE
+ {
+ unsigned int i;
+
+ for (i = 0; i < iseq->body->iseq_size; /* */ ) {
+ const void *addr = (const void *)original_code[i];
+ const int insn = rb_vm_insn_addr2insn(addr);
+
+ original_code[i] = insn;
+ i += insn_len(insn);
+ }
+ }
+#endif
+ return original_code;
+}
+
/*********************************************/
/* definition of data structure for compiler */
/*********************************************/
+/*
+ * On 32-bit SPARC, GCC by default generates SPARC V7 code that may require
+ * 8-byte word alignment. On the other hand, Oracle Solaris Studio seems to
+ * generate SPARCV8PLUS code with unaligned memory access instructions.
+ * That is why the STRICT_ALIGNMENT is defined only with GCC.
+ */
+#if defined(__sparc) && SIZEOF_VOIDP == 4 && defined(__GNUC__)
+ #define STRICT_ALIGNMENT
+#endif
+
+#ifdef STRICT_ALIGNMENT
+ #if defined(HAVE_TRUE_LONG_LONG) && SIZEOF_LONG_LONG > SIZEOF_VALUE
+ #define ALIGNMENT_SIZE SIZEOF_LONG_LONG
+ #else
+ #define ALIGNMENT_SIZE SIZEOF_VALUE
+ #endif
+ #define PADDING_SIZE_MAX ((size_t)((ALIGNMENT_SIZE) - 1))
+ #define ALIGNMENT_SIZE_MASK PADDING_SIZE_MAX
+ /* Note: ALIGNMENT_SIZE == (2 ** N) is expected. */
+#else
+ #define PADDING_SIZE_MAX 0
+#endif /* STRICT_ALIGNMENT */
+
+#ifdef STRICT_ALIGNMENT
+/* calculate padding size for aligned memory access */
+static size_t
+calc_padding(void *ptr, size_t size)
+{
+ size_t mis;
+ size_t padding = 0;
+
+ mis = (size_t)ptr & ALIGNMENT_SIZE_MASK;
+ if (mis > 0) {
+ padding = ALIGNMENT_SIZE - mis;
+ }
+/*
+ * On 32-bit sparc or equivalents, when a single VALUE is requested
+ * and padding == sizeof(VALUE), it is clear that no padding is needed.
+ */
+#if ALIGNMENT_SIZE > SIZEOF_VALUE
+ if (size == sizeof(VALUE) && padding == sizeof(VALUE)) {
+ padding = 0;
+ }
+#endif
+
+ return padding;
+}
+#endif /* STRICT_ALIGNMENT */
+
static void *
compile_data_alloc(rb_iseq_t *iseq, size_t size)
{
void *ptr = 0;
struct iseq_compile_data_storage *storage =
- iseq->compile_data->storage_current;
+ ISEQ_COMPILE_DATA(iseq)->storage_current;
+#ifdef STRICT_ALIGNMENT
+ size_t padding = calc_padding((void *)&storage->buff[storage->pos], size);
+#else
+ const size_t padding = 0; /* expected to be optimized by compiler */
+#endif /* STRICT_ALIGNMENT */
- if (storage->pos + size > storage->size) {
- unsigned long alloc_size = storage->size * 2;
+ if (size >= INT_MAX - padding) rb_memerror();
+ if (storage->pos + size + padding > storage->size) {
+ unsigned int alloc_size = storage->size;
- retry:
- if (alloc_size < size) {
+ while (alloc_size < size + PADDING_SIZE_MAX) {
+ if (alloc_size >= INT_MAX / 2) rb_memerror();
alloc_size *= 2;
- goto retry;
}
storage->next = (void *)ALLOC_N(char, alloc_size +
- sizeof(struct
- iseq_compile_data_storage));
- storage = iseq->compile_data->storage_current = storage->next;
+ SIZEOF_ISEQ_COMPILE_DATA_STORAGE);
+ storage = ISEQ_COMPILE_DATA(iseq)->storage_current = storage->next;
storage->next = 0;
storage->pos = 0;
storage->size = alloc_size;
- storage->buff = (char *)(&storage->buff + 1);
+#ifdef STRICT_ALIGNMENT
+ padding = calc_padding((void *)&storage->buff[storage->pos], size);
+#endif /* STRICT_ALIGNMENT */
}
+#ifdef STRICT_ALIGNMENT
+ storage->pos += (int)padding;
+#endif /* STRICT_ALIGNMENT */
+
ptr = (void *)&storage->buff[storage->pos];
- storage->pos += size;
+ storage->pos += (int)size;
return ptr;
}
@@ -645,9 +838,8 @@ INSERT_ELEM_NEXT(LINK_ELEMENT *elem1, LINK_ELEMENT *elem2)
}
}
-#if 0 /* unused */
/*
- * elemX, elem1 => elemX, elem2, elem1
+ * elem1, elemX => elemX, elem2, elem1
*/
static void
INSERT_ELEM_PREV(LINK_ELEMENT *elem1, LINK_ELEMENT *elem2)
@@ -659,8 +851,8 @@ INSERT_ELEM_PREV(LINK_ELEMENT *elem1, LINK_ELEMENT *elem2)
elem2->prev->next = elem2;
}
}
-#endif
+#if 0
/*
* elemX, elem1, elemY => elemX, elem2, elemY
*/
@@ -676,6 +868,7 @@ REPLACE_ELEM(LINK_ELEMENT *elem1, LINK_ELEMENT *elem2)
elem1->next->prev = elem2;
}
}
+#endif
static void
REMOVE_ELEM(LINK_ELEMENT *elem)
@@ -692,13 +885,11 @@ FIRST_ELEMENT(LINK_ANCHOR *anchor)
return anchor->anchor.next;
}
-#if 0 /* unused */
static LINK_ELEMENT *
LAST_ELEMENT(LINK_ANCHOR *anchor)
{
- return anchor->last;
+ return anchor->last;
}
-#endif
static LINK_ELEMENT *
POP_ELEMENT(ISEQ_ARG_DECLARE LINK_ANCHOR *anchor)
@@ -713,32 +904,6 @@ POP_ELEMENT(ISEQ_ARG_DECLARE LINK_ANCHOR *anchor)
#define POP_ELEMENT(anchor) POP_ELEMENT(iseq, (anchor))
#endif
-#if 0 /* unused */
-static LINK_ELEMENT *
-SHIFT_ELEMENT(LINK_ANCHOR *anchor)
-{
- LINK_ELEMENT *elem = anchor->anchor.next;
- if (elem) {
- anchor->anchor.next = elem->next;
- }
- return elem;
-}
-#endif
-
-#if 0 /* unused */
-static int
-LIST_SIZE(LINK_ANCHOR *anchor)
-{
- LINK_ELEMENT *elem = anchor->anchor.next;
- int size = 0;
- while (elem) {
- size += 1;
- elem = elem->next;
- }
- return size;
-}
-#endif
-
static int
LIST_SIZE_ZERO(LINK_ANCHOR *anchor)
{
@@ -800,65 +965,6 @@ INSERT_LIST(ISEQ_ARG_DECLARE LINK_ANCHOR *anc1, LINK_ANCHOR *anc2)
#define INSERT_LIST(anc1, anc2) INSERT_LIST(iseq, (anc1), (anc2))
#endif
-#if 0 /* unused */
-/*
- * anc1: e1, e2, e3
- * anc2: e4, e5
- *#=>
- * anc1: e4, e5
- * anc2: e1, e2, e3
- */
-static void
-SWAP_LIST(ISEQ_ARG_DECLARE LINK_ANCHOR *anc1, LINK_ANCHOR *anc2)
-{
- LINK_ANCHOR tmp = *anc2;
-
- /* it has bug */
- *anc2 = *anc1;
- *anc1 = tmp;
-
- verify_list("swap1", anc1);
- verify_list("swap2", anc2);
-}
-#if CPDEBUG < 0
-#define SWAP_LIST(anc1, anc2) SWAP_LIST(iseq, (anc1), (anc2))
-#endif
-
-static LINK_ANCHOR *
-REVERSE_LIST(ISEQ_ARG_DECLARE LINK_ANCHOR *anc)
-{
- LINK_ELEMENT *first, *last, *elem, *e;
- first = &anc->anchor;
- elem = first->next;
- last = anc->last;
-
- if (elem != 0) {
- anc->anchor.next = last;
- anc->last = elem;
- }
- else {
- /* null list */
- return anc;
- }
- while (elem) {
- e = elem->next;
- elem->next = elem->prev;
- elem->prev = e;
- elem = e;
- }
-
- first->next = last;
- last->prev = first;
- anc->last->next = 0;
-
- verify_list("reverse", anc);
- return anc;
-}
-#if CPDEBUG < 0
-#define REVERSE_LIST(anc) REVERSE_LIST(iseq, (anc))
-#endif
-#endif
-
#if CPDEBUG && 0
static void
debug_list(ISEQ_ARG_DECLARE LINK_ANCHOR *anchor)
@@ -890,9 +996,12 @@ new_label_body(rb_iseq_t *iseq, long line)
labelobj->link.type = ISEQ_ELEMENT_LABEL;
labelobj->link.next = 0;
- labelobj->label_no = iseq->compile_data->label_no++;
+ labelobj->label_no = ISEQ_COMPILE_DATA(iseq)->label_no++;
labelobj->sc_state = 0;
labelobj->sp = -1;
+ labelobj->refcnt = 0;
+ labelobj->set = 0;
+ labelobj->rescued = LABEL_RESCUE_NONE;
return labelobj;
}
@@ -925,7 +1034,7 @@ new_insn_core(rb_iseq_t *iseq, int line_no,
}
static INSN *
-new_insn_body(rb_iseq_t *iseq, int line_no, int insn_id, int argc, ...)
+new_insn_body(rb_iseq_t *iseq, int line_no, enum ruby_vminsn_type insn_id, int argc, ...)
{
VALUE *operands = 0;
va_list argv;
@@ -942,61 +1051,65 @@ new_insn_body(rb_iseq_t *iseq, int line_no, int insn_id, int argc, ...)
return new_insn_core(iseq, line_no, insn_id, argc, operands);
}
-static rb_call_info_t *
-new_callinfo(rb_iseq_t *iseq, ID mid, int argc, VALUE block, unsigned long flag)
+static struct rb_call_info *
+new_callinfo(rb_iseq_t *iseq, ID mid, int argc, unsigned int flag, struct rb_call_info_kw_arg *kw_arg, int has_blockiseq)
{
- rb_call_info_t *ci = (rb_call_info_t *)compile_data_alloc(iseq, sizeof(rb_call_info_t));
+ size_t size = kw_arg != NULL ? sizeof(struct rb_call_info_with_kwarg) : sizeof(struct rb_call_info);
+ struct rb_call_info *ci = (struct rb_call_info *)compile_data_alloc(iseq, size);
+ struct rb_call_info_with_kwarg *ci_kw = (struct rb_call_info_with_kwarg *)ci;
+
ci->mid = mid;
ci->flag = flag;
ci->orig_argc = argc;
- ci->argc = argc;
- if (block) {
- GetISeqPtr(block, ci->blockiseq);
+ if (kw_arg) {
+ ci->flag |= VM_CALL_KWARG;
+ ci_kw->kw_arg = kw_arg;
+ ci->orig_argc += kw_arg->keyword_len;
+ iseq->body->ci_kw_size++;
}
else {
- ci->blockiseq = 0;
- if (!(ci->flag & (VM_CALL_ARGS_SPLAT | VM_CALL_ARGS_BLOCKARG))) {
- ci->flag |= VM_CALL_ARGS_SKIP_SETUP;
- }
+ iseq->body->ci_size++;
}
- ci->method_state = 0;
- ci->class_serial = 0;
- ci->blockptr = 0;
- ci->recv = Qundef;
- ci->call = 0; /* TODO: should set default function? */
-
- ci->aux.index = iseq->callinfo_size++;
+ if (!(ci->flag & (VM_CALL_ARGS_SPLAT | VM_CALL_ARGS_BLOCKARG)) &&
+ kw_arg == NULL && !has_blockiseq) {
+ ci->flag |= VM_CALL_ARGS_SIMPLE;
+ }
return ci;
}
static INSN *
-new_insn_send(rb_iseq_t *iseq, int line_no, VALUE id, VALUE argc, VALUE block, VALUE flag)
+new_insn_send(rb_iseq_t *iseq, int line_no, ID id, VALUE argc, const rb_iseq_t *blockiseq, VALUE flag, struct rb_call_info_kw_arg *keywords)
{
- VALUE *operands = (VALUE *)compile_data_alloc(iseq, sizeof(VALUE) * 1);
- operands[0] = (VALUE)new_callinfo(iseq, SYM2ID(id), FIX2INT(argc), block, FIX2INT(flag));
- return new_insn_core(iseq, line_no, BIN(send), 1, operands);
+ VALUE *operands = (VALUE *)compile_data_alloc(iseq, sizeof(VALUE) * 3);
+ operands[0] = (VALUE)new_callinfo(iseq, id, FIX2INT(argc), FIX2INT(flag), keywords, blockiseq != NULL);
+ operands[1] = Qfalse; /* cache */
+ operands[2] = (VALUE)blockiseq;
+ return new_insn_core(iseq, line_no, BIN(send), 3, operands);
}
-static VALUE
+static rb_iseq_t *
new_child_iseq(rb_iseq_t *iseq, NODE *node,
- VALUE name, VALUE parent, enum iseq_type type, int line_no)
+ VALUE name, const rb_iseq_t *parent, enum iseq_type type, int line_no)
{
- VALUE ret;
+ rb_iseq_t *ret_iseq;
debugs("[new_child_iseq]> ---------------------------------------\n");
- ret = rb_iseq_new_with_opt(node, name,
- iseq_path(iseq->self), iseq_absolute_path(iseq->self),
- INT2FIX(line_no), parent, type, iseq->compile_data->option);
+ ret_iseq = rb_iseq_new_with_opt(node, name,
+ iseq_path(iseq), iseq_absolute_path(iseq),
+ INT2FIX(line_no), parent, type, ISEQ_COMPILE_DATA(iseq)->option);
debugs("[new_child_iseq]< ---------------------------------------\n");
- iseq_add_mark_object(iseq, ret);
- return ret;
+ iseq_add_mark_object(iseq, (VALUE)ret_iseq);
+ return ret_iseq;
}
static int
iseq_setup(rb_iseq_t *iseq, LINK_ANCHOR *anchor)
{
+ if (RTEST(ISEQ_COMPILE_DATA(iseq)->err_info))
+ return COMPILE_NG;
+
/* debugs("[compile step 2] (iseq_array_to_linkedlist)\n"); */
if (compile_debug > 5)
@@ -1008,14 +1121,14 @@ iseq_setup(rb_iseq_t *iseq, LINK_ANCHOR *anchor)
if (compile_debug > 5)
dump_disasm_list(FIRST_ELEMENT(anchor));
- if (iseq->compile_data->option->instructions_unification) {
+ if (ISEQ_COMPILE_DATA(iseq)->option->instructions_unification) {
debugs("[compile step 3.2 (iseq_insns_unification)]\n");
iseq_insns_unification(iseq, anchor);
if (compile_debug > 5)
dump_disasm_list(FIRST_ELEMENT(anchor));
}
- if (iseq->compile_data->option->stack_caching) {
+ if (ISEQ_COMPILE_DATA(iseq)->option->stack_caching) {
debugs("[compile step 3.3 (iseq_set_sequence_stackcaching)]\n");
iseq_set_sequence_stackcaching(iseq, anchor);
if (compile_debug > 5)
@@ -1023,70 +1136,73 @@ iseq_setup(rb_iseq_t *iseq, LINK_ANCHOR *anchor)
}
debugs("[compile step 4.1 (iseq_set_sequence)]\n");
- iseq_set_sequence(iseq, anchor);
+ if (!iseq_set_sequence(iseq, anchor)) return COMPILE_NG;
if (compile_debug > 5)
dump_disasm_list(FIRST_ELEMENT(anchor));
debugs("[compile step 4.2 (iseq_set_exception_table)]\n");
- iseq_set_exception_table(iseq);
+ if (!iseq_set_exception_table(iseq)) return COMPILE_NG;
debugs("[compile step 4.3 (set_optargs_table)] \n");
- iseq_set_optargs_table(iseq);
+ if (!iseq_set_optargs_table(iseq)) return COMPILE_NG;
debugs("[compile step 5 (iseq_translate_threaded_code)] \n");
- rb_iseq_translate_threaded_code(iseq);
+ if (!rb_iseq_translate_threaded_code(iseq)) return COMPILE_NG;
if (compile_debug > 1) {
- VALUE str = rb_iseq_disasm(iseq->self);
+ VALUE str = rb_iseq_disasm(iseq);
printf("%s\n", StringValueCStr(str));
- fflush(stdout);
}
debugs("[compile step: finish]\n");
- return 0;
+ return COMPILE_OK;
}
static int
iseq_set_exception_local_table(rb_iseq_t *iseq)
{
+ /* TODO: every id table is same -> share it.
+ * Current problem is iseq_free().
+ */
ID id_dollar_bang;
+ ID *ids = (ID *)ALLOC_N(ID, 1);
CONST_ID(id_dollar_bang, "#$!");
- iseq->local_table = (ID *)ALLOC_N(ID, 1);
- iseq->local_table_size = 1;
- iseq->local_size = iseq->local_table_size + 1;
- iseq->local_table[0] = id_dollar_bang;
+ iseq->body->local_table_size = 1;
+ iseq->body->local_size = iseq->body->local_table_size + 1;
+ ids[0] = id_dollar_bang;
+ iseq->body->local_table = ids;
return COMPILE_OK;
}
static int
-get_lvar_level(rb_iseq_t *iseq)
+get_lvar_level(const rb_iseq_t *iseq)
{
int lev = 0;
- while (iseq != iseq->local_iseq) {
+ while (iseq != iseq->body->local_iseq) {
lev++;
- iseq = iseq->parent_iseq;
+ iseq = iseq->body->parent_iseq;
}
return lev;
}
static int
-get_dyna_var_idx_at_raw(rb_iseq_t *iseq, ID id)
+get_dyna_var_idx_at_raw(const rb_iseq_t *iseq, ID id)
{
- int i;
+ unsigned int i;
- for (i = 0; i < iseq->local_table_size; i++) {
- if (iseq->local_table[i] == id) {
- return i;
+ for (i = 0; i < iseq->body->local_table_size; i++) {
+ if (iseq->body->local_table[i] == id) {
+ return (int)i;
}
}
return -1;
}
static int
-get_local_var_idx(rb_iseq_t *iseq, ID id)
+get_local_var_idx(const rb_iseq_t *iseq, ID id)
{
- int idx = get_dyna_var_idx_at_raw(iseq->local_iseq, id);
+ int idx = get_dyna_var_idx_at_raw(iseq->body->local_iseq, id);
if (idx < 0) {
rb_bug("get_local_var_idx: %d", idx);
@@ -1096,7 +1212,7 @@ get_local_var_idx(rb_iseq_t *iseq, ID id)
}
static int
-get_dyna_var_idx(rb_iseq_t *iseq, ID id, int *level, int *ls)
+get_dyna_var_idx(const rb_iseq_t *iseq, ID id, int *level, int *ls)
{
int lv = 0, idx = -1;
@@ -1105,7 +1221,7 @@ get_dyna_var_idx(rb_iseq_t *iseq, ID id, int *level, int *ls)
if (idx >= 0) {
break;
}
- iseq = iseq->parent_iseq;
+ iseq = iseq->body->parent_iseq;
lv++;
}
@@ -1114,10 +1230,117 @@ get_dyna_var_idx(rb_iseq_t *iseq, ID id, int *level, int *ls)
}
*level = lv;
- *ls = iseq->local_size;
+ *ls = iseq->body->local_size;
return idx;
}
+static void
+iseq_calc_param_size(rb_iseq_t *iseq)
+{
+ if (iseq->body->param.flags.has_opt ||
+ iseq->body->param.flags.has_post ||
+ iseq->body->param.flags.has_rest ||
+ iseq->body->param.flags.has_block ||
+ iseq->body->param.flags.has_kw ||
+ iseq->body->param.flags.has_kwrest) {
+
+ if (iseq->body->param.flags.has_block) {
+ iseq->body->param.size = iseq->body->param.block_start + 1;
+ }
+ else if (iseq->body->param.flags.has_kwrest) {
+ iseq->body->param.size = iseq->body->param.keyword->rest_start + 1;
+ }
+ else if (iseq->body->param.flags.has_kw) {
+ iseq->body->param.size = iseq->body->param.keyword->bits_start + 1;
+ }
+ else if (iseq->body->param.flags.has_post) {
+ iseq->body->param.size = iseq->body->param.post_start + iseq->body->param.post_num;
+ }
+ else if (iseq->body->param.flags.has_rest) {
+ iseq->body->param.size = iseq->body->param.rest_start + 1;
+ }
+ else if (iseq->body->param.flags.has_opt) {
+ iseq->body->param.size = iseq->body->param.lead_num + iseq->body->param.opt_num;
+ }
+ else {
+ rb_bug("unreachable");
+ }
+ }
+ else {
+ iseq->body->param.size = iseq->body->param.lead_num;
+ }
+}
+
+static void
+iseq_set_arguments_keywords(rb_iseq_t *iseq, LINK_ANCHOR *optargs, const struct rb_args_info *args)
+{
+ NODE *node = args->kw_args;
+ struct rb_iseq_param_keyword *keyword;
+ const VALUE default_values = rb_ary_tmp_new(1);
+ const VALUE complex_mark = rb_str_tmp_new(0);
+ int kw = 0, rkw = 0, di = 0, i;
+
+ iseq->body->param.flags.has_kw = TRUE;
+ iseq->body->param.keyword = keyword = ZALLOC_N(struct rb_iseq_param_keyword, 1);
+ keyword->bits_start = get_dyna_var_idx_at_raw(iseq, args->kw_rest_arg->nd_vid);
+
+ while (node) {
+ NODE *val_node = node->nd_body->nd_value;
+ VALUE dv;
+
+ if (val_node == (NODE *)-1) {
+ ++rkw;
+ }
+ else {
+ switch (nd_type(val_node)) {
+ case NODE_LIT:
+ dv = val_node->nd_lit;
+ iseq_add_mark_object(iseq, dv);
+ break;
+ case NODE_NIL:
+ dv = Qnil;
+ break;
+ case NODE_TRUE:
+ dv = Qtrue;
+ break;
+ case NODE_FALSE:
+ dv = Qfalse;
+ break;
+ default:
+ COMPILE_POPED(optargs, "kwarg", node); /* nd_type(node) == NODE_KW_ARG */
+ dv = complex_mark;
+ }
+
+ keyword->num = ++di;
+ rb_ary_push(default_values, dv);
+ }
+
+ kw++;
+ node = node->nd_next;
+ }
+
+ keyword->num = kw;
+
+ if (args->kw_rest_arg->nd_cflag != 0) {
+ keyword->rest_start = get_dyna_var_idx_at_raw(iseq, args->kw_rest_arg->nd_cflag);
+ iseq->body->param.flags.has_kwrest = TRUE;
+ }
+ keyword->required_num = rkw;
+ keyword->table = &iseq->body->local_table[keyword->bits_start - keyword->num];
+
+ {
+ VALUE *dvs = ALLOC_N(VALUE, RARRAY_LEN(default_values));
+
+ for (i = 0; i < RARRAY_LEN(default_values); i++) {
+ VALUE dv = RARRAY_AREF(default_values, i);
+ if (dv == complex_mark) dv = Qundef;
+ dvs[i] = dv;
+ }
+
+ keyword->default_values = dvs;
+ }
+}
+
static int
iseq_set_arguments(rb_iseq_t *iseq, LINK_ANCHOR *optargs, NODE *node_args)
{
@@ -1129,14 +1352,11 @@ iseq_set_arguments(rb_iseq_t *iseq, LINK_ANCHOR *optargs, NODE *node_args)
int last_comma = 0;
ID block_id = 0;
- if (nd_type(node_args) != NODE_ARGS) {
- rb_bug("iseq_set_arguments: NODE_ARGS is expected, but %s",
- ruby_node_name(nd_type(node_args)));
- }
-
+ EXPECT_NODE("iseq_set_arguments", node_args, NODE_ARGS);
- iseq->argc = (int)args->pre_args_num;
- debugs(" - argc: %d\n", iseq->argc);
+ iseq->body->param.lead_num = (int)args->pre_args_num;
+ if (iseq->body->param.lead_num > 0) iseq->body->param.flags.has_lead = TRUE;
+ debugs(" - argc: %d\n", iseq->body->param.lead_num);
rest_id = args->rest_arg;
if (rest_id == 1) {
@@ -1146,14 +1366,16 @@ iseq_set_arguments(rb_iseq_t *iseq, LINK_ANCHOR *optargs, NODE *node_args)
block_id = args->block_arg;
if (args->first_post_arg) {
- iseq->arg_post_start = get_dyna_var_idx_at_raw(iseq, args->first_post_arg);
- iseq->arg_post_len = args->post_args_num;
+ iseq->body->param.post_start = get_dyna_var_idx_at_raw(iseq, args->first_post_arg);
+ iseq->body->param.post_num = args->post_args_num;
+ iseq->body->param.flags.has_post = TRUE;
}
if (args->opt_args) {
NODE *node = args->opt_args;
LABEL *label;
VALUE labels = rb_ary_tmp_new(1);
+ VALUE *opt_table;
int i = 0, j;
while (node) {
@@ -1169,60 +1391,28 @@ iseq_set_arguments(rb_iseq_t *iseq, LINK_ANCHOR *optargs, NODE *node_args)
label = NEW_LABEL(nd_line(node_args));
rb_ary_push(labels, (VALUE)label | 1);
ADD_LABEL(optargs, label);
- i += 1;
- iseq->arg_opts = i;
- iseq->arg_opt_table = ALLOC_N(VALUE, i);
- MEMCPY(iseq->arg_opt_table, RARRAY_CONST_PTR(labels), VALUE, i);
- for (j = 0; j < i; j++) {
- iseq->arg_opt_table[j] &= ~1;
+ opt_table = ALLOC_N(VALUE, i+1);
+
+ MEMCPY(opt_table, RARRAY_CONST_PTR(labels), VALUE, i+1);
+ for (j = 0; j < i+1; j++) {
+ opt_table[j] &= ~1;
}
rb_ary_clear(labels);
- }
- else {
- iseq->arg_opts = 0;
+
+ iseq->body->param.flags.has_opt = TRUE;
+ iseq->body->param.opt_num = i;
+ iseq->body->param.opt_table = opt_table;
}
if (args->kw_args) {
- NODE *node = args->kw_args;
- VALUE keywords = rb_ary_tmp_new(1);
- VALUE required = 0;
- int i = 0, j, r = 0;
-
- iseq->arg_keyword = get_dyna_var_idx_at_raw(iseq, args->kw_rest_arg->nd_vid);
- COMPILE(optargs, "kwarg", args->kw_rest_arg);
- while (node) {
- VALUE list = keywords;
- if (node->nd_body->nd_value == (NODE *)-1) {
- ++r;
- if (!required) required = rb_ary_tmp_new(1);
- list = required;
- }
- rb_ary_push(list, INT2FIX(node->nd_body->nd_vid));
- COMPILE_POPED(optargs, "kwarg", node); /* nd_type(node) == NODE_KW_ARG */
- node = node->nd_next;
- i += 1;
- }
- iseq->arg_keyword_check = args->kw_rest_arg->nd_cflag != 0;
- iseq->arg_keywords = i;
- iseq->arg_keyword_required = r;
- iseq->arg_keyword_table = ALLOC_N(ID, i);
- if (r) {
- rb_ary_concat(required, keywords);
- keywords = required;
- }
- for (j = 0; j < i; j++) {
- iseq->arg_keyword_table[j] = FIX2INT(RARRAY_AREF(keywords, j));
- }
- ADD_INSN(optargs, nd_line(args->kw_args), pop);
+ iseq_set_arguments_keywords(iseq, optargs, args);
}
else if (args->kw_rest_arg) {
- iseq->arg_keyword = get_dyna_var_idx_at_raw(iseq, args->kw_rest_arg->nd_vid);
- COMPILE(optargs, "kwarg", args->kw_rest_arg);
- ADD_INSN(optargs, nd_line(args->kw_rest_arg), pop);
- }
- else {
- iseq->arg_keyword = -1;
+ struct rb_iseq_param_keyword *keyword = ZALLOC_N(struct rb_iseq_param_keyword, 1);
+ keyword->rest_start = get_dyna_var_idx_at_raw(iseq, args->kw_rest_arg->nd_vid);
+ iseq->body->param.keyword = keyword;
+ iseq->body->param.flags.has_kwrest = TRUE;
}
if (args->pre_init) { /* m_init */
@@ -1233,70 +1423,42 @@ iseq_set_arguments(rb_iseq_t *iseq, LINK_ANCHOR *optargs, NODE *node_args)
}
if (rest_id) {
- iseq->arg_rest = get_dyna_var_idx_at_raw(iseq, rest_id);
+ iseq->body->param.rest_start = get_dyna_var_idx_at_raw(iseq, rest_id);
+ iseq->body->param.flags.has_rest = TRUE;
+ assert(iseq->body->param.rest_start != -1);
- if (iseq->arg_rest == -1) {
- rb_bug("arg_rest: -1");
- }
-
- if (iseq->arg_post_start == 0) {
- iseq->arg_post_start = iseq->arg_rest + 1;
+ if (iseq->body->param.post_start == 0) { /* TODO: why that? */
+ iseq->body->param.post_start = iseq->body->param.rest_start + 1;
}
}
if (block_id) {
- iseq->arg_block = get_dyna_var_idx_at_raw(iseq, block_id);
+ iseq->body->param.block_start = get_dyna_var_idx_at_raw(iseq, block_id);
+ iseq->body->param.flags.has_block = TRUE;
}
- if (iseq->arg_opts != 0 || iseq->arg_post_len != 0 ||
- iseq->arg_rest != -1 || iseq->arg_block != -1 ||
- iseq->arg_keyword != -1) {
- iseq->arg_simple = 0;
+ iseq_calc_param_size(iseq);
- /* set arg_size: size of arguments */
- if (iseq->arg_keyword != -1) {
- iseq->arg_size = iseq->arg_keyword + 1;
- }
- else if (iseq->arg_block != -1) {
- iseq->arg_size = iseq->arg_block + 1;
- }
- else if (iseq->arg_post_len) {
- iseq->arg_size = iseq->arg_post_start + iseq->arg_post_len;
- }
- else if (iseq->arg_rest != -1) {
- iseq->arg_size = iseq->arg_rest + 1;
- }
- else if (iseq->arg_opts) {
- iseq->arg_size = iseq->argc + iseq->arg_opts - 1;
- }
- else {
- iseq->arg_size = iseq->argc;
- }
- }
- else {
- iseq->arg_simple = 1;
- iseq->arg_size = iseq->argc;
- }
+ if (iseq->body->type == ISEQ_TYPE_BLOCK) {
+ if (iseq->body->param.flags.has_opt == FALSE &&
+ iseq->body->param.flags.has_post == FALSE &&
+ iseq->body->param.flags.has_rest == FALSE &&
+ iseq->body->param.flags.has_kw == FALSE &&
+ iseq->body->param.flags.has_kwrest == FALSE) {
- if (iseq->type == ISEQ_TYPE_BLOCK) {
- if (iseq->arg_opts == 0 && iseq->arg_post_len == 0 &&
- iseq->arg_rest == -1 && iseq->arg_keyword == -1) {
- if (iseq->argc == 1 && last_comma == 0) {
+ if (iseq->body->param.lead_num == 1 && last_comma == 0) {
/* {|a|} */
- iseq->arg_simple |= 0x02;
+ iseq->body->param.flags.ambiguous_param0 = TRUE;
}
}
}
}
- else {
- iseq->arg_simple = 1;
- }
return COMPILE_OK;
}
static int
-iseq_set_local_table(rb_iseq_t *iseq, ID *tbl)
+iseq_set_local_table(rb_iseq_t *iseq, const ID *tbl)
{
int size;
@@ -1309,12 +1471,13 @@ iseq_set_local_table(rb_iseq_t *iseq, ID *tbl)
}
if (size > 0) {
- iseq->local_table = (ID *)ALLOC_N(ID, size);
- MEMCPY(iseq->local_table, tbl, ID, size);
+ ID *ids = (ID *)ALLOC_N(ID, size);
+ MEMCPY(ids, tbl, ID, size);
+ iseq->body->local_table = ids;
}
- iseq->local_size = iseq->local_table_size = size;
- iseq->local_size += 1;
+ iseq->body->local_size = iseq->body->local_table_size = size;
+ iseq->body->local_size += 1;
/*
if (lfp == dfp ) { // top, class, method
dfp[-1]: svar
@@ -1323,7 +1486,7 @@ iseq_set_local_table(rb_iseq_t *iseq, ID *tbl)
}
*/
- debugs("iseq_set_local_table: %d, %d\n", iseq->local_size, iseq->local_table_size);
+ debugs("iseq_set_local_table: %d, %d\n", iseq->body->local_size, iseq->body->local_table_size);
return COMPILE_OK;
}
@@ -1380,32 +1543,30 @@ cdhash_set_label_i(VALUE key, VALUE val, void *ptr)
static int
iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *anchor)
{
- LABEL *lobj;
- INSN *iobj;
struct iseq_line_info_entry *line_info_table;
unsigned int last_line = 0;
LINK_ELEMENT *list;
VALUE *generated_iseq;
- int k, pos, sp, stack_max = 0, line = 0;
+ int insn_num, code_index, line_info_index, sp, stack_max = 0, line = 0;
- /* set label position */
+ /* fix label position */
list = FIRST_ELEMENT(anchor);
- k = pos = 0;
+ insn_num = code_index = 0;
while (list) {
switch (list->type) {
case ISEQ_ELEMENT_INSN:
{
- iobj = (INSN *)list;
+ INSN *iobj = (INSN *)list;
line = iobj->line_no;
- pos += insn_data_length(iobj);
- k++;
+ code_index += insn_data_length(iobj);
+ insn_num++;
break;
}
case ISEQ_ELEMENT_LABEL:
{
- lobj = (LABEL *)list;
- lobj->position = pos;
+ LABEL *lobj = (LABEL *)list;
+ lobj->position = code_index;
lobj->set = TRUE;
break;
}
@@ -1418,31 +1579,32 @@ iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *anchor)
{
ADJUST *adjust = (ADJUST *)list;
if (adjust->line_no != -1) {
- pos += 2 /* insn + 1 operand */;
- k++;
+ code_index += 2 /* insn + 1 operand */;
+ insn_num++;
}
break;
}
default:
dump_disasm_list(FIRST_ELEMENT(anchor));
dump_disasm_list(list);
- rb_compile_error(RSTRING_PTR(iseq->location.path), line,
- "error: set_sequence");
- break;
+ COMPILE_ERROR(ruby_sourcefile_string, line, "error: set_sequence");
+ return COMPILE_NG;
}
list = list->next;
}
/* make instruction sequence */
- generated_iseq = ALLOC_N(VALUE, pos);
- line_info_table = ALLOC_N(struct iseq_line_info_entry, k);
- iseq->is_entries = ALLOC_N(union iseq_inline_storage_entry, iseq->is_size);
- MEMZERO(iseq->is_entries, union iseq_inline_storage_entry, iseq->is_size);
- iseq->callinfo_entries = ALLOC_N(rb_call_info_t, iseq->callinfo_size);
- /* MEMZERO(iseq->callinfo_entries, rb_call_info_t, iseq->callinfo_size); */
+ generated_iseq = ALLOC_N(VALUE, code_index);
+ line_info_table = ALLOC_N(struct iseq_line_info_entry, insn_num);
+ iseq->body->is_entries = ZALLOC_N(union iseq_inline_storage_entry, iseq->body->is_size);
+ iseq->body->ci_entries = (struct rb_call_info *)ruby_xmalloc(sizeof(struct rb_call_info) * iseq->body->ci_size +
+ sizeof(struct rb_call_info_with_kwarg) * iseq->body->ci_kw_size);
+ iseq->body->cc_entries = ZALLOC_N(struct rb_call_cache, iseq->body->ci_size + iseq->body->ci_kw_size);
+
+ ISEQ_COMPILE_DATA(iseq)->ci_index = ISEQ_COMPILE_DATA(iseq)->ci_kw_index = 0;
list = FIRST_ELEMENT(anchor);
- k = pos = sp = 0;
+ line_info_index = code_index = sp = 0;
while (list) {
switch (list->type) {
@@ -1451,8 +1613,7 @@ iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *anchor)
int j, len, insn;
const char *types;
VALUE *operands;
-
- iobj = (INSN *)list;
+ INSN *iobj = (INSN *)list;
/* update sp */
sp = calc_sp_depth(sp, iobj);
@@ -1463,7 +1624,7 @@ iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *anchor)
/* fprintf(stderr, "insn: %-16s, sp: %d\n", insn_name(iobj->insn_id), sp); */
operands = iobj->operands;
insn = iobj->insn_id;
- generated_iseq[pos] = insn;
+ generated_iseq[code_index] = insn;
types = insn_op_types(insn);
len = insn_len(insn);
@@ -1471,12 +1632,12 @@ iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *anchor)
if (iobj->operand_size != len - 1) {
/* printf("operand size miss! (%d, %d)\n", iobj->operand_size, len); */
dump_disasm_list(list);
- rb_compile_error(RSTRING_PTR(iseq->location.path), iobj->line_no,
- "operand size miss! (%d for %d)",
- iobj->operand_size, len - 1);
xfree(generated_iseq);
xfree(line_info_table);
- return 0;
+ COMPILE_ERROR(ruby_sourcefile_string, iobj->line_no,
+ "operand size miss! (%d for %d)",
+ iobj->operand_size, len - 1);
+ return COMPILE_NG;
}
for (j = 0; types[j]; j++) {
@@ -1486,15 +1647,16 @@ iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *anchor)
case TS_OFFSET:
{
/* label(destination position) */
- lobj = (LABEL *)operands[j];
+ LABEL *lobj = (LABEL *)operands[j];
if (!lobj->set) {
- rb_compile_error(RSTRING_PTR(iseq->location.path), iobj->line_no,
- "unknown label");
+ COMPILE_ERROR(ruby_sourcefile_string, iobj->line_no,
+ "unknown label");
+ return COMPILE_NG;
}
if (lobj->sp == -1) {
lobj->sp = sp;
}
- generated_iseq[pos + 1 + j] = lobj->position - (pos + len);
+ generated_iseq[code_index + 1 + j] = lobj->position - (code_index + len);
break;
}
case TS_CDHASH:
@@ -1502,87 +1664,102 @@ iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *anchor)
VALUE map = operands[j];
struct cdhash_set_label_struct data;
data.hash = map;
- data.pos = pos;
+ data.pos = code_index;
data.len = len;
rb_hash_foreach(map, cdhash_set_label_i, (VALUE)&data);
- hide_obj(map);
- generated_iseq[pos + 1 + j] = map;
+ rb_hash_rehash(map);
+ freeze_hide_obj(map);
+ generated_iseq[code_index + 1 + j] = map;
break;
}
case TS_LINDEX:
case TS_NUM: /* ulong */
- generated_iseq[pos + 1 + j] = FIX2INT(operands[j]);
+ generated_iseq[code_index + 1 + j] = FIX2INT(operands[j]);
break;
case TS_ISEQ: /* iseq */
{
VALUE v = operands[j];
- rb_iseq_t *block = 0;
- if (v) {
- GetISeqPtr(v, block);
- }
- generated_iseq[pos + 1 + j] = (VALUE)block;
+ generated_iseq[code_index + 1 + j] = v;
break;
}
case TS_VALUE: /* VALUE */
{
VALUE v = operands[j];
- generated_iseq[pos + 1 + j] = v;
+ generated_iseq[code_index + 1 + j] = v;
/* to mark ruby object */
iseq_add_mark_object(iseq, v);
break;
}
case TS_IC: /* inline cache */
{
- int ic_index = FIX2INT(operands[j]);
- IC ic = (IC)&iseq->is_entries[ic_index];
- if (UNLIKELY(ic_index >= iseq->is_size)) {
- rb_bug("iseq_set_sequence: ic_index overflow: index: %d, size: %d", ic_index, iseq->is_size);
+ unsigned int ic_index = FIX2UINT(operands[j]);
+ IC ic = (IC)&iseq->body->is_entries[ic_index];
+ if (UNLIKELY(ic_index >= iseq->body->is_size)) {
+ rb_bug("iseq_set_sequence: ic_index overflow: index: %d, size: %d", ic_index, iseq->body->is_size);
}
- generated_iseq[pos + 1 + j] = (VALUE)ic;
+ generated_iseq[code_index + 1 + j] = (VALUE)ic;
break;
}
case TS_CALLINFO: /* call info */
{
- rb_call_info_t *base_ci = (rb_call_info_t *)operands[j];
- rb_call_info_t *ci = &iseq->callinfo_entries[base_ci->aux.index];
- *ci = *base_ci;
-
- if (UNLIKELY(base_ci->aux.index >= iseq->callinfo_size)) {
- rb_bug("iseq_set_sequence: ci_index overflow: index: %d, size: %d", base_ci->argc, iseq->callinfo_size);
+ struct rb_call_info *base_ci = (struct rb_call_info *)operands[j];
+ struct rb_call_info *ci;
+
+ if (base_ci->flag & VM_CALL_KWARG) {
+ struct rb_call_info_with_kwarg *ci_kw_entries = (struct rb_call_info_with_kwarg *)&iseq->body->ci_entries[iseq->body->ci_size];
+ struct rb_call_info_with_kwarg *ci_kw = &ci_kw_entries[ISEQ_COMPILE_DATA(iseq)->ci_kw_index++];
+ *ci_kw = *((struct rb_call_info_with_kwarg *)base_ci);
+ ci = (struct rb_call_info *)ci_kw;
+ assert(ISEQ_COMPILE_DATA(iseq)->ci_kw_index <= iseq->body->ci_kw_size);
+ }
+ else {
+ ci = &iseq->body->ci_entries[ISEQ_COMPILE_DATA(iseq)->ci_index++];
+ *ci = *base_ci;
+ assert(ISEQ_COMPILE_DATA(iseq)->ci_index <= iseq->body->ci_size);
}
- generated_iseq[pos + 1 + j] = (VALUE)ci;
+
+ generated_iseq[code_index + 1 + j] = (VALUE)ci;
+ break;
+ }
+ case TS_CALLCACHE:
+ {
+ struct rb_call_cache *cc = &iseq->body->cc_entries[ISEQ_COMPILE_DATA(iseq)->ci_index + ISEQ_COMPILE_DATA(iseq)->ci_kw_index - 1];
+ generated_iseq[code_index + 1 + j] = (VALUE)cc;
break;
}
case TS_ID: /* ID */
- generated_iseq[pos + 1 + j] = SYM2ID(operands[j]);
+ generated_iseq[code_index + 1 + j] = SYM2ID(operands[j]);
break;
case TS_GENTRY:
{
struct rb_global_entry *entry =
(struct rb_global_entry *)(operands[j] & (~1));
- generated_iseq[pos + 1 + j] = (VALUE)entry;
+ generated_iseq[code_index + 1 + j] = (VALUE)entry;
}
break;
+ case TS_FUNCPTR:
+ generated_iseq[code_index + 1 + j] = operands[j];
+ break;
default:
- rb_compile_error(RSTRING_PTR(iseq->location.path), iobj->line_no,
- "unknown operand type: %c", type);
xfree(generated_iseq);
xfree(line_info_table);
- return 0;
+ COMPILE_ERROR(ruby_sourcefile_string, iobj->line_no,
+ "unknown operand type: %c", type);
+ return COMPILE_NG;
}
}
if (last_line != iobj->line_no) {
- line_info_table[k].line_no = last_line = iobj->line_no;
- line_info_table[k].position = pos;
- k++;
+ line_info_table[line_info_index].line_no = last_line = iobj->line_no;
+ line_info_table[line_info_index].position = code_index;
+ line_info_index++;
}
- pos += len;
+ code_index += len;
break;
}
case ISEQ_ELEMENT_LABEL:
{
- lobj = (LABEL *)list;
+ LABEL *lobj = (LABEL *)list;
if (lobj->sp == -1) {
lobj->sp = sp;
}
@@ -1606,25 +1783,26 @@ iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *anchor)
if (adjust->line_no != -1) {
if (orig_sp - sp > 0) {
if (last_line != (unsigned int)adjust->line_no) {
- line_info_table[k].line_no = last_line = adjust->line_no;
- line_info_table[k].position = pos;
- k++;
+ line_info_table[line_info_index].line_no = last_line = adjust->line_no;
+ line_info_table[line_info_index].position = code_index;
+ line_info_index++;
}
- generated_iseq[pos++] = BIN(adjuststack);
- generated_iseq[pos++] = orig_sp - sp;
+ generated_iseq[code_index++] = BIN(adjuststack);
+ generated_iseq[code_index++] = orig_sp - sp;
}
else if (orig_sp - sp == 0) {
/* jump to next insn */
if (last_line != (unsigned int)adjust->line_no) {
- line_info_table[k].line_no = last_line = adjust->line_no;
- line_info_table[k].position = pos;
- k++;
+ line_info_table[line_info_index].line_no = last_line = adjust->line_no;
+ line_info_table[line_info_index].position = code_index;
+ line_info_index++;
}
- generated_iseq[pos++] = BIN(jump);
- generated_iseq[pos++] = 0;
+ generated_iseq[code_index++] = BIN(nop);
+ generated_iseq[code_index++] = BIN(nop);
}
else {
- rb_bug("iseq_set_sequence: adjust bug");
+ rb_compile_bug_str(ruby_sourcefile_string, adjust->line_no,
+ "iseq_set_sequence: adjust bug %d < %d", orig_sp, sp);
}
}
break;
@@ -1636,20 +1814,13 @@ iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *anchor)
list = list->next;
}
-#if 0 /* XXX */
- /* this check need dead code elimination */
- if (sp != 1) {
- rb_bug("SP is not 0 on %s (%d)\n", RSTRING_PTR(iseq->name), sp);
- }
-#endif
+ iseq->body->iseq_encoded = (void *)generated_iseq;
+ iseq->body->iseq_size = code_index;
+ iseq->body->stack_max = stack_max;
- iseq->iseq = (void *)generated_iseq;
- iseq->iseq_size = pos;
- iseq->stack_max = stack_max;
-
- line_info_table = ruby_xrealloc(line_info_table, k * sizeof(struct iseq_line_info_entry));
- iseq->line_info_table = line_info_table;
- iseq->line_info_size = k;
+ REALLOC_N(line_info_table, struct iseq_line_info_entry, line_info_index);
+ iseq->body->line_info_table = line_info_table;
+ iseq->body->line_info_size = line_info_index;
return COMPILE_OK;
}
@@ -1670,47 +1841,53 @@ static int
iseq_set_exception_table(rb_iseq_t *iseq)
{
const VALUE *tptr, *ptr;
- int tlen, i;
+ unsigned int tlen, i;
struct iseq_catch_table_entry *entry;
- tlen = (int)RARRAY_LEN(iseq->compile_data->catch_table_ary);
- tptr = RARRAY_CONST_PTR(iseq->compile_data->catch_table_ary);
+ tlen = (int)RARRAY_LEN(ISEQ_COMPILE_DATA(iseq)->catch_table_ary);
+ tptr = RARRAY_CONST_PTR(ISEQ_COMPILE_DATA(iseq)->catch_table_ary);
- iseq->catch_table = tlen ? ALLOC_N(struct iseq_catch_table_entry, tlen) : 0;
- iseq->catch_table_size = tlen;
+ if (tlen > 0) {
+ struct iseq_catch_table *table = xmalloc(iseq_catch_table_bytes(tlen));
+ table->size = tlen;
- for (i = 0; i < tlen; i++) {
- ptr = RARRAY_CONST_PTR(tptr[i]);
- entry = &iseq->catch_table[i];
- entry->type = (enum catch_type)(ptr[0] & 0xffff);
- entry->start = label_get_position((LABEL *)(ptr[1] & ~1));
- entry->end = label_get_position((LABEL *)(ptr[2] & ~1));
- entry->iseq = ptr[3];
+ for (i = 0; i < table->size; i++) {
+ ptr = RARRAY_CONST_PTR(tptr[i]);
+ entry = &table->entries[i];
+ entry->type = (enum catch_type)(ptr[0] & 0xffff);
+ entry->start = label_get_position((LABEL *)(ptr[1] & ~1));
+ entry->end = label_get_position((LABEL *)(ptr[2] & ~1));
+ entry->iseq = (rb_iseq_t *)ptr[3];
- /* register iseq as mark object */
- if (entry->iseq != 0) {
- iseq_add_mark_object(iseq, entry->iseq);
- }
-
- /* stack depth */
- if (ptr[4]) {
- LABEL *lobj = (LABEL *)(ptr[4] & ~1);
- entry->cont = label_get_position(lobj);
- entry->sp = label_get_sp(lobj);
+ /* register iseq as mark object */
+ if (entry->iseq != 0) {
+ iseq_add_mark_object(iseq, (VALUE)entry->iseq);
+ }
- /* TODO: Dirty Hack! Fix me */
- if (entry->type == CATCH_TYPE_RESCUE ||
- entry->type == CATCH_TYPE_BREAK ||
- entry->type == CATCH_TYPE_NEXT) {
- entry->sp--;
+ /* stack depth */
+ if (ptr[4]) {
+ LABEL *lobj = (LABEL *)(ptr[4] & ~1);
+ entry->cont = label_get_position(lobj);
+ entry->sp = label_get_sp(lobj);
+
+ /* TODO: Dirty Hack! Fix me */
+ if (entry->type == CATCH_TYPE_RESCUE ||
+ entry->type == CATCH_TYPE_BREAK ||
+ entry->type == CATCH_TYPE_NEXT) {
+ entry->sp--;
+ }
+ }
+ else {
+ entry->cont = 0;
}
}
- else {
- entry->cont = 0;
- }
+ iseq->body->catch_table = table;
+ RB_OBJ_WRITE(iseq, &ISEQ_COMPILE_DATA(iseq)->catch_table_ary, 0); /* free */
+ }
+ else {
+ iseq->body->catch_table = NULL;
}
- RB_OBJ_WRITE(iseq->self, &iseq->compile_data->catch_table_ary, 0); /* free */
return COMPILE_OK;
}
@@ -1727,11 +1904,11 @@ static int
iseq_set_optargs_table(rb_iseq_t *iseq)
{
int i;
+ VALUE *opt_table = (VALUE *)iseq->body->param.opt_table;
- if (iseq->arg_opts != 0) {
- for (i = 0; i < iseq->arg_opts; i++) {
- iseq->arg_opt_table[i] =
- label_get_position((LABEL *)iseq->arg_opt_table[i]);
+ if (iseq->body->param.flags.has_opt) {
+ for (i = 0; i < iseq->body->param.opt_num + 1; i++) {
+ opt_table[i] = label_get_position((LABEL *)opt_table[i]);
}
}
return COMPILE_OK;
@@ -1781,6 +1958,50 @@ get_prev_insn(INSN *iobj)
return 0;
}
+static void
+unref_destination(INSN *iobj)
+{
+ LABEL *lobj = (LABEL *)OPERAND_AT(iobj, 0);
+ --lobj->refcnt;
+ if (!lobj->refcnt) REMOVE_ELEM(&lobj->link);
+}
+
+static void
+replace_destination(INSN *dobj, INSN *nobj)
+{
+ VALUE n = OPERAND_AT(nobj, 0);
+ LABEL *dl = (LABEL *)OPERAND_AT(dobj, 0);
+ LABEL *nl = (LABEL *)n;
+ --dl->refcnt;
+ ++nl->refcnt;
+ OPERAND_AT(dobj, 0) = n;
+ if (!dl->refcnt) REMOVE_ELEM(&dl->link);
+}
+
+static int
+remove_unreachable_chunk(LINK_ELEMENT *i)
+{
+ int removed = 0;
+ while (i) {
+ if (i->type == ISEQ_ELEMENT_INSN) {
+ switch (INSN_OF(i)) {
+ case BIN(jump):
+ case BIN(branchif):
+ case BIN(branchunless):
+ case BIN(branchnil):
+ unref_destination((INSN *)i);
+ default:
+ break;
+ }
+ }
+ else break;
+ REMOVE_ELEM(i);
+ removed = 1;
+ i = i->next;
+ }
+ return removed;
+}
+
static int
iseq_peephole_optimize(rb_iseq_t *iseq, LINK_ELEMENT *list, const int do_tailcallopt)
{
@@ -1808,13 +2029,14 @@ iseq_peephole_optimize(rb_iseq_t *iseq, LINK_ELEMENT *list, const int do_tailcal
* =>
* LABEL:
*/
+ unref_destination(iobj);
REMOVE_ELEM(&iobj->link);
}
- else if (iobj != diobj && diobj->insn_id == BIN(jump)) {
- if (OPERAND_AT(iobj, 0) != OPERAND_AT(diobj, 0)) {
- OPERAND_AT(iobj, 0) = OPERAND_AT(diobj, 0);
- goto again;
- }
+ else if (iobj != diobj && diobj->insn_id == BIN(jump) &&
+ OPERAND_AT(iobj, 0) != OPERAND_AT(diobj, 0)) {
+ replace_destination(iobj, diobj);
+ remove_unreachable_chunk(iobj->link.next);
+ goto again;
}
else if (diobj->insn_id == BIN(leave)) {
/*
@@ -1828,14 +2050,14 @@ iseq_peephole_optimize(rb_iseq_t *iseq, LINK_ELEMENT *list, const int do_tailcal
* LABEL:
* leave
*/
- INSN *eiobj = new_insn_core(iseq, iobj->line_no, BIN(leave),
- diobj->operand_size, diobj->operands);
INSN *popiobj = new_insn_core(iseq, iobj->line_no,
BIN(pop), 0, 0);
/* replace */
- REPLACE_ELEM((LINK_ELEMENT *)iobj, (LINK_ELEMENT *)eiobj);
- INSERT_ELEM_NEXT((LINK_ELEMENT *)eiobj, (LINK_ELEMENT *)popiobj);
- iobj = popiobj;
+ unref_destination(iobj);
+ iobj->insn_id = BIN(leave);
+ iobj->operand_size = 0;
+ INSERT_ELEM_NEXT(&iobj->link, &popiobj->link);
+ goto again;
}
/*
* useless jump elimination (if/unless destination):
@@ -1857,13 +2079,21 @@ iseq_peephole_optimize(rb_iseq_t *iseq, LINK_ELEMENT *list, const int do_tailcal
if (niobj == (INSN *)get_destination_insn(piobj)) {
piobj->insn_id = (piobj->insn_id == BIN(branchif))
? BIN(branchunless) : BIN(branchif);
- OPERAND_AT(piobj, 0) = OPERAND_AT(iobj, 0);
+ replace_destination(piobj, iobj);
REMOVE_ELEM(&iobj->link);
}
}
+ else if (remove_unreachable_chunk(iobj->link.next)) {
+ goto again;
+ }
+ }
+
+ if (iobj->insn_id == BIN(leave)) {
+ remove_unreachable_chunk(iobj->link.next);
}
if (iobj->insn_id == BIN(branchif) ||
+ iobj->insn_id == BIN(branchnil) ||
iobj->insn_id == BIN(branchunless)) {
/*
* if L1
@@ -1874,12 +2104,124 @@ iseq_peephole_optimize(rb_iseq_t *iseq, LINK_ELEMENT *list, const int do_tailcal
* if L2
*/
INSN *nobj = (INSN *)get_destination_insn(iobj);
- if (nobj->insn_id == BIN(jump)) {
- OPERAND_AT(iobj, 0) = OPERAND_AT(nobj, 0);
+ INSN *pobj = (INSN *)iobj->link.prev;
+ int prev_dup = 0;
+ if (pobj) {
+ if (pobj->link.type != ISEQ_ELEMENT_INSN)
+ pobj = 0;
+ else if (pobj->insn_id == BIN(dup))
+ prev_dup = 1;
+ }
+
+ for (;;) {
+ if (nobj->insn_id == BIN(jump)) {
+ replace_destination(iobj, nobj);
+ }
+ else if (prev_dup && nobj->insn_id == BIN(dup) &&
+ !!(nobj = (INSN *)nobj->link.next) &&
+ /* basic blocks, with no labels in the middle */
+ nobj->insn_id == iobj->insn_id) {
+ /*
+ * dup
+ * if L1
+ * ...
+ * L1:
+ * dup
+ * if L2
+ * =>
+ * dup
+ * if L2
+ * ...
+ * L1:
+ * dup
+ * if L2
+ */
+ replace_destination(iobj, nobj);
+ }
+ else if (pobj) {
+ /*
+ * putnil
+ * if L1
+ * =>
+ * # nothing
+ *
+ * putobject true
+ * if L1
+ * =>
+ * jump L1
+ *
+ * putstring ".."
+ * if L1
+ * =>
+ * jump L1
+ *
+ * putstring ".."
+ * dup
+ * if L1
+ * =>
+ * putstring ".."
+ * jump L1
+ *
+ */
+ int cond;
+ if (prev_dup && pobj->link.prev->type == ISEQ_ELEMENT_INSN) {
+ pobj = (INSN *)pobj->link.prev;
+ }
+ if (pobj->insn_id == BIN(putobject)) {
+ cond = (iobj->insn_id == BIN(branchif) ?
+ OPERAND_AT(pobj, 0) != Qfalse :
+ iobj->insn_id == BIN(branchunless) ?
+ OPERAND_AT(pobj, 0) == Qfalse :
+ FALSE);
+ }
+ else if (pobj->insn_id == BIN(putstring)) {
+ cond = iobj->insn_id == BIN(branchif);
+ }
+ else if (pobj->insn_id == BIN(putnil)) {
+ cond = iobj->insn_id != BIN(branchif);
+ }
+ else break;
+ REMOVE_ELEM(iobj->link.prev);
+ if (cond) {
+ iobj->insn_id = BIN(jump);
+ goto again;
+ }
+ else {
+ unref_destination(iobj);
+ REMOVE_ELEM(&iobj->link);
+ }
+ break;
+ }
+ else break;
+ nobj = (INSN *)get_destination_insn(nobj);
}
}
- if (do_tailcallopt && iobj->insn_id == BIN(leave)) {
+ if (iobj->insn_id == BIN(pop)) {
+ /*
+ * putself / putnil / putobject obj / putstring "..."
+ * pop
+ * =>
+ * # do nothing
+ */
+ LINK_ELEMENT *prev = iobj->link.prev;
+ if (prev->type == ISEQ_ELEMENT_INSN) {
+ enum ruby_vminsn_type previ = ((INSN *)prev)->insn_id;
+ if (previ == BIN(putobject) || previ == BIN(putnil) ||
+ previ == BIN(putself) || previ == BIN(putstring)) {
+ /* just push operand or static value and pop soon, no
+ * side effects */
+ REMOVE_ELEM(prev);
+ REMOVE_ELEM(&iobj->link);
+ }
+ }
+ }
+
+ if (do_tailcallopt &&
+ (iobj->insn_id == BIN(send) ||
+ iobj->insn_id == BIN(opt_aref_with) ||
+ iobj->insn_id == BIN(opt_aset_with) ||
+ iobj->insn_id == BIN(invokesuper))) {
/*
* send ...
* leave
@@ -1887,12 +2229,43 @@ iseq_peephole_optimize(rb_iseq_t *iseq, LINK_ELEMENT *list, const int do_tailcal
* send ..., ... | VM_CALL_TAILCALL, ...
* leave # unreachable
*/
- INSN *piobj = (INSN *)get_prev_insn((INSN *)list);
- enum ruby_vminsn_type previ = piobj->insn_id;
+ INSN *piobj = NULL;
+ if (iobj->link.next) {
+ LINK_ELEMENT *next = iobj->link.next;
+ do {
+ if (next->type != ISEQ_ELEMENT_INSN) {
+ next = next->next;
+ continue;
+ }
+ switch (INSN_OF(next)) {
+ case BIN(nop):
+ /*case BIN(trace):*/
+ next = next->next;
+ break;
+ case BIN(jump):
+ /* if cond
+ * return tailcall
+ * end
+ */
+ next = get_destination_insn((INSN *)next);
+ break;
+ case BIN(leave):
+ piobj = iobj;
+ default:
+ next = NULL;
+ break;
+ }
+ } while (next);
+ }
- if (previ == BIN(send) || previ == BIN(opt_send_simple) || previ == BIN(invokesuper)) {
- rb_call_info_t *ci = (rb_call_info_t *)piobj->operands[0];
- if (ci->blockiseq == 0) {
+ if (piobj) {
+ struct rb_call_info *ci = (struct rb_call_info *)piobj->operands[0];
+ if (piobj->insn_id == BIN(send) || piobj->insn_id == BIN(invokesuper)) {
+ if (piobj->operands[2] == 0) { /* no blockiseq */
+ ci->flag |= VM_CALL_TAILCALL;
+ }
+ }
+ else {
ci->flag |= VM_CALL_TAILCALL;
}
}
@@ -1903,18 +2276,17 @@ iseq_peephole_optimize(rb_iseq_t *iseq, LINK_ELEMENT *list, const int do_tailcal
static int
insn_set_specialized_instruction(rb_iseq_t *iseq, INSN *iobj, int insn_id)
{
- int old_opsize = iobj->operand_size;
iobj->insn_id = insn_id;
iobj->operand_size = insn_len(insn_id) - 1;
- if (iobj->operand_size > old_opsize) {
+ if (insn_id == BIN(opt_neq)) {
VALUE *old_operands = iobj->operands;
- if (insn_id != BIN(opt_neq)) {
- rb_bug("insn_set_specialized_instruction: unknown insn: %d", insn_id);
- }
+ iobj->operand_size = 4;
iobj->operands = (VALUE *)compile_data_alloc(iseq, iobj->operand_size * sizeof(VALUE));
iobj->operands[0] = old_operands[0];
- iobj->operands[1] = (VALUE)new_callinfo(iseq, idEq, 1, 0, 0);
+ iobj->operands[1] = Qfalse; /* CALL_CACHE */
+ iobj->operands[2] = (VALUE)new_callinfo(iseq, idEq, 1, 0, NULL, FALSE);
+ iobj->operands[3] = Qfalse; /* CALL_CACHE */
}
return COMPILE_OK;
@@ -1924,10 +2296,11 @@ static int
iseq_specialized_instruction(rb_iseq_t *iseq, INSN *iobj)
{
if (iobj->insn_id == BIN(send)) {
- rb_call_info_t *ci = (rb_call_info_t *)OPERAND_AT(iobj, 0);
+ struct rb_call_info *ci = (struct rb_call_info *)OPERAND_AT(iobj, 0);
+ const rb_iseq_t *blockiseq = (rb_iseq_t *)OPERAND_AT(iobj, 2);
#define SP_INSN(opt) insn_set_specialized_instruction(iseq, iobj, BIN(opt_##opt))
- if (ci->blockiseq == 0 && (ci->flag & ~VM_CALL_ARGS_SKIP_SETUP) == 0) {
+ if (ci->flag & VM_CALL_ARGS_SIMPLE) {
switch (ci->orig_argc) {
case 0:
switch (ci->mid) {
@@ -1962,8 +2335,10 @@ iseq_specialized_instruction(rb_iseq_t *iseq, INSN *iobj)
break;
}
}
- if (ci->flag & VM_CALL_ARGS_SKIP_SETUP) {
- iobj->insn_id = BIN(opt_send_simple);
+
+ if ((ci->flag & VM_CALL_ARGS_BLOCKARG) == 0 && blockiseq == NULL) {
+ iobj->insn_id = BIN(opt_send_without_block);
+ iobj->operand_size = insn_len(iobj->insn_id) - 1;
}
}
#undef SP_INSN
@@ -1971,20 +2346,37 @@ iseq_specialized_instruction(rb_iseq_t *iseq, INSN *iobj)
return COMPILE_OK;
}
+static inline int
+tailcallable_p(rb_iseq_t *iseq)
+{
+ switch (iseq->body->type) {
+ case ISEQ_TYPE_RESCUE:
+ case ISEQ_TYPE_ENSURE:
+ /* rescue block can't tail call because of errinfo */
+ return FALSE;
+ default:
+ return TRUE;
+ }
+}
+
static int
iseq_optimize(rb_iseq_t *iseq, LINK_ANCHOR *anchor)
{
LINK_ELEMENT *list;
- const int do_peepholeopt = iseq->compile_data->option->peephole_optimization;
- const int do_tailcallopt = iseq->compile_data->option->tailcall_optimization;
- const int do_si = iseq->compile_data->option->specialized_instruction;
- const int do_ou = iseq->compile_data->option->operands_unification;
+ const int do_peepholeopt = ISEQ_COMPILE_DATA(iseq)->option->peephole_optimization;
+ const int do_tailcallopt = tailcallable_p(iseq) &&
+ ISEQ_COMPILE_DATA(iseq)->option->tailcall_optimization;
+ const int do_si = ISEQ_COMPILE_DATA(iseq)->option->specialized_instruction;
+ const int do_ou = ISEQ_COMPILE_DATA(iseq)->option->operands_unification;
+ int rescue_level = 0;
+ int tailcallopt = do_tailcallopt;
+
list = FIRST_ELEMENT(anchor);
while (list) {
if (list->type == ISEQ_ELEMENT_INSN) {
if (do_peepholeopt) {
- iseq_peephole_optimize(iseq, list, do_tailcallopt);
+ iseq_peephole_optimize(iseq, list, tailcallopt);
}
if (do_si) {
iseq_specialized_instruction(iseq, (INSN *)list);
@@ -1993,6 +2385,17 @@ iseq_optimize(rb_iseq_t *iseq, LINK_ANCHOR *anchor)
insn_operands_unification((INSN *)list);
}
}
+ if (list->type == ISEQ_ELEMENT_LABEL) {
+ switch (((LABEL *)list)->rescued) {
+ case LABEL_RESCUE_BEG:
+ rescue_level++;
+ tailcallopt = FALSE;
+ break;
+ case LABEL_RESCUE_END:
+ if (!--rescue_level) tailcallopt = do_tailcallopt;
+ break;
+ }
+ }
list = list->next;
}
return COMPILE_OK;
@@ -2116,9 +2519,9 @@ insn_set_sc_state(rb_iseq_t *iseq, INSN *iobj, int state)
dump_disasm_list((LINK_ELEMENT *)iobj);
dump_disasm_list((LINK_ELEMENT *)lobj);
printf("\n-- %d, %d\n", lobj->sc_state, nstate);
- rb_compile_error(RSTRING_PTR(iseq->location.path), iobj->line_no,
- "insn_set_sc_state error\n");
- return 0;
+ COMPILE_ERROR(ruby_sourcefile_string, iobj->line_no,
+ "insn_set_sc_state error\n");
+ return COMPILE_NG;
}
}
else {
@@ -2218,8 +2621,9 @@ iseq_set_sequence_stackcaching(rb_iseq_t *iseq, LINK_ANCHOR *anchor)
case SCS_XX:
goto normal_insn;
default:
- rb_compile_error(RSTRING_PTR(iseq->location.path), iobj->line_no,
- "unreachable");
+ COMPILE_ERROR(ruby_sourcefile_string, iobj->line_no,
+ "unreachable");
+ return COMPILE_NG;
}
/* remove useless pop */
REMOVE_ELEM(list);
@@ -2254,14 +2658,19 @@ compile_dstr_fragments(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE *node, int *cntp)
{
NODE *list = node->nd_next;
VALUE lit = node->nd_lit;
+ LINK_ELEMENT *first_lit = 0;
int cnt = 0;
debugp_param("nd_lit", lit);
if (!NIL_P(lit)) {
cnt++;
- if (RB_TYPE_P(lit, T_STRING))
- lit = node->nd_lit = rb_fstring(node->nd_lit);
+ if (!RB_TYPE_P(lit, T_STRING)) {
+ rb_compile_bug_str(ERROR_ARGS "dstr: must be string: %s",
+ rb_builtin_type_name(TYPE(lit)));
+ }
+ lit = node->nd_lit = rb_fstring(lit);
ADD_INSN1(ret, nd_line(node), putobject, lit);
+ if (RSTRING_LEN(lit) == 0) first_lit = LAST_ELEMENT(ret);
}
while (list) {
@@ -2269,6 +2678,7 @@ compile_dstr_fragments(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE *node, int *cntp)
if (nd_type(node) == NODE_STR) {
node->nd_lit = rb_fstring(node->nd_lit);
ADD_INSN1(ret, nd_line(node), putobject, node->nd_lit);
+ lit = Qnil;
}
else {
COMPILE(ret, "each string", node);
@@ -2276,6 +2686,10 @@ compile_dstr_fragments(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE *node, int *cntp)
cnt++;
list = list->nd_next;
}
+ if (NIL_P(lit) && first_lit) {
+ REMOVE_ELEM(first_lit);
+ --cnt;
+ }
*cntp = cnt;
return COMPILE_OK;
@@ -2344,6 +2758,52 @@ compile_branch_condition(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * cond,
return COMPILE_OK;
}
+static int
+compile_array_keyword_arg(rb_iseq_t *iseq, LINK_ANCHOR *ret, const NODE * const root_node, struct rb_call_info_kw_arg ** const kw_arg_ptr)
+{
+ if (kw_arg_ptr == NULL) return FALSE;
+
+ if (nd_type(root_node) == NODE_HASH && root_node->nd_head && nd_type(root_node->nd_head) == NODE_ARRAY) {
+ NODE *node = root_node->nd_head;
+
+ while (node) {
+ NODE *key_node = node->nd_head;
+
+ assert(nd_type(node) == NODE_ARRAY);
+ if (key_node && nd_type(key_node) == NODE_LIT && RB_TYPE_P(key_node->nd_lit, T_SYMBOL)) {
+ /* can be keywords */
+ }
+ else {
+ return FALSE;
+ }
+ node = node->nd_next; /* skip value node */
+ node = node->nd_next;
+ }
+
+ /* may be keywords */
+ node = root_node->nd_head;
+ {
+ int len = (int)node->nd_alen / 2;
+ struct rb_call_info_kw_arg *kw_arg = (struct rb_call_info_kw_arg *)ruby_xmalloc(sizeof(struct rb_call_info_kw_arg) + sizeof(VALUE) * (len - 1));
+ VALUE *keywords = kw_arg->keywords;
+ int i = 0;
+ kw_arg->keyword_len = len;
+
+ *kw_arg_ptr = kw_arg;
+
+ for (i=0; node != NULL; i++, node = node->nd_next->nd_next) {
+ NODE *key_node = node->nd_head;
+ NODE *val_node = node->nd_next->nd_head;
+ keywords[i] = key_node->nd_lit;
+ COMPILE(ret, "keyword values", val_node);
+ }
+ assert(i == len);
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
enum compile_array_type_t {
COMPILE_ARRAY_TYPE_ARRAY,
COMPILE_ARRAY_TYPE_HASH,
@@ -2352,7 +2812,7 @@ enum compile_array_type_t {
static int
compile_array_(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE* node_root,
- enum compile_array_type_t type, int poped)
+ enum compile_array_type_t type, struct rb_call_info_kw_arg **keywords_ptr, int poped)
{
NODE *node = node_root;
int line = (int)nd_line(node);
@@ -2379,22 +2839,30 @@ compile_array_(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE* node_root,
INIT_ANCHOR(anchor);
for (i=0; i<max && node; i++, len++, node = node->nd_next) {
- if (CPDEBUG > 0 && nd_type(node) != NODE_ARRAY) {
- rb_bug("compile_array: This node is not NODE_ARRAY, but %s", ruby_node_name(nd_type(node)));
+ if (CPDEBUG > 0) {
+ EXPECT_NODE("compile_array", node, NODE_ARRAY);
}
- if (type == COMPILE_ARRAY_TYPE_HASH && !node->nd_head) {
- opt_p = 0;
+ if (type != COMPILE_ARRAY_TYPE_ARRAY && !node->nd_head) {
kw = node->nd_next;
- node = kw->nd_next;
- kw = kw->nd_head;
+ node = 0;
+ if (kw) {
+ opt_p = 0;
+ node = kw->nd_next;
+ kw = kw->nd_head;
+ }
break;
}
if (opt_p && nd_type(node->nd_head) != NODE_LIT) {
opt_p = 0;
}
- COMPILE_(anchor, "array element", node->nd_head, poped);
+ if (type == COMPILE_ARRAY_TYPE_ARGS && node->nd_next == NULL /* last node */ && compile_array_keyword_arg(iseq, anchor, node->nd_head, keywords_ptr)) {
+ len--;
+ }
+ else {
+ COMPILE_(anchor, "array element", node->nd_head, poped);
+ }
}
if (opt_p && type != COMPILE_ARRAY_TYPE_ARGS) {
@@ -2429,7 +2897,7 @@ compile_array_(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE* node_root,
else { /* COMPILE_ARRAY_TYPE_HASH */
ADD_INSN1(ret, line, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
ADD_INSN1(ret, line, putobject, ary);
- ADD_SEND(ret, line, ID2SYM(id_core_hash_from_ary), INT2FIX(1));
+ ADD_SEND(ret, line, id_core_hash_from_ary, INT2FIX(1));
}
}
else {
@@ -2440,7 +2908,7 @@ compile_array_(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE* node_root,
else {
ADD_INSN1(ret, line, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
ADD_INSN1(ret, line, putobject, ary);
- ADD_SEND(ret, line, ID2SYM(id_core_hash_merge_ary), INT2FIX(1));
+ ADD_SEND(ret, line, id_core_hash_merge_ary, INT2FIX(1));
}
}
}
@@ -2470,7 +2938,7 @@ compile_array_(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE* node_root,
ADD_INSN1(ret, line, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
ADD_INSN(ret, line, swap);
APPEND_LIST(ret, anchor);
- ADD_SEND(ret, line, ID2SYM(id_core_hash_merge_ptr), INT2FIX(i + 1));
+ ADD_SEND(ret, line, id_core_hash_merge_ptr, INT2FIX(i + 1));
}
}
if (kw) {
@@ -2478,7 +2946,8 @@ compile_array_(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE* node_root,
ADD_INSN1(ret, line, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
if (i > 0 || !first) ADD_INSN(ret, line, swap);
COMPILE(ret, "keyword splat", kw);
- ADD_SEND(ret, line, ID2SYM(id_core_hash_merge_kwd), nhash);
+ ADD_SEND(ret, line, id_core_hash_merge_kwd, nhash);
+ if (nhash == INT2FIX(1)) ADD_SEND(ret, line, rb_intern("dup"), INT2FIX(0));
}
first = 0;
break;
@@ -2500,7 +2969,7 @@ compile_array_(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE* node_root,
static VALUE
compile_array(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE* node_root, enum compile_array_type_t type)
{
- return compile_array_(iseq, ret, node_root, type, 0);
+ return compile_array_(iseq, ret, node_root, type, NULL, 0);
}
static VALUE
@@ -2519,6 +2988,12 @@ case_when_optimizable_literal(NODE * node)
}
break;
}
+ case NODE_NIL:
+ return Qnil;
+ case NODE_TRUE:
+ return Qtrue;
+ case NODE_FALSE:
+ return Qfalse;
case NODE_STR:
return node->nd_lit = rb_fstring(node->nd_lit);
}
@@ -2537,7 +3012,8 @@ when_vals(rb_iseq_t *iseq, LINK_ANCHOR *cond_seq, NODE *vals, LABEL *l1, int onl
}
else {
if (rb_hash_lookup(literals, lit) != Qnil) {
- rb_compile_warning(RSTRING_PTR(iseq->location.path), nd_line(val), "duplicated when clause is ignored");
+ rb_compile_warning(ruby_sourcefile, nd_line(val),
+ "duplicated when clause is ignored");
}
else {
rb_hash_aset(literals, lit, (VALUE)(l1) | 1);
@@ -2568,21 +3044,24 @@ compile_massign_lhs(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE *node)
switch (nd_type(node)) {
case NODE_ATTRASGN: {
INSN *iobj;
- rb_call_info_t *ci;
+ struct rb_call_info *ci;
VALUE dupidx;
+ int line = nd_line(node);
COMPILE_POPED(ret, "masgn lhs (NODE_ATTRASGN)", node);
- POP_ELEMENT(ret); /* pop pop insn */
- iobj = (INSN *)POP_ELEMENT(ret); /* pop send insn */
- ci = (rb_call_info_t *)iobj->operands[0];
- ci->orig_argc += 1; ci->argc = ci->orig_argc;
+ iobj = (INSN *)get_prev_insn((INSN *)LAST_ELEMENT(ret)); /* send insn */
+ ci = (struct rb_call_info *)iobj->operands[0];
+ ci->orig_argc += 1;
dupidx = INT2FIX(ci->orig_argc);
- ADD_INSN1(ret, nd_line(node), topn, dupidx);
- ADD_ELEM(ret, (LINK_ELEMENT *)iobj);
- ADD_INSN(ret, nd_line(node), pop); /* result */
- ADD_INSN(ret, nd_line(node), pop); /* rhs */
+ INSERT_BEFORE_INSN1(iobj, line, topn, dupidx);
+ if (ci->flag & VM_CALL_ARGS_SPLAT) {
+ --ci->orig_argc;
+ INSERT_BEFORE_INSN1(iobj, line, newarray, INT2FIX(1));
+ INSERT_BEFORE_INSN(iobj, line, concatarray);
+ }
+ ADD_INSN(ret, line, pop); /* result */
break;
}
case NODE_MASGN: {
@@ -2679,6 +3158,17 @@ compile_massign_opt(rb_iseq_t *iseq, LINK_ANCHOR *ret,
return 1;
}
+static void
+adjust_stack(rb_iseq_t *iseq, LINK_ANCHOR *ret, int line, int rlen, int llen)
+{
+ if (rlen < llen) {
+ do {ADD_INSN(ret, line, putnil);} while (++rlen < llen);
+ }
+ else if (rlen > llen) {
+ do {ADD_INSN(ret, line, pop);} while (--rlen > llen);
+ }
+}
+
static int
compile_massign(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE *node, int poped)
{
@@ -2689,6 +3179,7 @@ compile_massign(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE *node, int poped)
if (!poped || splatn || !compile_massign_opt(iseq, ret, rhsn, lhsn)) {
int llen = 0;
+ int expand = 1;
DECL_ANCHOR(lhsseq);
INIT_ANCHOR(lhsseq);
@@ -2704,9 +3195,35 @@ compile_massign(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE *node, int poped)
if (!poped) {
ADD_INSN(ret, nd_line(node), dup);
}
-
- ADD_INSN2(ret, nd_line(node), expandarray,
- INT2FIX(llen), INT2FIX(lhs_splat));
+ else if (!lhs_splat) {
+ INSN *last = (INSN*)ret->last;
+ if (last->link.type == ISEQ_ELEMENT_INSN &&
+ last->insn_id == BIN(newarray) &&
+ last->operand_size == 1) {
+ int rlen = FIX2INT(OPERAND_AT(last, 0));
+ /* special case: assign to aset or attrset */
+ if (llen == 2) {
+ POP_ELEMENT(ret);
+ adjust_stack(iseq, ret, nd_line(node), rlen, llen);
+ ADD_INSN(ret, nd_line(node), swap);
+ expand = 0;
+ }
+ else if (llen > 2 && llen != rlen) {
+ POP_ELEMENT(ret);
+ adjust_stack(iseq, ret, nd_line(node), rlen, llen);
+ ADD_INSN1(ret, nd_line(node), reverse, INT2FIX(llen));
+ expand = 0;
+ }
+ else if (llen > 2) {
+ last->insn_id = BIN(reverse);
+ expand = 0;
+ }
+ }
+ }
+ if (expand) {
+ ADD_INSN2(ret, nd_line(node), expandarray,
+ INT2FIX(llen), INT2FIX(lhs_splat));
+ }
ADD_SEQ(ret, lhsseq);
if (lhs_splat) {
@@ -2785,6 +3302,8 @@ compile_cpath(LINK_ANCHOR *ret, rb_iseq_t *iseq, NODE *cpath)
}
}
+#define private_recv_p(node) (nd_type((node)->nd_recv) == NODE_SELF)
+
#define defined_expr defined_expr0
static int
defined_expr(rb_iseq_t *iseq, LINK_ANCHOR *ret,
@@ -2888,17 +3407,10 @@ defined_expr(rb_iseq_t *iseq, LINK_ANCHOR *ret,
case NODE_VCALL:
case NODE_FCALL:
case NODE_ATTRASGN:{
- int self = TRUE;
+ const int explicit_receiver =
+ (type == NODE_CALL ||
+ (type == NODE_ATTRASGN && !private_recv_p(node)));
- switch (type) {
- case NODE_ATTRASGN:
- if (node->nd_recv == (NODE *)1) break;
- case NODE_CALL:
- self = FALSE;
- break;
- default:
- /* through */;
- }
if (!lfinish[1]) {
lfinish[1] = NEW_LABEL(nd_line(node));
}
@@ -2906,7 +3418,7 @@ defined_expr(rb_iseq_t *iseq, LINK_ANCHOR *ret,
defined_expr(iseq, ret, node->nd_args, lfinish, Qfalse);
ADD_INSNL(ret, nd_line(node), branchunless, lfinish[1]);
}
- if (!self) {
+ if (explicit_receiver) {
defined_expr(iseq, ret, node->nd_recv, lfinish, Qfalse);
ADD_INSNL(ret, nd_line(node), branchunless, lfinish[1]);
COMPILE(ret, "defined/recv", node->nd_recv);
@@ -2983,11 +3495,13 @@ defined_expr(rb_iseq_t *iseq, LINK_ANCHOR *ret,
int line = nd_line(node);
LABEL *lstart = NEW_LABEL(line);
LABEL *lend = NEW_LABEL(line);
- VALUE rescue = NEW_CHILD_ISEQVAL(NEW_NIL(),
- rb_str_concat(rb_str_new2
- ("defined guard in "),
- iseq->location.label),
- ISEQ_TYPE_DEFINED_GUARD, 0);
+ const rb_iseq_t *rescue = NEW_CHILD_ISEQ(NEW_NIL(),
+ rb_str_concat(rb_str_new2
+ ("defined guard in "),
+ iseq->body->location.label),
+ ISEQ_TYPE_DEFINED_GUARD, 0);
+ lstart->rescued = LABEL_RESCUE_BEG;
+ lend->rescued = LABEL_RESCUE_END;
APPEND_LABEL(ret, lcur, lstart);
ADD_LABEL(ret, lend);
ADD_CATCH_ENTRY(CATCH_TYPE_RESCUE, lstart, lend, rescue, lfinish[1]);
@@ -2995,28 +3509,26 @@ defined_expr(rb_iseq_t *iseq, LINK_ANCHOR *ret,
return done;
}
-#define BUFSIZE 0x100
-
static VALUE
-make_name_for_block(rb_iseq_t *iseq)
+make_name_for_block(const rb_iseq_t *orig_iseq)
{
int level = 1;
- rb_iseq_t *ip = iseq;
+ const rb_iseq_t *iseq = orig_iseq;
- if (iseq->parent_iseq != 0) {
- while (ip->local_iseq != ip) {
- if (ip->type == ISEQ_TYPE_BLOCK) {
+ if (orig_iseq->body->parent_iseq != 0) {
+ while (orig_iseq->body->local_iseq != iseq) {
+ if (iseq->body->type == ISEQ_TYPE_BLOCK) {
level++;
}
- ip = ip->parent_iseq;
+ iseq = iseq->body->parent_iseq;
}
}
if (level == 1) {
- return rb_sprintf("block in %"PRIsVALUE, ip->location.label);
+ return rb_sprintf("block in %"PRIsVALUE, iseq->body->location.label);
}
else {
- return rb_sprintf("block (%d levels) in %"PRIsVALUE, level, ip->location.label);
+ return rb_sprintf("block (%d levels) in %"PRIsVALUE, level, iseq->body->location.label);
}
}
@@ -3026,9 +3538,9 @@ push_ensure_entry(rb_iseq_t *iseq,
struct ensure_range *er, NODE *node)
{
enl->ensure_node = node;
- enl->prev = iseq->compile_data->ensure_node_stack; /* prev */
+ enl->prev = ISEQ_COMPILE_DATA(iseq)->ensure_node_stack; /* prev */
enl->erange = er;
- iseq->compile_data->ensure_node_stack = enl;
+ ISEQ_COMPILE_DATA(iseq)->ensure_node_stack = enl;
}
static void
@@ -3053,7 +3565,7 @@ static void
add_ensure_iseq(LINK_ANCHOR *ret, rb_iseq_t *iseq, int is_return)
{
struct iseq_compile_data_ensure_node_stack *enlp =
- iseq->compile_data->ensure_node_stack;
+ ISEQ_COMPILE_DATA(iseq)->ensure_node_stack;
struct iseq_compile_data_ensure_node_stack *prev_enlp = enlp;
DECL_ANCHOR(ensure);
@@ -3067,7 +3579,7 @@ add_ensure_iseq(LINK_ANCHOR *ret, rb_iseq_t *iseq, int is_return)
add_ensure_range(iseq, enlp->erange, lstart, lend);
- iseq->compile_data->ensure_node_stack = enlp->prev;
+ ISEQ_COMPILE_DATA(iseq)->ensure_node_stack = enlp->prev;
ADD_LABEL(ensure_part, lstart);
COMPILE_POPED(ensure_part, "ensure part", enlp->ensure_node);
ADD_LABEL(ensure_part, lend);
@@ -3080,12 +3592,12 @@ add_ensure_iseq(LINK_ANCHOR *ret, rb_iseq_t *iseq, int is_return)
}
enlp = enlp->prev;
}
- iseq->compile_data->ensure_node_stack = prev_enlp;
+ ISEQ_COMPILE_DATA(iseq)->ensure_node_stack = prev_enlp;
ADD_SEQ(ret, ensure);
}
static VALUE
-setup_args(rb_iseq_t *iseq, LINK_ANCHOR *args, NODE *argn, VALUE *flag)
+setup_args(rb_iseq_t *iseq, LINK_ANCHOR *args, NODE *argn, unsigned int *flag, struct rb_call_info_kw_arg **keywords)
{
VALUE argc = INT2FIX(0);
int nsplat = 0;
@@ -3105,6 +3617,7 @@ setup_args(rb_iseq_t *iseq, LINK_ANCHOR *args, NODE *argn, VALUE *flag)
switch (nd_type(argn)) {
case NODE_SPLAT: {
COMPILE(args, "args (splat)", argn->nd_head);
+ ADD_INSN1(args, nd_line(argn), splatarray, nsplat ? Qtrue : Qfalse);
argc = INT2FIX(1);
nsplat++;
*flag |= VM_CALL_ARGS_SPLAT;
@@ -3117,16 +3630,11 @@ setup_args(rb_iseq_t *iseq, LINK_ANCHOR *args, NODE *argn, VALUE *flag)
INIT_ANCHOR(tmp);
COMPILE(tmp, "args (cat: splat)", argn->nd_body);
- if (next_is_array && nsplat == 0) {
- /* none */
+ if (nd_type(argn) == NODE_ARGSCAT) {
+ ADD_INSN1(tmp, nd_line(argn), splatarray, nsplat ? Qtrue : Qfalse);
}
else {
- if (nd_type(argn) == NODE_ARGSCAT) {
- ADD_INSN1(tmp, nd_line(argn), splatarray, Qfalse);
- }
- else {
- ADD_INSN1(tmp, nd_line(argn), newarray, INT2FIX(1));
- }
+ ADD_INSN1(tmp, nd_line(argn), newarray, INT2FIX(1));
}
INSERT_LIST(args_splat, tmp);
nsplat++;
@@ -3141,12 +3649,13 @@ setup_args(rb_iseq_t *iseq, LINK_ANCHOR *args, NODE *argn, VALUE *flag)
}
break;
}
- case NODE_ARRAY: {
- argc = INT2FIX(compile_array(iseq, args, argn, COMPILE_ARRAY_TYPE_ARGS));
- break;
- }
+ case NODE_ARRAY:
+ {
+ argc = INT2FIX(compile_array_(iseq, args, argn, COMPILE_ARRAY_TYPE_ARGS, keywords, FALSE));
+ break;
+ }
default: {
- rb_bug("setup_arg: unknown node: %s\n", ruby_node_name(nd_type(argn)));
+ UNKNOWN_NODE("setup_arg", argn);
}
}
}
@@ -3173,9 +3682,10 @@ build_postexe_iseq(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE *body)
{
int line = nd_line(body);
VALUE argc = INT2FIX(0);
- VALUE block = NEW_CHILD_ISEQVAL(body, make_name_for_block(iseq->parent_iseq), ISEQ_TYPE_BLOCK, line);
+ const rb_iseq_t *block = NEW_CHILD_ISEQ(body, make_name_for_block(iseq->body->parent_iseq), ISEQ_TYPE_BLOCK, line);
+
ADD_INSN1(ret, line, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
- ADD_CALL_WITH_BLOCK(ret, line, ID2SYM(id_core_set_postexe), argc, block);
+ ADD_CALL_WITH_BLOCK(ret, line, id_core_set_postexe, argc, block);
iseq_set_local_table(iseq, 0);
return Qnil;
}
@@ -3197,21 +3707,28 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
if (node == 0) {
if (!poped) {
debugs("node: NODE_NIL(implicit)\n");
- ADD_INSN(ret, iseq->compile_data->last_line, putnil);
+ ADD_INSN(ret, ISEQ_COMPILE_DATA(iseq)->last_line, putnil);
}
return COMPILE_OK;
}
- iseq->compile_data->last_line = line = (int)nd_line(node);
+ line = (int)nd_line(node);
+
+ if (ISEQ_COMPILE_DATA(iseq)->last_line == line) {
+ /* ignore */
+ }
+ else {
+ if (node->flags & NODE_FL_NEWLINE) {
+ ISEQ_COMPILE_DATA(iseq)->last_line = line;
+ ADD_TRACE(ret, line, RUBY_EVENT_LINE);
+ saved_last_element = ret->last;
+ }
+ }
+
debug_node_start(node);
type = nd_type(node);
- if (node->flags & NODE_FL_NEWLINE) {
- ADD_TRACE(ret, line, RUBY_EVENT_LINE);
- saved_last_element = ret->last;
- }
-
switch (type) {
case NODE_BLOCK:{
while (node && nd_type(node) == NODE_BLOCK) {
@@ -3282,7 +3799,9 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
line = nd_line(node);
if (type != NODE_WHEN) {
- COMPILE_ERROR((ERROR_ARGS "NODE_CASE: unexpected node. must be NODE_WHEN, but %s", ruby_node_name(type)));
+ COMPILE_ERROR(ERROR_ARGS "NODE_CASE: unexpected node. must be NODE_WHEN, but %s", ruby_node_name(type));
+ debug_node_end();
+ return COMPILE_NG;
}
endlabel = NEW_LABEL(line);
@@ -3315,12 +3834,11 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
ADD_INSNL(cond_seq, nd_line(vals), branchif, l1);
break;
default:
- rb_bug("NODE_CASE: unknown node (%s)",
- ruby_node_name(nd_type(vals)));
+ UNKNOWN_NODE("NODE_CASE", vals);
}
}
else {
- rb_bug("NODE_CASE: must be NODE_ARRAY, but 0");
+ EXPECT_NODE_NONULL("NODE_CASE", node, NODE_ARRAY);
}
node = node->nd_next;
@@ -3352,6 +3870,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
ADD_INSN(ret, nd_line(tempnode), dup);
ADD_INSN2(ret, nd_line(tempnode), opt_case_dispatch, literals, elselabel);
+ LABEL_REF(elselabel);
}
ADD_SEQ(ret, cond_seq);
@@ -3377,7 +3896,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
vals = node->nd_head;
if (!vals) {
- rb_bug("NODE_WHEN: must be NODE_ARRAY, but 0");
+ rb_compile_bug_str(ERROR_ARGS "NODE_WHEN: must be NODE_ARRAY, but 0");
}
switch (nd_type(vals)) {
case NODE_ARRAY:
@@ -3397,8 +3916,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
ADD_INSNL(ret, nd_line(vals), branchif, l1);
break;
default:
- rb_bug("NODE_WHEN: unknown node (%s)",
- ruby_node_name(nd_type(vals)));
+ UNKNOWN_NODE("NODE_WHEN", vals);
}
node = node->nd_next;
}
@@ -3414,22 +3932,23 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
case NODE_OPT_N:
case NODE_WHILE:
case NODE_UNTIL:{
- LABEL *prev_start_label = iseq->compile_data->start_label;
- LABEL *prev_end_label = iseq->compile_data->end_label;
- LABEL *prev_redo_label = iseq->compile_data->redo_label;
- int prev_loopval_popped = iseq->compile_data->loopval_popped;
+ LABEL *prev_start_label = ISEQ_COMPILE_DATA(iseq)->start_label;
+ LABEL *prev_end_label = ISEQ_COMPILE_DATA(iseq)->end_label;
+ LABEL *prev_redo_label = ISEQ_COMPILE_DATA(iseq)->redo_label;
+ int prev_loopval_popped = ISEQ_COMPILE_DATA(iseq)->loopval_popped;
struct iseq_compile_data_ensure_node_stack enl;
- LABEL *next_label = iseq->compile_data->start_label = NEW_LABEL(line); /* next */
- LABEL *redo_label = iseq->compile_data->redo_label = NEW_LABEL(line); /* redo */
- LABEL *break_label = iseq->compile_data->end_label = NEW_LABEL(line); /* break */
+ LABEL *next_label = ISEQ_COMPILE_DATA(iseq)->start_label = NEW_LABEL(line); /* next */
+ LABEL *redo_label = ISEQ_COMPILE_DATA(iseq)->redo_label = NEW_LABEL(line); /* redo */
+ LABEL *break_label = ISEQ_COMPILE_DATA(iseq)->end_label = NEW_LABEL(line); /* break */
LABEL *end_label = NEW_LABEL(line);
+ LABEL *adjust_label = NEW_LABEL(line);
LABEL *next_catch_label = NEW_LABEL(line);
LABEL *tmp_label = NULL;
- iseq->compile_data->loopval_popped = 0;
+ ISEQ_COMPILE_DATA(iseq)->loopval_popped = 0;
push_ensure_entry(iseq, &enl, 0, 0);
if (type == NODE_OPT_N || node->nd_state == 1) {
@@ -3439,6 +3958,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
tmp_label = NEW_LABEL(line);
ADD_INSNL(ret, line, jump, tmp_label);
}
+ ADD_LABEL(ret, adjust_label);
ADD_INSN(ret, line, putnil);
ADD_LABEL(ret, next_catch_label);
ADD_INSN(ret, line, pop);
@@ -3460,16 +3980,17 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
}
else {
ADD_CALL_RECEIVER(ret, line);
- ADD_CALL(ret, line, ID2SYM(idGets), INT2FIX(0));
+ ADD_CALL(ret, line, idGets, INT2FIX(0));
ADD_INSNL(ret, line, branchif, redo_label);
/* opt_n */
}
ADD_LABEL(ret, end_label);
+ ADD_ADJUST_RESTORE(ret, adjust_label);
if (node->nd_state == Qundef) {
/* ADD_INSN(ret, line, putundef); */
- rb_bug("unsupported: putundef");
+ rb_compile_bug_str(ERROR_ARGS "unsupported: putundef");
}
else {
ADD_INSN(ret, line, putnil);
@@ -3486,18 +4007,44 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
ADD_CATCH_ENTRY(CATCH_TYPE_NEXT, redo_label, break_label, 0,
next_catch_label);
ADD_CATCH_ENTRY(CATCH_TYPE_REDO, redo_label, break_label, 0,
- iseq->compile_data->redo_label);
+ ISEQ_COMPILE_DATA(iseq)->redo_label);
- iseq->compile_data->start_label = prev_start_label;
- iseq->compile_data->end_label = prev_end_label;
- iseq->compile_data->redo_label = prev_redo_label;
- iseq->compile_data->loopval_popped = prev_loopval_popped;
- iseq->compile_data->ensure_node_stack = iseq->compile_data->ensure_node_stack->prev;
+ ISEQ_COMPILE_DATA(iseq)->start_label = prev_start_label;
+ ISEQ_COMPILE_DATA(iseq)->end_label = prev_end_label;
+ ISEQ_COMPILE_DATA(iseq)->redo_label = prev_redo_label;
+ ISEQ_COMPILE_DATA(iseq)->loopval_popped = prev_loopval_popped;
+ ISEQ_COMPILE_DATA(iseq)->ensure_node_stack = ISEQ_COMPILE_DATA(iseq)->ensure_node_stack->prev;
break;
}
- case NODE_ITER:
- case NODE_FOR:{
- VALUE prevblock = iseq->compile_data->current_block;
+ case NODE_FOR:
+ if (node->nd_var) {
+ /* massign to var in "for"
+ * args.length == 1 && Array === (tmp = args[0]) ? tmp : args
+ */
+ NODE *var = node->nd_var;
+ LABEL *not_single = NEW_LABEL(nd_line(var));
+ LABEL *not_ary = NEW_LABEL(nd_line(var));
+ COMPILE(ret, "for var", var);
+ ADD_INSN(ret, line, dup);
+ ADD_CALL(ret, line, idLength, INT2FIX(0));
+ ADD_INSN1(ret, line, putobject, INT2FIX(1));
+ ADD_CALL(ret, line, idEq, INT2FIX(1));
+ ADD_INSNL(ret, line, branchunless, not_single);
+ ADD_INSN(ret, line, dup);
+ ADD_INSN1(ret, line, putobject, INT2FIX(0));
+ ADD_CALL(ret, line, idAREF, INT2FIX(1));
+ ADD_INSN1(ret, line, putobject, rb_cArray);
+ ADD_INSN1(ret, line, topn, INT2FIX(1));
+ ADD_CALL(ret, line, idEqq, INT2FIX(1));
+ ADD_INSNL(ret, line, branchunless, not_ary);
+ ADD_INSN(ret, line, swap);
+ ADD_LABEL(ret, not_ary);
+ ADD_INSN(ret, line, pop);
+ ADD_LABEL(ret, not_single);
+ break;
+ }
+ case NODE_ITER:{
+ const rb_iseq_t *prevblock = ISEQ_COMPILE_DATA(iseq)->current_block;
LABEL *retry_label = NEW_LABEL(line);
LABEL *retry_end_l = NEW_LABEL(line);
@@ -3505,17 +4052,13 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
if (nd_type(node) == NODE_FOR) {
COMPILE(ret, "iter caller (for)", node->nd_iter);
- iseq->compile_data->current_block =
- NEW_CHILD_ISEQVAL(node->nd_body, make_name_for_block(iseq),
- ISEQ_TYPE_BLOCK, line);
-
- ADD_SEND_R(ret, line, ID2SYM(idEach), INT2FIX(0),
- iseq->compile_data->current_block, INT2FIX(0));
+ ISEQ_COMPILE_DATA(iseq)->current_block = NEW_CHILD_ISEQ(node->nd_body, make_name_for_block(iseq),
+ ISEQ_TYPE_BLOCK, line);
+ ADD_SEND_WITH_BLOCK(ret, line, idEach, INT2FIX(0), ISEQ_COMPILE_DATA(iseq)->current_block);
}
else {
- iseq->compile_data->current_block =
- NEW_CHILD_ISEQVAL(node->nd_body, make_name_for_block(iseq),
- ISEQ_TYPE_BLOCK, line);
+ ISEQ_COMPILE_DATA(iseq)->current_block = NEW_CHILD_ISEQ(node->nd_body, make_name_for_block(iseq),
+ ISEQ_TYPE_BLOCK, line);
COMPILE(ret, "iter caller", node->nd_iter);
}
ADD_LABEL(ret, retry_end_l);
@@ -3524,7 +4067,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
ADD_INSN(ret, line, pop);
}
- iseq->compile_data->current_block = prevblock;
+ ISEQ_COMPILE_DATA(iseq)->current_block = prevblock;
ADD_CATCH_ENTRY(CATCH_TYPE_BREAK, retry_label, retry_end_l, 0, retry_end_l);
@@ -3533,160 +4076,161 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
case NODE_BREAK:{
unsigned long level = 0;
- if (iseq->compile_data->redo_label != 0) {
+ if (ISEQ_COMPILE_DATA(iseq)->redo_label != 0) {
/* while/until */
LABEL *splabel = NEW_LABEL(0);
ADD_LABEL(ret, splabel);
- ADD_ADJUST(ret, line, iseq->compile_data->redo_label);
- COMPILE_(ret, "break val (while/until)", node->nd_stts, iseq->compile_data->loopval_popped);
+ ADD_ADJUST(ret, line, ISEQ_COMPILE_DATA(iseq)->redo_label);
+ COMPILE_(ret, "break val (while/until)", node->nd_stts, ISEQ_COMPILE_DATA(iseq)->loopval_popped);
add_ensure_iseq(ret, iseq, 0);
- ADD_INSNL(ret, line, jump, iseq->compile_data->end_label);
+ ADD_INSNL(ret, line, jump, ISEQ_COMPILE_DATA(iseq)->end_label);
ADD_ADJUST_RESTORE(ret, splabel);
if (!poped) {
ADD_INSN(ret, line, putnil);
}
}
- else if (iseq->type == ISEQ_TYPE_BLOCK) {
+ else if (iseq->body->type == ISEQ_TYPE_BLOCK) {
break_by_insn:
/* escape from block */
COMPILE(ret, "break val (block)", node->nd_stts);
- ADD_INSN1(ret, line, throw, INT2FIX(level | 0x02) /* TAG_BREAK */ );
+ ADD_INSN1(ret, line, throw, INT2FIX(level | TAG_BREAK));
if (poped) {
ADD_INSN(ret, line, pop);
}
}
- else if (iseq->type == ISEQ_TYPE_EVAL) {
+ else if (iseq->body->type == ISEQ_TYPE_EVAL) {
break_in_eval:
- COMPILE_ERROR((ERROR_ARGS "Can't escape from eval with break"));
+ COMPILE_ERROR(ERROR_ARGS "Can't escape from eval with break");
+ debug_node_end();
+ return COMPILE_NG;
}
else {
- rb_iseq_t *ip = iseq->parent_iseq;
+ const rb_iseq_t *ip = iseq->body->parent_iseq;
+
while (ip) {
- if (!ip->compile_data) {
+ if (!ISEQ_COMPILE_DATA(ip)) {
ip = 0;
break;
}
level++;
- if (ip->compile_data->redo_label != 0) {
- level = 0x8000;
- if (ip->compile_data->loopval_popped == 0) {
- /* need value */
- level |= 0x4000;
- }
+ if (ISEQ_COMPILE_DATA(ip)->redo_label != 0) {
+ level = VM_THROW_NO_ESCAPE_FLAG;
goto break_by_insn;
}
- else if (ip->type == ISEQ_TYPE_BLOCK) {
- level <<= 16;
+ else if (ip->body->type == ISEQ_TYPE_BLOCK) {
+ level <<= VM_THROW_LEVEL_SHIFT;
goto break_by_insn;
}
- else if (ip->type == ISEQ_TYPE_EVAL) {
+ else if (ip->body->type == ISEQ_TYPE_EVAL) {
goto break_in_eval;
}
- ip = ip->parent_iseq;
+ ip = ip->body->parent_iseq;
}
- COMPILE_ERROR((ERROR_ARGS "Invalid break"));
+ COMPILE_ERROR(ERROR_ARGS "Invalid break");
+ debug_node_end();
+ return COMPILE_NG;
}
break;
}
case NODE_NEXT:{
unsigned long level = 0;
- if (iseq->compile_data->redo_label != 0) {
+ if (ISEQ_COMPILE_DATA(iseq)->redo_label != 0) {
LABEL *splabel = NEW_LABEL(0);
debugs("next in while loop\n");
ADD_LABEL(ret, splabel);
COMPILE(ret, "next val/valid syntax?", node->nd_stts);
add_ensure_iseq(ret, iseq, 0);
- ADD_ADJUST(ret, line, iseq->compile_data->redo_label);
- ADD_INSNL(ret, line, jump, iseq->compile_data->start_label);
+ ADD_ADJUST(ret, line, ISEQ_COMPILE_DATA(iseq)->redo_label);
+ ADD_INSNL(ret, line, jump, ISEQ_COMPILE_DATA(iseq)->start_label);
ADD_ADJUST_RESTORE(ret, splabel);
if (!poped) {
ADD_INSN(ret, line, putnil);
}
}
- else if (iseq->compile_data->end_label) {
+ else if (ISEQ_COMPILE_DATA(iseq)->end_label) {
LABEL *splabel = NEW_LABEL(0);
debugs("next in block\n");
ADD_LABEL(ret, splabel);
- ADD_ADJUST(ret, line, iseq->compile_data->start_label);
+ ADD_ADJUST(ret, line, ISEQ_COMPILE_DATA(iseq)->start_label);
COMPILE(ret, "next val", node->nd_stts);
add_ensure_iseq(ret, iseq, 0);
- ADD_INSNL(ret, line, jump, iseq->compile_data->end_label);
+ ADD_INSNL(ret, line, jump, ISEQ_COMPILE_DATA(iseq)->end_label);
ADD_ADJUST_RESTORE(ret, splabel);
if (!poped) {
ADD_INSN(ret, line, putnil);
}
}
- else if (iseq->type == ISEQ_TYPE_EVAL) {
+ else if (iseq->body->type == ISEQ_TYPE_EVAL) {
next_in_eval:
- COMPILE_ERROR((ERROR_ARGS "Can't escape from eval with next"));
+ COMPILE_ERROR(ERROR_ARGS "Can't escape from eval with next");
}
else {
- rb_iseq_t *ip;
- ip = iseq;
+ const rb_iseq_t *ip = iseq;
+
while (ip) {
- if (!ip->compile_data) {
+ if (!ISEQ_COMPILE_DATA(ip)) {
ip = 0;
break;
}
- level = 0x8000 | 0x4000;
- if (ip->compile_data->redo_label != 0) {
+ level = VM_THROW_NO_ESCAPE_FLAG;
+ if (ISEQ_COMPILE_DATA(ip)->redo_label != 0) {
/* while loop */
break;
}
- else if (ip->type == ISEQ_TYPE_BLOCK) {
+ else if (ip->body->type == ISEQ_TYPE_BLOCK) {
break;
}
- else if (ip->type == ISEQ_TYPE_EVAL) {
+ else if (ip->body->type == ISEQ_TYPE_EVAL) {
goto next_in_eval;
}
- ip = ip->parent_iseq;
+ ip = ip->body->parent_iseq;
}
if (ip != 0) {
COMPILE(ret, "next val", node->nd_stts);
- ADD_INSN1(ret, line, throw, INT2FIX(level | 0x03) /* TAG_NEXT */ );
+ ADD_INSN1(ret, line, throw, INT2FIX(level | TAG_NEXT));
if (poped) {
ADD_INSN(ret, line, pop);
}
}
else {
- COMPILE_ERROR((ERROR_ARGS "Invalid next"));
+ COMPILE_ERROR(ERROR_ARGS "Invalid next");
}
}
break;
}
case NODE_REDO:{
- if (iseq->compile_data->redo_label) {
+ if (ISEQ_COMPILE_DATA(iseq)->redo_label) {
LABEL *splabel = NEW_LABEL(0);
debugs("redo in while");
ADD_LABEL(ret, splabel);
- ADD_ADJUST(ret, line, iseq->compile_data->redo_label);
+ ADD_ADJUST(ret, line, ISEQ_COMPILE_DATA(iseq)->redo_label);
add_ensure_iseq(ret, iseq, 0);
- ADD_INSNL(ret, line, jump, iseq->compile_data->redo_label);
+ ADD_INSNL(ret, line, jump, ISEQ_COMPILE_DATA(iseq)->redo_label);
ADD_ADJUST_RESTORE(ret, splabel);
if (!poped) {
ADD_INSN(ret, line, putnil);
}
}
- else if (iseq->type == ISEQ_TYPE_EVAL) {
+ else if (iseq->body->type == ISEQ_TYPE_EVAL) {
redo_in_eval:
- COMPILE_ERROR((ERROR_ARGS "Can't escape from eval with redo"));
+ COMPILE_ERROR(ERROR_ARGS "Can't escape from eval with redo");
}
- else if (iseq->compile_data->start_label) {
+ else if (ISEQ_COMPILE_DATA(iseq)->start_label) {
LABEL *splabel = NEW_LABEL(0);
debugs("redo in block");
ADD_LABEL(ret, splabel);
add_ensure_iseq(ret, iseq, 0);
- ADD_ADJUST(ret, line, iseq->compile_data->start_label);
- ADD_INSNL(ret, line, jump, iseq->compile_data->start_label);
+ ADD_ADJUST(ret, line, ISEQ_COMPILE_DATA(iseq)->start_label);
+ ADD_INSNL(ret, line, jump, ISEQ_COMPILE_DATA(iseq)->start_label);
ADD_ADJUST_RESTORE(ret, splabel);
if (!poped) {
@@ -3694,53 +4238,52 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
}
}
else {
- rb_iseq_t *ip;
- unsigned long level;
- level = 0x8000 | 0x4000;
- ip = iseq;
+ const rb_iseq_t *ip = iseq;
+ const unsigned long level = VM_THROW_NO_ESCAPE_FLAG;
+
while (ip) {
- if (!ip->compile_data) {
+ if (!ISEQ_COMPILE_DATA(ip)) {
ip = 0;
break;
}
- if (ip->compile_data->redo_label != 0) {
+ if (ISEQ_COMPILE_DATA(ip)->redo_label != 0) {
break;
}
- else if (ip->type == ISEQ_TYPE_BLOCK) {
+ else if (ip->body->type == ISEQ_TYPE_BLOCK) {
break;
}
- else if (ip->type == ISEQ_TYPE_EVAL) {
+ else if (ip->body->type == ISEQ_TYPE_EVAL) {
goto redo_in_eval;
}
- ip = ip->parent_iseq;
+ ip = ip->body->parent_iseq;
}
if (ip != 0) {
ADD_INSN(ret, line, putnil);
- ADD_INSN1(ret, line, throw, INT2FIX(level | 0x05) /* TAG_REDO */ );
+ ADD_INSN1(ret, line, throw, INT2FIX(level | TAG_REDO));
if (poped) {
ADD_INSN(ret, line, pop);
}
}
else {
- COMPILE_ERROR((ERROR_ARGS "Invalid redo"));
+ COMPILE_ERROR(ERROR_ARGS "Invalid redo");
}
}
break;
}
case NODE_RETRY:{
- if (iseq->type == ISEQ_TYPE_RESCUE) {
+ if (iseq->body->type == ISEQ_TYPE_RESCUE) {
ADD_INSN(ret, line, putnil);
- ADD_INSN1(ret, line, throw, INT2FIX(0x04) /* TAG_RETRY */ );
+ ADD_INSN1(ret, line, throw, INT2FIX(TAG_RETRY));
if (poped) {
ADD_INSN(ret, line, pop);
}
}
else {
- COMPILE_ERROR((ERROR_ARGS "Invalid retry"));
+ COMPILE_ERROR(ERROR_ARGS "Invalid retry");
}
break;
}
@@ -3752,11 +4295,12 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
LABEL *lstart = NEW_LABEL(line);
LABEL *lend = NEW_LABEL(line);
LABEL *lcont = NEW_LABEL(line);
- VALUE rescue = NEW_CHILD_ISEQVAL(
- node->nd_resq,
- rb_str_concat(rb_str_new2("rescue in "), iseq->location.label),
- ISEQ_TYPE_RESCUE, line);
+ const rb_iseq_t *rescue = NEW_CHILD_ISEQ(node->nd_resq,
+ rb_str_concat(rb_str_new2("rescue in "), iseq->body->location.label),
+ ISEQ_TYPE_RESCUE, line);
+ lstart->rescued = LABEL_RESCUE_BEG;
+ lend->rescued = LABEL_RESCUE_END;
ADD_LABEL(ret, lstart);
COMPILE(ret, "rescue head", node->nd_head);
ADD_LABEL(ret, lend);
@@ -3806,8 +4350,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
ADD_INSNL(ret, line, branchif, label_hit);
break;
default:
- rb_bug("NODE_RESBODY: unknown node (%s)",
- ruby_node_name(nd_type(narg)));
+ UNKNOWN_NODE("NODE_RESBODY", narg);
}
}
else {
@@ -3819,7 +4362,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
ADD_INSNL(ret, line, jump, label_miss);
ADD_LABEL(ret, label_hit);
COMPILE(ret, "resbody body", resq->nd_body);
- if (iseq->compile_data->option->tailcall_optimization) {
+ if (ISEQ_COMPILE_DATA(iseq)->option->tailcall_optimization) {
ADD_INSN(ret, line, nop);
}
ADD_INSN(ret, line, leave);
@@ -3830,11 +4373,9 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
}
case NODE_ENSURE:{
DECL_ANCHOR(ensr);
- VALUE ensure = NEW_CHILD_ISEQVAL(node->nd_ensr,
- rb_str_concat(rb_str_new2
- ("ensure in "),
- iseq->location.label),
- ISEQ_TYPE_ENSURE, line);
+ const rb_iseq_t *ensure = NEW_CHILD_ISEQ(node->nd_ensr,
+ rb_str_concat(rb_str_new2 ("ensure in "), iseq->body->location.label),
+ ISEQ_TYPE_ENSURE, line);
LABEL *lstart = NEW_LABEL(line);
LABEL *lend = NEW_LABEL(line);
LABEL *lcont = NEW_LABEL(line);
@@ -3861,14 +4402,14 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
}
ADD_LABEL(ret, lcont);
- erange = iseq->compile_data->ensure_node_stack->erange;
+ erange = ISEQ_COMPILE_DATA(iseq)->ensure_node_stack->erange;
while (erange) {
ADD_CATCH_ENTRY(CATCH_TYPE_ENSURE, erange->begin, erange->end,
ensure, lcont);
erange = erange->next;
}
- iseq->compile_data->ensure_node_stack = enl.prev;
+ ISEQ_COMPILE_DATA(iseq)->ensure_node_stack = enl.prev;
break;
}
@@ -3900,9 +4441,9 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
case NODE_LASGN:{
ID id = node->nd_vid;
- int idx = iseq->local_iseq->local_size - get_local_var_idx(iseq, id);
+ int idx = iseq->body->local_iseq->body->local_size - get_local_var_idx(iseq, id);
- debugs("lvar: %s idx: %d\n", rb_id2name(id), idx);
+ debugs("lvar: %"PRIsVALUE" idx: %d\n", rb_id2str(id), idx);
COMPILE(ret, "rvalue", node->nd_value);
if (!poped) {
@@ -3916,7 +4457,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
case NODE_DASGN_CURR:{
int idx, lv, ls;
COMPILE(ret, "dvalue", node->nd_value);
- debugp_param("dassn id", rb_str_new2(rb_id2name(node->nd_vid) ? rb_id2name(node->nd_vid) : "*"));
+ debugi("dassn id", rb_id2str(node->nd_vid) ? node->nd_vid : '*');
if (!poped) {
ADD_INSN(ret, line, dup);
@@ -3925,7 +4466,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
idx = get_dyna_var_idx(iseq, node->nd_vid, &lv, &ls);
if (idx < 0) {
- rb_bug("NODE_DASGN(_CURR): unknown id (%s)", rb_id2name(node->nd_vid));
+ rb_compile_bug_str(ERROR_ARGS "NODE_DASGN(_CURR): unknown id (%"PRIsVALUE")", rb_id2str(node->nd_vid));
}
ADD_INSN2(ret, line, setlocal, INT2FIX(ls - idx), INT2FIX(lv));
@@ -3948,7 +4489,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
ADD_INSN(ret, line, dup);
}
ADD_INSN2(ret, line, setinstancevariable,
- ID2SYM(node->nd_vid), INT2FIX(iseq->is_size++));
+ ID2SYM(node->nd_vid), INT2FIX(iseq->body->is_size++));
break;
}
case NODE_CDECL:{
@@ -3981,7 +4522,8 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
case NODE_OP_ASGN1: {
DECL_ANCHOR(args);
VALUE argc;
- VALUE flag = 0;
+ unsigned int flag = 0;
+ unsigned int asgnflag = 0;
ID id = node->nd_mid;
int boff = 0;
@@ -4011,7 +4553,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
if (!poped) {
ADD_INSN(ret, line, putnil);
}
- COMPILE(ret, "NODE_OP_ASGN1 recv", node->nd_recv);
+ asgnflag = COMPILE_RECV(ret, "NODE_OP_ASGN1 recv", node);
switch (nd_type(node->nd_args->nd_head)) {
case NODE_ZARRAY:
argc = INT2FIX(0);
@@ -4020,11 +4562,12 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
boff = 1;
default:
INIT_ANCHOR(args);
- argc = setup_args(iseq, args, node->nd_args->nd_head, &flag);
+ argc = setup_args(iseq, args, node->nd_args->nd_head, &flag, NULL);
ADD_SEQ(ret, args);
}
ADD_INSN1(ret, line, dupn, FIXNUM_INC(argc, 1 + boff));
- ADD_SEND_R(ret, line, ID2SYM(idAREF), argc, Qfalse, LONG2FIX(flag));
+ ADD_SEND_WITH_FLAG(ret, line, idAREF, argc, INT2FIX(flag));
+ flag |= asgnflag;
if (id == 0 || id == 1) {
/* 0: or, 1: and
@@ -4067,14 +4610,12 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
ADD_INSN(ret, line, pop);
ADD_INSN(ret, line, pop);
}
- ADD_SEND_R(ret, line, ID2SYM(idASET),
- argc, Qfalse, LONG2FIX(flag));
+ ADD_SEND_WITH_FLAG(ret, line, idASET, argc, INT2FIX(flag));
}
else {
if (boff > 0)
ADD_INSN(ret, line, swap);
- ADD_SEND_R(ret, line, ID2SYM(idASET),
- FIXNUM_INC(argc, 1), Qfalse, LONG2FIX(flag));
+ ADD_SEND_WITH_FLAG(ret, line, idASET, FIXNUM_INC(argc, 1), INT2FIX(flag));
}
ADD_INSN(ret, line, pop);
ADD_INSNL(ret, line, jump, lfin);
@@ -4087,7 +4628,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
}
else {
COMPILE(ret, "NODE_OP_ASGN1 args->body: ", node->nd_args->nd_body);
- ADD_SEND(ret, line, ID2SYM(id), INT2FIX(1));
+ ADD_SEND(ret, line, id, INT2FIX(1));
if (!poped) {
ADD_INSN1(ret, line, setn, FIXNUM_INC(argc, 2+boff));
}
@@ -4104,14 +4645,12 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
ADD_INSN(ret, line, pop);
ADD_INSN(ret, line, pop);
}
- ADD_SEND_R(ret, line, ID2SYM(idASET),
- argc, Qfalse, LONG2FIX(flag));
+ ADD_SEND_WITH_FLAG(ret, line, idASET, argc, INT2FIX(flag));
}
else {
if (boff > 0)
ADD_INSN(ret, line, swap);
- ADD_SEND_R(ret, line, ID2SYM(idASET),
- FIXNUM_INC(argc, 1), Qfalse, LONG2FIX(flag));
+ ADD_SEND_WITH_FLAG(ret, line, idASET, FIXNUM_INC(argc, 1), INT2FIX(flag));
}
ADD_INSN(ret, line, pop);
}
@@ -4120,8 +4659,11 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
}
case NODE_OP_ASGN2:{
ID atype = node->nd_next->nd_mid;
+ ID vid = node->nd_next->nd_vid, aid = rb_id_attrset(vid);
+ VALUE asgnflag;
LABEL *lfin = NEW_LABEL(line);
LABEL *lcfin = NEW_LABEL(line);
+ LABEL *lskip = 0;
/*
class C; attr_accessor :c; end
r = C.new
@@ -4164,10 +4706,14 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
*/
- COMPILE(ret, "NODE_OP_ASGN2#recv", node->nd_recv);
+ asgnflag = COMPILE_RECV(ret, "NODE_OP_ASGN2#recv", node);
+ if (node->nd_next->nd_aid) {
+ lskip = NEW_LABEL(line);
+ ADD_INSN(ret, line, dup);
+ ADD_INSNL(ret, line, branchnil, lskip);
+ }
ADD_INSN(ret, line, dup);
- ADD_SEND(ret, line, ID2SYM(node->nd_next->nd_vid),
- INT2FIX(0));
+ ADD_SEND(ret, line, vid, INT2FIX(0));
if (atype == 0 || atype == 1) { /* 0: OR or 1: AND */
ADD_INSN(ret, line, dup);
@@ -4181,8 +4727,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
COMPILE(ret, "NODE_OP_ASGN2 val", node->nd_value);
ADD_INSN(ret, line, swap);
ADD_INSN1(ret, line, topn, INT2FIX(1));
- ADD_SEND(ret, line, ID2SYM(node->nd_next->nd_aid),
- INT2FIX(1));
+ ADD_SEND_WITH_FLAG(ret, line, aid, INT2FIX(1), INT2FIX(asgnflag));
ADD_INSNL(ret, line, jump, lfin);
ADD_LABEL(ret, lcfin);
@@ -4190,6 +4735,9 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
ADD_LABEL(ret, lfin);
ADD_INSN(ret, line, pop);
+ if (lskip) {
+ ADD_LABEL(ret, lskip);
+ }
if (poped) {
/* we can apply more optimize */
ADD_INSN(ret, line, pop);
@@ -4197,15 +4745,16 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
}
else {
COMPILE(ret, "NODE_OP_ASGN2 val", node->nd_value);
- ADD_SEND(ret, line, ID2SYM(node->nd_next->nd_mid),
- INT2FIX(1));
+ ADD_SEND(ret, line, atype, INT2FIX(1));
if (!poped) {
ADD_INSN(ret, line, swap);
ADD_INSN1(ret, line, topn, INT2FIX(1));
}
- ADD_SEND(ret, line, ID2SYM(node->nd_next->nd_aid),
- INT2FIX(1));
+ ADD_SEND_WITH_FLAG(ret, line, aid, INT2FIX(1), INT2FIX(asgnflag));
ADD_INSN(ret, line, pop);
+ if (lskip) {
+ ADD_LABEL(ret, lskip);
+ }
}
break;
}
@@ -4222,10 +4771,9 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
COMPILE(ret, "NODE_OP_CDECL/colon2#nd_head", node->nd_head->nd_head);
break;
default:
- do {
- COMPILE_ERROR((ERROR_ARGS "%s: invalid node in NODE_OP_CDECL",
- ruby_node_name(nd_type(node->nd_head))));
- } while (0);
+ COMPILE_ERROR(ERROR_ARGS "%s: invalid node in NODE_OP_CDECL",
+ ruby_node_name(nd_type(node->nd_head)));
+ debug_node_end();
return COMPILE_NG;
}
mid = node->nd_head->nd_mid;
@@ -4266,7 +4814,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
else {
COMPILE(ret, "NODE_OP_CDECL#nd_value", node->nd_value);
/* cref obj value */
- ADD_CALL(ret, line, ID2SYM(node->nd_aid), INT2FIX(1));
+ ADD_CALL(ret, line, node->nd_aid, INT2FIX(1));
/* cref value */
ADD_INSN(ret, line, swap); /* value cref */
if (!poped) {
@@ -4319,9 +4867,13 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
break;
}
case NODE_CALL:
+ /* optimization shortcut
+ * "literal".freeze -> opt_str_freeze("literal")
+ */
if (node->nd_recv && nd_type(node->nd_recv) == NODE_STR &&
- node->nd_mid == idFreeze && node->nd_args == NULL)
- {
+ node->nd_mid == idFreeze && node->nd_args == NULL &&
+ ISEQ_COMPILE_DATA(iseq)->current_block == NULL &&
+ ISEQ_COMPILE_DATA(iseq)->option->specialized_instruction) {
VALUE str = rb_fstring(node->nd_recv->nd_lit);
iseq_add_mark_object(iseq, str);
ADD_INSN1(ret, line, opt_str_freeze, str);
@@ -4330,6 +4882,26 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
}
break;
}
+ /* optimization shortcut
+ * obj["literal"] -> opt_aref_with(obj, "literal")
+ */
+ if (node->nd_mid == idAREF && !private_recv_p(node) && node->nd_args &&
+ nd_type(node->nd_args) == NODE_ARRAY && node->nd_args->nd_alen == 1 &&
+ nd_type(node->nd_args->nd_head) == NODE_STR &&
+ ISEQ_COMPILE_DATA(iseq)->current_block == NULL &&
+ ISEQ_COMPILE_DATA(iseq)->option->specialized_instruction) {
+ VALUE str = rb_fstring(node->nd_args->nd_head->nd_lit);
+ node->nd_args->nd_head->nd_lit = str;
+ COMPILE(ret, "recv", node->nd_recv);
+ ADD_INSN3(ret, line, opt_aref_with,
+ new_callinfo(iseq, idAREF, 1, 0, NULL, FALSE),
+ NULL/* CALL_CACHE */, str);
+ if (poped) {
+ ADD_INSN(ret, line, pop);
+ }
+ break;
+ }
+ case NODE_QCALL:
case NODE_FCALL:
case NODE_VCALL:{ /* VCALL: variable or call */
/*
@@ -4339,11 +4911,13 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
*/
DECL_ANCHOR(recv);
DECL_ANCHOR(args);
+ LABEL *lskip = 0;
ID mid = node->nd_mid;
VALUE argc;
- VALUE flag = 0;
- VALUE parent_block = iseq->compile_data->current_block;
- iseq->compile_data->current_block = Qfalse;
+ unsigned int flag = 0;
+ struct rb_call_info_kw_arg *keywords = NULL;
+ const rb_iseq_t *parent_block = ISEQ_COMPILE_DATA(iseq)->current_block;
+ ISEQ_COMPILE_DATA(iseq)->current_block = NULL;
INIT_ANCHOR(recv);
INIT_ANCHOR(args);
@@ -4376,12 +4950,12 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
(mid == goto_id || mid == label_id)) {
LABEL *label;
st_data_t data;
- st_table *labels_table = iseq->compile_data->labels_table;
+ st_table *labels_table = ISEQ_COMPILE_DATA(iseq)->labels_table;
ID label_name;
if (!labels_table) {
labels_table = st_init_numtable();
- iseq->compile_data->labels_table = labels_table;
+ ISEQ_COMPILE_DATA(iseq)->labels_table = labels_table;
}
if (nd_type(node->nd_args->nd_head) == NODE_LIT &&
SYMBOL_P(node->nd_args->nd_head->nd_lit)) {
@@ -4397,7 +4971,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
}
}
else {
- COMPILE_ERROR((ERROR_ARGS "invalid goto/label format"));
+ COMPILE_ERROR(ERROR_ARGS "invalid goto/label format");
}
@@ -4412,8 +4986,13 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
}
#endif
/* receiver */
- if (type == NODE_CALL) {
+ if (type == NODE_CALL || type == NODE_QCALL) {
COMPILE(recv, "recv", node->nd_recv);
+ if (type == NODE_QCALL) {
+ lskip = NEW_LABEL(line);
+ ADD_INSN(recv, line, dup);
+ ADD_INSNL(recv, line, branchnil, lskip);
+ }
}
else if (type == NODE_FCALL || type == NODE_VCALL) {
ADD_CALL_RECEIVER(recv, line);
@@ -4421,7 +5000,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
/* args */
if (nd_type(node) != NODE_VCALL) {
- argc = setup_args(iseq, args, node->nd_args, &flag);
+ argc = setup_args(iseq, args, node->nd_args, &flag, &keywords);
}
else {
argc = INT2FIX(0);
@@ -4441,9 +5020,11 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
flag |= VM_CALL_FCALL;
}
- ADD_SEND_R(ret, line, ID2SYM(mid),
- argc, parent_block, LONG2FIX(flag));
+ ADD_SEND_R(ret, line, mid, argc, parent_block, INT2FIX(flag), keywords);
+ if (lskip) {
+ ADD_LABEL(ret, lskip);
+ }
if (poped) {
ADD_INSN(ret, line, pop);
}
@@ -4453,93 +5034,107 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
case NODE_ZSUPER:{
DECL_ANCHOR(args);
int argc;
- VALUE flag = 0;
- VALUE parent_block = iseq->compile_data->current_block;
+ unsigned int flag = 0;
+ struct rb_call_info_kw_arg *keywords = NULL;
+ const rb_iseq_t *parent_block = ISEQ_COMPILE_DATA(iseq)->current_block;
INIT_ANCHOR(args);
- iseq->compile_data->current_block = Qfalse;
+ ISEQ_COMPILE_DATA(iseq)->current_block = NULL;
if (nd_type(node) == NODE_SUPER) {
- VALUE vargc = setup_args(iseq, args, node->nd_args, &flag);
+ VALUE vargc = setup_args(iseq, args, node->nd_args, &flag, &keywords);
argc = FIX2INT(vargc);
}
else {
/* NODE_ZSUPER */
int i;
- rb_iseq_t *liseq = iseq->local_iseq;
+ const rb_iseq_t *liseq = iseq->body->local_iseq;
int lvar_level = get_lvar_level(iseq);
- argc = liseq->argc;
+ argc = liseq->body->param.lead_num;
/* normal arguments */
- for (i = 0; i < liseq->argc; i++) {
- int idx = liseq->local_size - i;
+ for (i = 0; i < liseq->body->param.lead_num; i++) {
+ int idx = liseq->body->local_size - i;
ADD_INSN2(args, line, getlocal, INT2FIX(idx), INT2FIX(lvar_level));
}
- if (!liseq->arg_simple) {
- if (liseq->arg_opts) {
- /* optional arguments */
+ if (liseq->body->param.flags.has_opt) {
+ /* optional arguments */
+ int j;
+ for (j = 0; j < liseq->body->param.opt_num; j++) {
+ int idx = liseq->body->local_size - (i + j);
+ ADD_INSN2(args, line, getlocal, INT2FIX(idx), INT2FIX(lvar_level));
+ }
+ i += j;
+ argc = i;
+ }
+ if (liseq->body->param.flags.has_rest) {
+ /* rest argument */
+ int idx = liseq->body->local_size - liseq->body->param.rest_start;
+ ADD_INSN2(args, line, getlocal, INT2FIX(idx), INT2FIX(lvar_level));
+ argc = liseq->body->param.rest_start + 1;
+ flag |= VM_CALL_ARGS_SPLAT;
+ }
+ if (liseq->body->param.flags.has_post) {
+ /* post arguments */
+ int post_len = liseq->body->param.post_num;
+ int post_start = liseq->body->param.post_start;
+
+ if (liseq->body->param.flags.has_rest) {
int j;
- for (j = 0; j < liseq->arg_opts - 1; j++) {
- int idx = liseq->local_size - (i + j);
+ for (j=0; j<post_len; j++) {
+ int idx = liseq->body->local_size - (post_start + j);
ADD_INSN2(args, line, getlocal, INT2FIX(idx), INT2FIX(lvar_level));
}
- i += j;
- argc = i;
+ ADD_INSN1(args, line, newarray, INT2FIX(j));
+ ADD_INSN (args, line, concatarray);
+ /* argc is settled at above */
}
-
- if (liseq->arg_rest != -1) {
- /* rest argument */
- int idx = liseq->local_size - liseq->arg_rest;
- ADD_INSN2(args, line, getlocal, INT2FIX(idx), INT2FIX(lvar_level));
- argc = liseq->arg_rest + 1;
- flag |= VM_CALL_ARGS_SPLAT;
+ else {
+ int j;
+ for (j=0; j<post_len; j++) {
+ int idx = liseq->body->local_size - (post_start + j);
+ ADD_INSN2(args, line, getlocal, INT2FIX(idx), INT2FIX(lvar_level));
+ }
+ argc = post_len + post_start;
}
+ }
- if (liseq->arg_post_len) {
- /* post arguments */
- int post_len = liseq->arg_post_len;
- int post_start = liseq->arg_post_start;
+ if (liseq->body->param.flags.has_kw) { /* TODO: support keywords */
+ int local_size = liseq->body->local_size;
+ argc++;
- if (liseq->arg_rest != -1) {
- int j;
- for (j=0; j<post_len; j++) {
- int idx = liseq->local_size - (post_start + j);
- ADD_INSN2(args, line, getlocal, INT2FIX(idx), INT2FIX(lvar_level));
- }
- ADD_INSN1(args, line, newarray, INT2FIX(j));
- ADD_INSN (args, line, concatarray);
- /* argc is settled at above */
- }
- else {
- int j;
- for (j=0; j<post_len; j++) {
- int idx = liseq->local_size - (post_start + j);
- ADD_INSN2(args, line, getlocal, INT2FIX(idx), INT2FIX(lvar_level));
- }
- argc = post_len + post_start;
- }
- }
+ ADD_INSN1(args, line, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
- if (liseq->arg_keyword >= 0) {
- int local_size = liseq->local_size;
- int idx = local_size - liseq->arg_keyword;
- argc++;
- ADD_INSN1(args, line, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
+ if (liseq->body->param.flags.has_kwrest) {
+ ADD_INSN2(args, line, getlocal, INT2FIX(liseq->body->local_size - liseq->body->param.keyword->rest_start), INT2FIX(lvar_level));
+ ADD_SEND (args, line, rb_intern("dup"), INT2FIX(0));
+ }
+ else {
+ ADD_INSN1(args, line, newhash, INT2FIX(0));
+ }
+ for (i = 0; i < liseq->body->param.keyword->num; ++i) {
+ ID id = liseq->body->param.keyword->table[i];
+ int idx = local_size - get_local_var_idx(liseq, id);
+ ADD_INSN1(args, line, putobject, ID2SYM(id));
ADD_INSN2(args, line, getlocal, INT2FIX(idx), INT2FIX(lvar_level));
- ADD_SEND (args, line, ID2SYM(rb_intern("dup")), INT2FIX(0));
- for (i = 0; i < liseq->arg_keywords; ++i) {
- ID id = liseq->arg_keyword_table[i];
- idx = local_size - get_local_var_idx(liseq, id);
- ADD_INSN1(args, line, putobject, ID2SYM(id));
- ADD_INSN2(args, line, getlocal, INT2FIX(idx), INT2FIX(lvar_level));
- }
- ADD_SEND(args, line, ID2SYM(id_core_hash_merge_ptr), INT2FIX(i * 2 + 1));
- if (liseq->arg_rest != -1) {
- ADD_INSN1(args, line, newarray, INT2FIX(1));
- ADD_INSN (args, line, concatarray);
- --argc;
- }
+ }
+ ADD_SEND(args, line, id_core_hash_merge_ptr, INT2FIX(i * 2 + 1));
+ if (liseq->body->param.flags.has_rest) {
+ ADD_INSN1(args, line, newarray, INT2FIX(1));
+ ADD_INSN (args, line, concatarray);
+ --argc;
+ }
+ }
+ else if (liseq->body->param.flags.has_kwrest) {
+ ADD_INSN2(args, line, getlocal, INT2FIX(liseq->body->local_size - liseq->body->param.keyword->rest_start), INT2FIX(lvar_level));
+ ADD_SEND (args, line, rb_intern("dup"), INT2FIX(0));
+ if (liseq->body->param.flags.has_rest) {
+ ADD_INSN1(args, line, newarray, INT2FIX(1));
+ ADD_INSN (args, line, concatarray);
+ }
+ else {
+ argc++;
}
}
}
@@ -4547,8 +5142,10 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
/* dummy receiver */
ADD_INSN1(ret, line, putobject, nd_type(node) == NODE_ZSUPER ? Qfalse : Qtrue);
ADD_SEQ(ret, args);
- ADD_INSN1(ret, line, invokesuper, new_callinfo(iseq, 0, argc, parent_block,
- flag | VM_CALL_SUPER | VM_CALL_FCALL));
+ ADD_INSN3(ret, line, invokesuper,
+ new_callinfo(iseq, 0, argc, flag | VM_CALL_SUPER | VM_CALL_FCALL, keywords, parent_block != NULL),
+ Qnil, /* CALL_CACHE */
+ parent_block);
if (poped) {
ADD_INSN(ret, line, pop);
@@ -4556,7 +5153,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
break;
}
case NODE_ARRAY:{
- compile_array_(iseq, ret, node, COMPILE_ARRAY_TYPE_ARRAY, poped);
+ compile_array_(iseq, ret, node, COMPILE_ARRAY_TYPE_ARRAY, NULL, poped);
break;
}
case NODE_ZARRAY:{
@@ -4593,7 +5190,8 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
break;
default:
- rb_bug("can't make hash with this node: %s", ruby_node_name(type));
+ rb_compile_bug_str(ERROR_ARGS_AT(node->nd_head) "can't make hash with this node: %s",
+ ruby_node_name(type));
}
if (poped) {
@@ -4605,13 +5203,13 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
rb_iseq_t *is = iseq;
if (is) {
- if (is->type == ISEQ_TYPE_TOP) {
- COMPILE_ERROR((ERROR_ARGS "Invalid return"));
+ if (is->body->type == ISEQ_TYPE_TOP) {
+ COMPILE_ERROR(ERROR_ARGS "Invalid return");
}
else {
LABEL *splabel = 0;
- if (is->type == ISEQ_TYPE_METHOD) {
+ if (is->body->type == ISEQ_TYPE_METHOD) {
splabel = NEW_LABEL(0);
ADD_LABEL(ret, splabel);
ADD_ADJUST(ret, line, 0);
@@ -4619,7 +5217,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
COMPILE(ret, "return nd_stts (return val)", node->nd_stts);
- if (is->type == ISEQ_TYPE_METHOD) {
+ if (is->body->type == ISEQ_TYPE_METHOD) {
add_ensure_iseq(ret, iseq, 1);
ADD_TRACE(ret, line, RUBY_EVENT_RETURN);
ADD_INSN(ret, line, leave);
@@ -4630,7 +5228,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
}
}
else {
- ADD_INSN1(ret, line, throw, INT2FIX(0x01) /* TAG_RETURN */ );
+ ADD_INSN1(ret, line, throw, INT2FIX(TAG_RETURN));
if (poped) {
ADD_INSN(ret, line, pop);
}
@@ -4642,22 +5240,25 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
case NODE_YIELD:{
DECL_ANCHOR(args);
VALUE argc;
- VALUE flag = 0;
+ unsigned int flag = 0;
+ struct rb_call_info_kw_arg *keywords = NULL;
INIT_ANCHOR(args);
- if (iseq->type == ISEQ_TYPE_TOP) {
- COMPILE_ERROR((ERROR_ARGS "Invalid yield"));
+ if (iseq->body->type == ISEQ_TYPE_TOP) {
+ COMPILE_ERROR(ERROR_ARGS "Invalid yield");
+ debug_node_end();
+ return COMPILE_NG;
}
if (node->nd_head) {
- argc = setup_args(iseq, args, node->nd_head, &flag);
+ argc = setup_args(iseq, args, node->nd_head, &flag, &keywords);
}
else {
argc = INT2FIX(0);
}
ADD_SEQ(ret, args);
- ADD_INSN1(ret, line, invokeblock, new_callinfo(iseq, 0, FIX2INT(argc), 0, flag));
+ ADD_INSN1(ret, line, invokeblock, new_callinfo(iseq, 0, FIX2INT(argc), flag, keywords, FALSE));
if (poped) {
ADD_INSN(ret, line, pop);
@@ -4667,9 +5268,9 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
case NODE_LVAR:{
if (!poped) {
ID id = node->nd_vid;
- int idx = iseq->local_iseq->local_size - get_local_var_idx(iseq, id);
+ int idx = iseq->body->local_iseq->body->local_size - get_local_var_idx(iseq, id);
- debugs("id: %s idx: %d\n", rb_id2name(id), idx);
+ debugs("id: %"PRIsVALUE" idx: %d\n", rb_id2str(id), idx);
ADD_INSN2(ret, line, getlocal, INT2FIX(idx), INT2FIX(get_lvar_level(iseq)));
}
break;
@@ -4680,7 +5281,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
if (!poped) {
idx = get_dyna_var_idx(iseq, node->nd_vid, &lv, &ls);
if (idx < 0) {
- rb_bug("unknown dvar (%s)", rb_id2name(node->nd_vid));
+ rb_compile_bug_str(ERROR_ARGS "unknown dvar (%"PRIsVALUE")", rb_id2str(node->nd_vid));
}
ADD_INSN2(ret, line, getlocal, INT2FIX(ls - idx), INT2FIX(lv));
}
@@ -4698,16 +5299,16 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
debugi("nd_vid", node->nd_vid);
if (!poped) {
ADD_INSN2(ret, line, getinstancevariable,
- ID2SYM(node->nd_vid), INT2FIX(iseq->is_size++));
+ ID2SYM(node->nd_vid), INT2FIX(iseq->body->is_size++));
}
break;
}
case NODE_CONST:{
debugi("nd_vid", node->nd_vid);
- if (iseq->compile_data->option->inline_const_cache) {
+ if (ISEQ_COMPILE_DATA(iseq)->option->inline_const_cache) {
LABEL *lend = NEW_LABEL(line);
- int ic_index = iseq->is_size++;
+ int ic_index = iseq->body->is_size++;
ADD_INSN2(ret, line, getinlinecache, lend, INT2FIX(ic_index));
ADD_INSN1(ret, line, getconstant, ID2SYM(node->nd_vid));
@@ -4733,6 +5334,10 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
}
case NODE_NTH_REF:{
if (!poped) {
+ if (!node->nd_nth) {
+ ADD_INSN(ret, line, putnil);
+ break;
+ }
ADD_INSN2(ret, line, getspecial, INT2FIX(1) /* '~' */,
INT2FIX(node->nd_nth << 1));
}
@@ -4769,7 +5374,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
break;
}
- if (iseq->compile_data->option->specialized_instruction) {
+ if (ISEQ_COMPILE_DATA(iseq)->option->specialized_instruction) {
/* TODO: detect by node */
if (recv->last == recv->anchor.next &&
INSN_OF(recv->last) == BIN(putobject) &&
@@ -4781,13 +5386,13 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
else {
ADD_SEQ(ret, recv);
ADD_SEQ(ret, val);
- ADD_INSN1(ret, line, opt_regexpmatch2, new_callinfo(iseq, idEqTilde, 1, 0, 0));
+ ADD_INSN2(ret, line, opt_regexpmatch2, new_callinfo(iseq, idEqTilde, 1, 0, NULL, FALSE), Qnil);
}
}
else {
ADD_SEQ(ret, recv);
ADD_SEQ(ret, val);
- ADD_SEND(ret, line, ID2SYM(idEqTilde), INT2FIX(1));
+ ADD_SEND(ret, line, idEqTilde, INT2FIX(1));
}
if (poped) {
@@ -4803,10 +5408,24 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
break;
}
case NODE_STR:{
- node->nd_lit = rb_fstring(node->nd_lit);
debugp_param("nd_lit", node->nd_lit);
if (!poped) {
- ADD_INSN1(ret, line, putstring, node->nd_lit);
+ node->nd_lit = rb_fstring(node->nd_lit);
+ if (!ISEQ_COMPILE_DATA(iseq)->option->frozen_string_literal) {
+ ADD_INSN1(ret, line, putstring, node->nd_lit);
+ }
+ else {
+ if (ISEQ_COMPILE_DATA(iseq)->option->debug_frozen_string_literal || RTEST(ruby_debug)) {
+ VALUE debug_info = rb_ary_new_from_args(2, iseq->body->location.path, INT2FIX(line));
+ VALUE str = rb_str_dup(node->nd_lit);
+ rb_ivar_set(str, id_debug_created_info, rb_obj_freeze(debug_info));
+ ADD_INSN1(ret, line, putobject, rb_obj_freeze(str));
+ iseq_add_mark_object_compile_time(iseq, str);
+ }
+ else {
+ ADD_INSN1(ret, line, putobject, node->nd_lit);
+ }
+ }
}
break;
}
@@ -4816,13 +5435,23 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
if (poped) {
ADD_INSN(ret, line, pop);
}
+ else {
+ if (ISEQ_COMPILE_DATA(iseq)->option->frozen_string_literal) {
+ VALUE debug_info = Qnil;
+ if (ISEQ_COMPILE_DATA(iseq)->option->debug_frozen_string_literal || RTEST(ruby_debug)) {
+ debug_info = rb_ary_new_from_args(2, iseq->body->location.path, INT2FIX(line));
+ iseq_add_mark_object_compile_time(iseq, rb_obj_freeze(debug_info));
+ }
+ ADD_INSN1(ret, line, freezestring, debug_info);
+ }
+ }
break;
}
case NODE_XSTR:{
node->nd_lit = rb_fstring(node->nd_lit);
ADD_CALL_RECEIVER(ret, line);
ADD_INSN1(ret, line, putobject, node->nd_lit);
- ADD_CALL(ret, line, ID2SYM(idBackquote), INT2FIX(1));
+ ADD_CALL(ret, line, idBackquote, INT2FIX(1));
if (poped) {
ADD_INSN(ret, line, pop);
@@ -4832,7 +5461,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
case NODE_DXSTR:{
ADD_CALL_RECEIVER(ret, line);
compile_dstr(iseq, ret, node);
- ADD_CALL(ret, line, ID2SYM(idBackquote), INT2FIX(1));
+ ADD_CALL(ret, line, idBackquote, INT2FIX(1));
if (poped) {
ADD_INSN(ret, line, pop);
@@ -4859,10 +5488,11 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
break;
}
case NODE_DREGX_ONCE:{
- int ic_index = iseq->is_size++;
+ int ic_index = iseq->body->is_size++;
NODE *dregx_node = NEW_NODE(NODE_DREGX, node->u1.value, node->u2.value, node->u3.value);
NODE *block_node = NEW_NODE(NODE_SCOPE, 0, dregx_node, 0);
- VALUE block_iseq = NEW_CHILD_ISEQVAL(block_node, make_name_for_block(iseq), ISEQ_TYPE_BLOCK, line);
+ const rb_iseq_t *block_iseq = NEW_CHILD_ISEQ(block_node, make_name_for_block(iseq),
+ ISEQ_TYPE_ONCE_GUARD, line);
ADD_INSN2(ret, line, once, block_iseq, INT2FIX(ic_index));
@@ -4912,37 +5542,35 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
break;
}
case NODE_DEFN:{
- VALUE iseqval = NEW_ISEQVAL(node->nd_defn,
- rb_id2str(node->nd_mid),
- ISEQ_TYPE_METHOD, line);
+ const rb_iseq_t *method_iseq = NEW_ISEQ(node->nd_defn,
+ rb_id2str(node->nd_mid),
+ ISEQ_TYPE_METHOD, line);
- debugp_param("defn/iseq", iseqval);
+ debugp_param("defn/iseq", rb_iseqw_new(method_iseq));
ADD_INSN1(ret, line, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
- ADD_INSN1(ret, line, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_CBASE));
ADD_INSN1(ret, line, putobject, ID2SYM(node->nd_mid));
- ADD_INSN1(ret, line, putiseq, iseqval);
- ADD_SEND (ret, line, ID2SYM(id_core_define_method), INT2FIX(3));
+ ADD_INSN1(ret, line, putiseq, method_iseq);
+ ADD_SEND (ret, line, id_core_define_method, INT2FIX(2));
if (poped) {
ADD_INSN(ret, line, pop);
}
- debugp_param("defn", iseqval);
break;
}
case NODE_DEFS:{
- VALUE iseqval = NEW_ISEQVAL(node->nd_defn,
- rb_id2str(node->nd_mid),
- ISEQ_TYPE_METHOD, line);
+ const rb_iseq_t * singleton_method = NEW_ISEQ(node->nd_defn,
+ rb_id2str(node->nd_mid),
+ ISEQ_TYPE_METHOD, line);
- debugp_param("defs/iseq", iseqval);
+ debugp_param("defs/iseq", rb_iseqw_new(singleton_method));
ADD_INSN1(ret, line, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
COMPILE(ret, "defs: recv", node->nd_recv);
ADD_INSN1(ret, line, putobject, ID2SYM(node->nd_mid));
- ADD_INSN1(ret, line, putiseq, iseqval);
- ADD_SEND (ret, line, ID2SYM(id_core_define_singleton_method), INT2FIX(3));
+ ADD_INSN1(ret, line, putiseq, singleton_method);
+ ADD_SEND (ret, line, id_core_define_singleton_method, INT2FIX(3));
if (poped) {
ADD_INSN(ret, line, pop);
@@ -4954,7 +5582,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
ADD_INSN1(ret, line, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_CBASE));
COMPILE(ret, "alias arg1", node->u1.node);
COMPILE(ret, "alias arg2", node->u2.node);
- ADD_SEND(ret, line, ID2SYM(id_core_set_method_alias), INT2FIX(3));
+ ADD_SEND(ret, line, id_core_set_method_alias, INT2FIX(3));
if (poped) {
ADD_INSN(ret, line, pop);
@@ -4965,7 +5593,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
ADD_INSN1(ret, line, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
ADD_INSN1(ret, line, putobject, ID2SYM(node->u1.id));
ADD_INSN1(ret, line, putobject, ID2SYM(node->u2.id));
- ADD_SEND(ret, line, ID2SYM(id_core_set_variable_alias), INT2FIX(2));
+ ADD_SEND(ret, line, id_core_set_variable_alias, INT2FIX(2));
if (poped) {
ADD_INSN(ret, line, pop);
@@ -4976,7 +5604,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
ADD_INSN1(ret, line, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
ADD_INSN1(ret, line, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_CBASE));
COMPILE(ret, "undef arg", node->u2.node);
- ADD_SEND(ret, line, ID2SYM(id_core_undef_method), INT2FIX(2));
+ ADD_SEND(ret, line, id_core_undef_method, INT2FIX(2));
if (poped) {
ADD_INSN(ret, line, pop);
@@ -4984,18 +5612,16 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
break;
}
case NODE_CLASS:{
- VALUE iseqval =
- NEW_CHILD_ISEQVAL(
- node->nd_body,
- rb_sprintf("<class:%s>", rb_id2name(node->nd_cpath->nd_mid)),
- ISEQ_TYPE_CLASS, line);
+ const rb_iseq_t *class_iseq = NEW_CHILD_ISEQ(node->nd_body,
+ rb_sprintf("<class:%"PRIsVALUE">", rb_id2str(node->nd_cpath->nd_mid)),
+ ISEQ_TYPE_CLASS, line);
VALUE noscope = compile_cpath(ret, iseq, node->nd_cpath);
int flags = VM_DEFINECLASS_TYPE_CLASS;
+
if (!noscope) flags |= VM_DEFINECLASS_FLAG_SCOPED;
if (node->nd_super) flags |= VM_DEFINECLASS_FLAG_HAS_SUPERCLASS;
COMPILE(ret, "super", node->nd_super);
- ADD_INSN3(ret, line, defineclass,
- ID2SYM(node->nd_cpath->nd_mid), iseqval, INT2FIX(flags));
+ ADD_INSN3(ret, line, defineclass, ID2SYM(node->nd_cpath->nd_mid), class_iseq, INT2FIX(flags));
if (poped) {
ADD_INSN(ret, line, pop);
@@ -5003,17 +5629,16 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
break;
}
case NODE_MODULE:{
- VALUE iseqval = NEW_CHILD_ISEQVAL(
- node->nd_body,
- rb_sprintf("<module:%s>", rb_id2name(node->nd_cpath->nd_mid)),
- ISEQ_TYPE_CLASS, line);
-
+ const rb_iseq_t *module_iseq = NEW_CHILD_ISEQ(node->nd_body,
+ rb_sprintf("<module:%"PRIsVALUE">", rb_id2str(node->nd_cpath->nd_mid)),
+ ISEQ_TYPE_CLASS, line);
VALUE noscope = compile_cpath(ret, iseq, node->nd_cpath);
int flags = VM_DEFINECLASS_TYPE_MODULE;
+
if (!noscope) flags |= VM_DEFINECLASS_FLAG_SCOPED;
ADD_INSN (ret, line, putnil); /* dummy */
- ADD_INSN3(ret, line, defineclass,
- ID2SYM(node->nd_cpath->nd_mid), iseqval, INT2FIX(flags));
+ ADD_INSN3(ret, line, defineclass, ID2SYM(node->nd_cpath->nd_mid), module_iseq, INT2FIX(flags));
+
if (poped) {
ADD_INSN(ret, line, pop);
}
@@ -5021,15 +5646,14 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
}
case NODE_SCLASS:{
ID singletonclass;
- VALUE iseqval =
- NEW_ISEQVAL(node->nd_body, rb_str_new2("singleton class"),
- ISEQ_TYPE_CLASS, line);
+ const rb_iseq_t *singleton_class = NEW_ISEQ(node->nd_body, rb_str_new2("singleton class"),
+ ISEQ_TYPE_CLASS, line);
COMPILE(ret, "sclass#recv", node->nd_recv);
ADD_INSN (ret, line, putnil);
CONST_ID(singletonclass, "singletonclass");
ADD_INSN3(ret, line, defineclass,
- ID2SYM(singletonclass), iseqval,
+ ID2SYM(singletonclass), singleton_class,
INT2FIX(VM_DEFINECLASS_TYPE_SINGLETON_CLASS));
if (poped) {
@@ -5041,7 +5665,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
if (rb_is_const_id(node->nd_mid)) {
/* constant */
LABEL *lend = NEW_LABEL(line);
- int ic_index = iseq->is_size++;
+ int ic_index = iseq->body->is_size++;
DECL_ANCHOR(pref);
DECL_ANCHOR(body);
@@ -5050,7 +5674,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
INIT_ANCHOR(body);
compile_colon2(iseq, node, pref, body);
if (LIST_SIZE_ZERO(pref)) {
- if (iseq->compile_data->option->inline_const_cache) {
+ if (ISEQ_COMPILE_DATA(iseq)->option->inline_const_cache) {
ADD_INSN2(ret, line, getinlinecache, lend, INT2FIX(ic_index));
}
else {
@@ -5059,7 +5683,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
ADD_SEQ(ret, body);
- if (iseq->compile_data->option->inline_const_cache) {
+ if (ISEQ_COMPILE_DATA(iseq)->option->inline_const_cache) {
ADD_INSN1(ret, line, setinlinecache, INT2FIX(ic_index));
ADD_LABEL(ret, lend);
}
@@ -5073,8 +5697,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
/* function call */
ADD_CALL_RECEIVER(ret, line);
COMPILE(ret, "colon2#nd_head", node->nd_head);
- ADD_CALL(ret, line, ID2SYM(node->nd_mid),
- INT2FIX(1));
+ ADD_CALL(ret, line, node->nd_mid, INT2FIX(1));
}
if (poped) {
ADD_INSN(ret, line, pop);
@@ -5083,12 +5706,12 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
}
case NODE_COLON3:{
LABEL *lend = NEW_LABEL(line);
- int ic_index = iseq->is_size++;
+ int ic_index = iseq->body->is_size++;
debugi("colon3#nd_mid", node->nd_mid);
/* add cache insn */
- if (iseq->compile_data->option->inline_const_cache) {
+ if (ISEQ_COMPILE_DATA(iseq)->option->inline_const_cache) {
ADD_INSN2(ret, line, getinlinecache, lend, INT2FIX(ic_index));
ADD_INSN(ret, line, pop);
}
@@ -5096,7 +5719,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
ADD_INSN1(ret, line, putobject, rb_cObject);
ADD_INSN1(ret, line, getconstant, ID2SYM(node->nd_mid));
- if (iseq->compile_data->option->inline_const_cache) {
+ if (ISEQ_COMPILE_DATA(iseq)->option->inline_const_cache) {
ADD_INSN1(ret, line, setinlinecache, INT2FIX(ic_index));
ADD_LABEL(ret, lend);
}
@@ -5125,11 +5748,11 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
LABEL *lend = NEW_LABEL(line);
LABEL *lfin = NEW_LABEL(line);
LABEL *ltrue = NEW_LABEL(line);
- rb_iseq_t *local_iseq = iseq->local_iseq;
+ rb_iseq_t *local_iseq = iseq->body->local_iseq;
rb_num_t cnt;
VALUE key;
- cnt = local_iseq->flip_cnt++ + DEFAULT_SPECIAL_VAR_COUNT;
+ cnt = ISEQ_FLIP_CNT_INCREMENT(local_iseq) + VM_SVAR_FLIPFLOP_START;
key = INT2FIX(cnt);
ADD_INSN2(ret, line, getspecial, key, INT2FIX(0));
@@ -5187,17 +5810,17 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
}
case NODE_ERRINFO:{
if (!poped) {
- if (iseq->type == ISEQ_TYPE_RESCUE) {
+ if (iseq->body->type == ISEQ_TYPE_RESCUE) {
ADD_INSN2(ret, line, getlocal, INT2FIX(2), INT2FIX(0));
}
else {
- rb_iseq_t *ip = iseq;
+ const rb_iseq_t *ip = iseq;
int level = 0;
while (ip) {
- if (ip->type == ISEQ_TYPE_RESCUE) {
+ if (ip->body->type == ISEQ_TYPE_RESCUE) {
break;
}
- ip = ip->parent_iseq;
+ ip = ip->body->parent_iseq;
level++;
}
if (ip) {
@@ -5235,10 +5858,9 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
/* compiled to:
* ONCE{ rb_mRubyVMFrozenCore::core#set_postexe{ ... } }
*/
- int is_index = iseq->is_size++;
- VALUE once_iseq = NEW_CHILD_ISEQVAL(
- NEW_IFUNC(build_postexe_iseq, node->nd_body),
- make_name_for_block(iseq), ISEQ_TYPE_BLOCK, line);
+ int is_index = iseq->body->is_size++;
+ const rb_iseq_t *once_iseq = NEW_CHILD_ISEQ((NODE *)IFUNC_NEW(build_postexe_iseq, node->nd_body, 0),
+ make_name_for_block(iseq), ISEQ_TYPE_BLOCK, line);
ADD_INSN2(ret, line, once, once_iseq, INT2FIX(is_index));
@@ -5247,47 +5869,41 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
}
break;
}
- case NODE_KW_ARG:{
- LABEL *default_label = NEW_LABEL(line);
- LABEL *end_label = 0;
- int idx, lv, ls;
- ID id = node->nd_body->nd_vid;
+ case NODE_KW_ARG:
+ {
+ LABEL *end_label = NEW_LABEL(nd_line(node));
+ NODE *default_value = node->nd_body->nd_value;
+
+ if (default_value == (NODE *)-1) {
+ /* required argument. do nothing */
+ rb_compile_bug_str(ERROR_ARGS "unreachable");
+ }
+ else if (nd_type(default_value) == NODE_LIT ||
+ nd_type(default_value) == NODE_NIL ||
+ nd_type(default_value) == NODE_TRUE ||
+ nd_type(default_value) == NODE_FALSE) {
+ rb_compile_bug_str(ERROR_ARGS "unreachable");
+ }
+ else {
+ /* if keywordcheck(_kw_bits, nth_keyword)
+ * kw = default_value
+ * end
+ */
+ int kw_bits_idx = iseq->body->local_size - iseq->body->param.keyword->bits_start;
+ int keyword_idx = iseq->body->param.keyword->num;
+
+ ADD_INSN2(ret, line, checkkeyword, INT2FIX(kw_bits_idx), INT2FIX(keyword_idx));
+ ADD_INSNL(ret, line, branchif, end_label);
+ COMPILE_POPED(ret, "keyword default argument", node->nd_body);
+ ADD_LABEL(ret, end_label);
+ }
- ADD_INSN(ret, line, dup);
- ADD_INSN1(ret, line, putobject, ID2SYM(id));
- ADD_SEND(ret, line, ID2SYM(rb_intern("key?")), INT2FIX(1));
- ADD_INSNL(ret, line, branchunless, default_label);
- ADD_INSN(ret, line, dup);
- ADD_INSN1(ret, line, putobject, ID2SYM(id));
- ADD_SEND(ret, line, ID2SYM(rb_intern("delete")), INT2FIX(1));
- switch (nd_type(node->nd_body)) {
- case NODE_LASGN:
- idx = iseq->local_iseq->local_size - get_local_var_idx(iseq, id);
- ADD_INSN2(ret, line, setlocal, INT2FIX(idx), INT2FIX(get_lvar_level(iseq)));
- break;
- case NODE_DASGN:
- case NODE_DASGN_CURR:
- idx = get_dyna_var_idx(iseq, id, &lv, &ls);
- ADD_INSN2(ret, line, setlocal, INT2FIX(ls - idx), INT2FIX(lv));
break;
- default:
- rb_bug("iseq_compile_each (NODE_KW_ARG): unknown node: %s", ruby_node_name(nd_type(node->nd_body)));
- }
- if (node->nd_body->nd_value != (NODE *)-1) {
- end_label = NEW_LABEL(nd_line(node));
- ADD_INSNL(ret, nd_line(node), jump, end_label);
}
- ADD_LABEL(ret, default_label);
- if (node->nd_body->nd_value != (NODE *)-1) {
- COMPILE_POPED(ret, "keyword default argument", node->nd_body);
- ADD_LABEL(ret, end_label);
- }
- break;
- }
case NODE_DSYM:{
compile_dstr(iseq, ret, node);
if (!poped) {
- ADD_SEND(ret, line, ID2SYM(idIntern), INT2FIX(0));
+ ADD_SEND(ret, line, idIntern, INT2FIX(0));
}
else {
ADD_INSN(ret, line, pop);
@@ -5297,24 +5913,52 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
case NODE_ATTRASGN:{
DECL_ANCHOR(recv);
DECL_ANCHOR(args);
- VALUE flag = 0;
+ unsigned int flag = 0;
+ ID mid = node->nd_mid;
+ LABEL *lskip = 0;
VALUE argc;
+ /* optimization shortcut
+ * obj["literal"] = value -> opt_aset_with(obj, "literal", value)
+ */
+ if (mid == idASET && !private_recv_p(node) && node->nd_args &&
+ nd_type(node->nd_args) == NODE_ARRAY && node->nd_args->nd_alen == 2 &&
+ nd_type(node->nd_args->nd_head) == NODE_STR &&
+ ISEQ_COMPILE_DATA(iseq)->current_block == NULL &&
+ ISEQ_COMPILE_DATA(iseq)->option->specialized_instruction)
+ {
+ VALUE str = rb_fstring(node->nd_args->nd_head->nd_lit);
+ node->nd_args->nd_head->nd_lit = str;
+ iseq_add_mark_object(iseq, str);
+ COMPILE(ret, "recv", node->nd_recv);
+ COMPILE(ret, "value", node->nd_args->nd_next->nd_head);
+ if (!poped) {
+ ADD_INSN(ret, line, swap);
+ ADD_INSN1(ret, line, topn, INT2FIX(1));
+ }
+ ADD_INSN3(ret, line, opt_aset_with,
+ new_callinfo(iseq, idASET, 2, 0, NULL, FALSE),
+ NULL/* CALL_CACHE */, str);
+ ADD_INSN(ret, line, pop);
+ break;
+ }
+
INIT_ANCHOR(recv);
INIT_ANCHOR(args);
- argc = setup_args(iseq, args, node->nd_args, &flag);
+ argc = setup_args(iseq, args, node->nd_args, &flag, NULL);
- if (node->nd_recv == (NODE *) 1) {
- flag |= VM_CALL_FCALL;
- ADD_INSN(recv, line, putself);
- }
- else {
- COMPILE(recv, "recv", node->nd_recv);
- }
+ flag |= COMPILE_RECV(recv, "recv", node);
debugp_param("argc", argc);
- debugp_param("nd_mid", ID2SYM(node->nd_mid));
+ debugp_param("nd_mid", ID2SYM(mid));
+ if (!rb_is_attrset_id(mid)) {
+ /* safe nav attr */
+ mid = rb_id_attrset(mid);
+ ADD_INSN(recv, line, dup);
+ lskip = NEW_LABEL(line);
+ ADD_INSNL(recv, line, branchnil, lskip);
+ }
if (!poped) {
ADD_INSN(ret, line, putnil);
ADD_SEQ(ret, recv);
@@ -5324,7 +5968,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
ADD_INSN1(ret, line, topn, INT2FIX(1));
if (flag & VM_CALL_ARGS_SPLAT) {
ADD_INSN1(ret, line, putobject, INT2FIX(-1));
- ADD_SEND(ret, line, ID2SYM(idAREF), INT2FIX(1));
+ ADD_SEND(ret, line, idAREF, INT2FIX(1));
}
ADD_INSN1(ret, line, setn, FIXNUM_INC(argc, 3));
ADD_INSN (ret, line, pop);
@@ -5332,7 +5976,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
else if (flag & VM_CALL_ARGS_SPLAT) {
ADD_INSN(ret, line, dup);
ADD_INSN1(ret, line, putobject, INT2FIX(-1));
- ADD_SEND(ret, line, ID2SYM(idAREF), INT2FIX(1));
+ ADD_SEND(ret, line, idAREF, INT2FIX(1));
ADD_INSN1(ret, line, setn, FIXNUM_INC(argc, 2));
ADD_INSN (ret, line, pop);
}
@@ -5344,22 +5988,31 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
ADD_SEQ(ret, recv);
ADD_SEQ(ret, args);
}
- ADD_SEND_R(ret, line, ID2SYM(node->nd_mid), argc, 0, LONG2FIX(flag));
+ ADD_SEND_WITH_FLAG(ret, line, mid, argc, INT2FIX(flag));
+ if (lskip) ADD_LABEL(ret, lskip);
ADD_INSN(ret, line, pop);
break;
}
case NODE_PRELUDE:{
+ const rb_compile_option_t *orig_opt = ISEQ_COMPILE_DATA(iseq)->option;
+ rb_compile_option_t new_opt = *orig_opt;
+ if (node->nd_orig) {
+ rb_iseq_make_compile_option(&new_opt, node->nd_orig);
+ ISEQ_COMPILE_DATA(iseq)->option = &new_opt;
+ }
COMPILE_POPED(ret, "prelude", node->nd_head);
COMPILE_(ret, "body", node->nd_body, poped);
+ ISEQ_COMPILE_DATA(iseq)->option = orig_opt;
break;
}
case NODE_LAMBDA:{
/* compile same as lambda{...} */
- VALUE block = NEW_CHILD_ISEQVAL(node->nd_body, make_name_for_block(iseq), ISEQ_TYPE_BLOCK, line);
+ const rb_iseq_t *block = NEW_CHILD_ISEQ(node->nd_body, make_name_for_block(iseq), ISEQ_TYPE_BLOCK, line);
VALUE argc = INT2FIX(0);
+
ADD_INSN1(ret, line, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
- ADD_CALL_WITH_BLOCK(ret, line, ID2SYM(idLambda), argc, block);
+ ADD_CALL_WITH_BLOCK(ret, line, idLambda, argc, block);
if (poped) {
ADD_INSN(ret, line, pop);
@@ -5367,7 +6020,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
break;
}
default:
- rb_bug("iseq_compile_each: unknown node: %s", ruby_node_name(type));
+ UNKNOWN_NODE("iseq_compile_each", node);
return COMPILE_NG;
}
@@ -5442,7 +6095,7 @@ insn_data_to_s_detail(INSN *iobj)
rb_iseq_t *iseq = (rb_iseq_t *)OPERAND_AT(iobj, j);
VALUE val = Qnil;
if (0 && iseq) { /* TODO: invalidate now */
- val = iseq->self;
+ val = (VALUE)iseq;
}
rb_str_concat(str, opobj_inspect(val));
}
@@ -5462,7 +6115,7 @@ insn_data_to_s_detail(INSN *iobj)
{
struct rb_global_entry *entry = (struct rb_global_entry *)
(OPERAND_AT(iobj, j) & (~1));
- rb_str_cat2(str, rb_id2name(entry->id));
+ rb_str_append(str, rb_id2str(entry->id));
break;
}
case TS_IC: /* inline cache */
@@ -5470,13 +6123,33 @@ insn_data_to_s_detail(INSN *iobj)
break;
case TS_CALLINFO: /* call info */
{
- rb_call_info_t *ci = (rb_call_info_t *)OPERAND_AT(iobj, j);
- rb_str_catf(str, "<callinfo:%s, %d>", ci->mid ? rb_id2name(ci->mid) : "", ci->orig_argc);
+ struct rb_call_info *ci = (struct rb_call_info *)OPERAND_AT(iobj, j);
+ rb_str_cat2(str, "<callinfo:");
+ if (ci->mid) rb_str_catf(str, "%"PRIsVALUE, rb_id2str(ci->mid));
+ rb_str_catf(str, ", %d>", ci->orig_argc);
+ break;
+ }
+ case TS_CALLCACHE: /* call cache */
+ {
+ rb_str_catf(str, "<call cache>");
break;
}
case TS_CDHASH: /* case/when condition cache */
rb_str_cat2(str, "<ch>");
break;
+ case TS_FUNCPTR:
+ {
+ rb_insn_func_t func = (rb_insn_func_t)OPERAND_AT(iobj, j);
+#ifdef HAVE_DLADDR
+ Dl_info info;
+ if (dladdr(func, &info) && info.dli_sname) {
+ rb_str_cat2(str, info.dli_sname);
+ break;
+ }
+#endif
+ rb_str_catf(str, "<%p>", func);
+ }
+ break;
default:{
rb_raise(rb_eSyntaxError, "unknown operand type: %c", type);
}
@@ -5505,7 +6178,7 @@ dump_disasm_list(struct iseq_link_element *link)
{
iobj = (INSN *)link;
str = insn_data_to_s_detail(iobj);
- printf("%04d %-65s(%4d)\n", pos, StringValueCStr(str), iobj->line_no);
+ printf("%04d %-65s(%4u)\n", pos, StringValueCStr(str), iobj->line_no);
pos += insn_data_length(iobj);
break;
}
@@ -5533,6 +6206,7 @@ dump_disasm_list(struct iseq_link_element *link)
link = link->next;
}
printf("---------------------\n");
+ fflush(stdout);
}
const char *
@@ -5566,6 +6240,7 @@ register_label(rb_iseq_t *iseq, struct st_table *labels_table, VALUE obj)
else {
label = (LABEL *)tmp;
}
+ LABEL_REF(label);
return label;
}
@@ -5574,7 +6249,6 @@ get_exception_sym2type(VALUE sym)
{
#undef rb_intern
#define rb_intern(str) rb_intern_const(str)
- VALUE sym_inspect;
static VALUE symRescue, symEnsure, symRetry;
static VALUE symBreak, symRedo, symNext;
@@ -5593,9 +6267,7 @@ get_exception_sym2type(VALUE sym)
if (sym == symBreak) return CATCH_TYPE_BREAK;
if (sym == symRedo) return CATCH_TYPE_REDO;
if (sym == symNext) return CATCH_TYPE_NEXT;
- sym_inspect = rb_inspect(sym);
- rb_raise(rb_eSyntaxError, "invalid exception symbol: %s",
- StringValuePtr(sym_inspect));
+ rb_raise(rb_eSyntaxError, "invalid exception symbol: %+"PRIsVALUE, sym);
return 0;
}
@@ -5606,12 +6278,13 @@ iseq_build_from_ary_exception(rb_iseq_t *iseq, struct st_table *labels_table,
int i;
for (i=0; i<RARRAY_LEN(exception); i++) {
- VALUE v, type, eiseqval;
+ const rb_iseq_t *eiseq;
+ VALUE v, type;
const VALUE *ptr;
LABEL *lstart, *lend, *lcont;
- int sp;
+ unsigned int sp;
- RB_GC_GUARD(v) = rb_convert_type(RARRAY_AREF(exception, i), T_ARRAY,
+ v = rb_convert_type(RARRAY_AREF(exception, i), T_ARRAY,
"Array", "to_ary");
if (RARRAY_LEN(v) != 6) {
rb_raise(rb_eSyntaxError, "wrong exception entry");
@@ -5619,20 +6292,22 @@ iseq_build_from_ary_exception(rb_iseq_t *iseq, struct st_table *labels_table,
ptr = RARRAY_CONST_PTR(v);
type = get_exception_sym2type(ptr[0]);
if (ptr[1] == Qnil) {
- eiseqval = 0;
+ eiseq = NULL;
}
else {
- eiseqval = rb_iseq_load(ptr[1], iseq->self, Qnil);
+ eiseq = rb_iseqw_to_iseq(rb_iseq_load(ptr[1], (VALUE)iseq, Qnil));
}
lstart = register_label(iseq, labels_table, ptr[2]);
lend = register_label(iseq, labels_table, ptr[3]);
lcont = register_label(iseq, labels_table, ptr[4]);
- sp = NUM2INT(ptr[5]);
+ sp = NUM2UINT(ptr[5]);
(void)sp;
- ADD_CATCH_ENTRY(type, lstart, lend, eiseqval, lcont);
+ ADD_CATCH_ENTRY(type, lstart, lend, eiseq, lcont);
+
+ RB_GC_GUARD(v);
}
return COMPILE_OK;
}
@@ -5651,32 +6326,74 @@ insn_make_insn_table(void)
return table;
}
-static VALUE
-iseq_build_load_iseq(rb_iseq_t *iseq, VALUE op)
+static const rb_iseq_t *
+iseq_build_load_iseq(const rb_iseq_t *iseq, VALUE op)
{
- VALUE iseqval;
+ VALUE iseqw;
+ const rb_iseq_t *loaded_iseq;
+
if (RB_TYPE_P(op, T_ARRAY)) {
- iseqval = rb_iseq_load(op, iseq->self, Qnil);
+ iseqw = rb_iseq_load(op, (VALUE)iseq, Qnil);
}
else if (CLASS_OF(op) == rb_cISeq) {
- iseqval = op;
+ iseqw = op;
}
else {
rb_raise(rb_eSyntaxError, "ISEQ is required");
}
- iseq_add_mark_object(iseq, iseqval);
- return iseqval;
+
+ loaded_iseq = rb_iseqw_to_iseq(iseqw);
+ iseq_add_mark_object(iseq, (VALUE)loaded_iseq);
+ return loaded_iseq;
+}
+
+static VALUE
+iseq_build_callinfo_from_hash(rb_iseq_t *iseq, VALUE op)
+{
+ ID mid = 0;
+ int orig_argc = 0;
+ unsigned int flag = 0;
+ struct rb_call_info_kw_arg *kw_arg = 0;
+
+ if (!NIL_P(op)) {
+ VALUE vmid = rb_hash_aref(op, ID2SYM(rb_intern("mid")));
+ VALUE vflag = rb_hash_aref(op, ID2SYM(rb_intern("flag")));
+ VALUE vorig_argc = rb_hash_aref(op, ID2SYM(rb_intern("orig_argc")));
+ VALUE vkw_arg = rb_hash_aref(op, ID2SYM(rb_intern("kw_arg")));
+
+ if (!NIL_P(vmid)) mid = SYM2ID(vmid);
+ if (!NIL_P(vflag)) flag = NUM2UINT(vflag);
+ if (!NIL_P(vorig_argc)) orig_argc = FIX2INT(vorig_argc);
+
+ if (!NIL_P(vkw_arg)) {
+ int i;
+ int len = RARRAY_LENINT(vkw_arg);
+ size_t n = rb_call_info_kw_arg_bytes(len);
+
+ kw_arg = xmalloc(n);
+ kw_arg->keyword_len = len;
+ for (i = 0; i < len; i++) {
+ VALUE kw = RARRAY_AREF(vkw_arg, i);
+ SYM2ID(kw); /* make immortal */
+ kw_arg->keywords[i] = kw;
+ }
+ }
+ }
+
+ return (VALUE)new_callinfo(iseq, mid, orig_argc, flag, kw_arg, (flag & VM_CALL_ARGS_SIMPLE) == 0);
}
static int
iseq_build_from_ary_body(rb_iseq_t *iseq, LINK_ANCHOR *anchor,
- VALUE body, struct st_table *labels_table)
+ VALUE body, VALUE labels_wrapper)
{
/* TODO: body should be frozen */
const VALUE *ptr = RARRAY_CONST_PTR(body);
long i, len = RARRAY_LEN(body);
+ struct st_table *labels_table = DATA_PTR(labels_wrapper);
int j;
int line_no = 0;
+ int ret = COMPILE_OK;
/*
* index -> LABEL *label
@@ -5706,14 +6423,17 @@ iseq_build_from_ary_body(rb_iseq_t *iseq, LINK_ANCHOR *anchor,
insn = (argc < 0) ? Qnil : RARRAY_AREF(obj, 0);
if (st_lookup(insn_table, (st_data_t)insn, &insn_id) == 0) {
/* TODO: exception */
- RB_GC_GUARD(insn) = rb_inspect(insn);
- rb_compile_error(RSTRING_PTR(iseq->location.path), line_no,
- "unknown instruction: %s", RSTRING_PTR(insn));
+ COMPILE_ERROR(ruby_sourcefile_string, line_no,
+ "unknown instruction: %+"PRIsVALUE, insn);
+ ret = COMPILE_NG;
+ break;
}
if (argc != insn_len((VALUE)insn_id)-1) {
- rb_compile_error(RSTRING_PTR(iseq->location.path), line_no,
- "operand size mismatch");
+ COMPILE_ERROR(ruby_sourcefile_string, line_no,
+ "operand size mismatch");
+ ret = COMPILE_NG;
+ break;
}
if (argc > 0) {
@@ -5738,7 +6458,7 @@ iseq_build_from_ary_body(rb_iseq_t *iseq, LINK_ANCHOR *anchor,
case TS_ISEQ:
{
if (op != Qnil) {
- argv[j] = iseq_build_load_iseq(iseq, op);
+ argv[j] = (VALUE)iseq_build_load_iseq(iseq, op);
}
else {
argv[j] = 0;
@@ -5751,30 +6471,15 @@ iseq_build_from_ary_body(rb_iseq_t *iseq, LINK_ANCHOR *anchor,
break;
case TS_IC:
argv[j] = op;
- if (NUM2INT(op) >= iseq->is_size) {
- iseq->is_size = NUM2INT(op) + 1;
+ if (NUM2UINT(op) >= iseq->body->is_size) {
+ iseq->body->is_size = NUM2INT(op) + 1;
}
break;
case TS_CALLINFO:
- {
- ID mid = 0;
- int orig_argc = 0;
- VALUE block = 0;
- unsigned long flag = 0;
-
- if (!NIL_P(op)) {
- VALUE vmid = rb_hash_aref(op, ID2SYM(rb_intern("mid")));
- VALUE vflag = rb_hash_aref(op, ID2SYM(rb_intern("flag")));
- VALUE vorig_argc = rb_hash_aref(op, ID2SYM(rb_intern("orig_argc")));
- VALUE vblock = rb_hash_aref(op, ID2SYM(rb_intern("blockptr")));
-
- if (!NIL_P(vmid)) mid = SYM2ID(vmid);
- if (!NIL_P(vflag)) flag = NUM2ULONG(vflag);
- if (!NIL_P(vorig_argc)) orig_argc = FIX2INT(vorig_argc);
- if (!NIL_P(vblock)) block = iseq_build_load_iseq(iseq, vblock);
- }
- argv[j] = (VALUE)new_callinfo(iseq, mid, orig_argc, block, flag);
- }
+ argv[j] = iseq_build_callinfo_from_hash(iseq, op);
+ break;
+ case TS_CALLCACHE:
+ argv[j] = Qfalse;
break;
case TS_ID:
argv[j] = rb_convert_type(op, T_SYMBOL,
@@ -5783,16 +6488,30 @@ iseq_build_from_ary_body(rb_iseq_t *iseq, LINK_ANCHOR *anchor,
case TS_CDHASH:
{
int i;
+ VALUE map = rb_hash_new();
+
+ rb_hash_tbl_raw(map)->type = &cdhash_type;
op = rb_convert_type(op, T_ARRAY, "Array", "to_ary");
- op = rb_ary_dup(op);
for (i=0; i<RARRAY_LEN(op); i+=2) {
- VALUE sym = rb_ary_entry(op, i+1);
+ VALUE key = RARRAY_AREF(op, i);
+ VALUE sym = RARRAY_AREF(op, i+1);
LABEL *label =
register_label(iseq, labels_table, sym);
- rb_ary_store(op, i+1, (VALUE)label | 1);
+ rb_hash_aset(map, key, (VALUE)label | 1);
}
- argv[j] = op;
- iseq_add_mark_object_compile_time(iseq, op);
+ RB_GC_GUARD(op);
+ argv[j] = map;
+ rb_iseq_add_mark_object(iseq, map);
+ }
+ break;
+ case TS_FUNCPTR:
+ {
+#if SIZEOF_VALUE <= SIZEOF_LONG
+ long funcptr = NUM2LONG(op);
+#else
+ LONG_LONG funcptr = NUM2LL(op);
+#endif
+ argv[j] = (VALUE)funcptr;
}
break;
default:
@@ -5808,87 +6527,197 @@ iseq_build_from_ary_body(rb_iseq_t *iseq, LINK_ANCHOR *anchor,
rb_raise(rb_eTypeError, "unexpected object for instruction");
}
}
+ DATA_PTR(labels_wrapper) = 0;
validate_labels(iseq, labels_table);
- st_free_table(labels_table);
- iseq_setup(iseq, anchor);
- return COMPILE_OK;
+ if (!ret) return ret;
+ return iseq_setup(iseq, anchor);
}
#define CHECK_ARRAY(v) rb_convert_type((v), T_ARRAY, "Array", "to_ary")
-#define CHECK_STRING(v) rb_convert_type((v), T_STRING, "String", "to_str")
#define CHECK_SYMBOL(v) rb_convert_type((v), T_SYMBOL, "Symbol", "to_sym")
-static inline VALUE CHECK_INTEGER(VALUE v) {(void)NUM2LONG(v); return v;}
-VALUE
-rb_iseq_build_from_ary(rb_iseq_t *iseq, VALUE locals, VALUE args,
+static int
+int_param(int *dst, VALUE param, VALUE sym)
+{
+ VALUE val = rb_hash_aref(param, sym);
+ switch (TYPE(val)) {
+ case T_NIL:
+ return FALSE;
+ case T_FIXNUM:
+ *dst = FIX2INT(val);
+ return TRUE;
+ default:
+ rb_raise(rb_eTypeError, "invalid %+"PRIsVALUE" Fixnum: %+"PRIsVALUE,
+ sym, val);
+ }
+ return FALSE;
+}
+
+static const struct rb_iseq_param_keyword *
+iseq_build_kw(rb_iseq_t *iseq, VALUE params, VALUE keywords)
+{
+ int i, j;
+ int len = RARRAY_LENINT(keywords);
+ int default_len;
+ VALUE key, sym, default_val;
+ VALUE *dvs;
+ ID *ids;
+ struct rb_iseq_param_keyword *keyword = ZALLOC(struct rb_iseq_param_keyword);
+
+ iseq->body->param.flags.has_kw = TRUE;
+
+ keyword->num = len;
+#define SYM(s) ID2SYM(rb_intern(#s))
+ (void)int_param(&keyword->bits_start, params, SYM(kwbits));
+ i = keyword->bits_start - keyword->num;
+ ids = (VALUE *)&iseq->body->local_table[i];
+#undef SYM
+
+ /* required args */
+ for (i = 0; i < len; i++) {
+ VALUE val = RARRAY_AREF(keywords, i);
+
+ if (!SYMBOL_P(val)) {
+ goto default_values;
+ }
+ ids[i] = SYM2ID(val);
+ keyword->required_num++;
+ }
+
+ default_values: /* note: we intentionally preserve `i' from previous loop */
+ default_len = len - i;
+ if (default_len == 0) {
+ return keyword;
+ }
+
+ dvs = ALLOC_N(VALUE, default_len);
+
+ for (j = 0; i < len; i++, j++) {
+ key = RARRAY_AREF(keywords, i);
+ CHECK_ARRAY(key);
+
+ switch (RARRAY_LEN(key)) {
+ case 1:
+ sym = RARRAY_AREF(key, 0);
+ default_val = Qundef;
+ break;
+ case 2:
+ sym = RARRAY_AREF(key, 0);
+ default_val = RARRAY_AREF(key, 1);
+ break;
+ default:
+ rb_raise(rb_eTypeError, "keyword default has unsupported len %+"PRIsVALUE, key);
+ }
+ ids[i] = SYM2ID(sym);
+ dvs[j] = default_val;
+ }
+
+ keyword->table = ids;
+ keyword->default_values = dvs;
+
+ return keyword;
+}
+
+void
+rb_iseq_build_from_ary(rb_iseq_t *iseq, VALUE misc, VALUE locals, VALUE params,
VALUE exception, VALUE body)
{
- int i;
+#define SYM(s) ID2SYM(rb_intern(#s))
+ int i, len;
ID *tbl;
struct st_table *labels_table = st_init_numtable();
+ VALUE labels_wrapper = Data_Wrap_Struct(0, 0, st_free_table, labels_table);
+ VALUE arg_opt_labels = rb_hash_aref(params, SYM(opt));
+ VALUE keywords = rb_hash_aref(params, SYM(keyword));
+ VALUE sym_arg_rest = ID2SYM(rb_intern("#arg_rest"));
DECL_ANCHOR(anchor);
INIT_ANCHOR(anchor);
- iseq->local_table_size = RARRAY_LENINT(locals);
- iseq->local_table = tbl = (ID *)ALLOC_N(ID, iseq->local_table_size);
- iseq->local_size = iseq->local_table_size + 1;
+ len = RARRAY_LENINT(locals);
+ iseq->body->local_table_size = len;
+ iseq->body->local_table = tbl = len > 0 ? (ID *)ALLOC_N(ID, iseq->body->local_table_size) : NULL;
+ iseq->body->local_size = iseq->body->local_table_size + 1;
- for (i=0; i<RARRAY_LEN(locals); i++) {
+ for (i = 0; i < len; i++) {
VALUE lv = RARRAY_AREF(locals, i);
- tbl[i] = FIXNUM_P(lv) ? (ID)FIX2LONG(lv) : SYM2ID(CHECK_SYMBOL(lv));
- }
- /* args */
- if (FIXNUM_P(args)) {
- iseq->arg_size = iseq->argc = FIX2INT(args);
- iseq->arg_simple = 1;
- }
- else {
- int i = 0;
- VALUE argc = CHECK_INTEGER(rb_ary_entry(args, i++));
- VALUE arg_opt_labels = CHECK_ARRAY(rb_ary_entry(args, i++));
- VALUE arg_post_len = CHECK_INTEGER(rb_ary_entry(args, i++));
- VALUE arg_post_start = CHECK_INTEGER(rb_ary_entry(args, i++));
- VALUE arg_rest = CHECK_INTEGER(rb_ary_entry(args, i++));
- VALUE arg_block = CHECK_INTEGER(rb_ary_entry(args, i++));
- VALUE arg_simple = CHECK_INTEGER(rb_ary_entry(args, i++));
-
- iseq->argc = FIX2INT(argc);
- iseq->arg_rest = FIX2INT(arg_rest);
- iseq->arg_post_len = FIX2INT(arg_post_len);
- iseq->arg_post_start = FIX2INT(arg_post_start);
- iseq->arg_block = FIX2INT(arg_block);
- iseq->arg_opts = RARRAY_LENINT(arg_opt_labels);
- iseq->arg_opt_table = (VALUE *)ALLOC_N(VALUE, iseq->arg_opts);
-
- if (iseq->arg_block != -1) {
- iseq->arg_size = iseq->arg_block + 1;
- }
- else if (iseq->arg_post_len) {
- iseq->arg_size = iseq->arg_post_start + iseq->arg_post_len;
- }
- else if (iseq->arg_rest != -1) {
- iseq->arg_size = iseq->arg_rest + 1;
+ if (sym_arg_rest == lv) {
+ tbl[i] = 0;
}
else {
- iseq->arg_size = iseq->argc + (iseq->arg_opts ? iseq->arg_opts - 1 : 0);
+ tbl[i] = FIXNUM_P(lv) ? (ID)FIX2LONG(lv) : SYM2ID(CHECK_SYMBOL(lv));
}
+ }
- for (i=0; i<RARRAY_LEN(arg_opt_labels); i++) {
- iseq->arg_opt_table[i] =
- (VALUE)register_label(iseq, labels_table,
- rb_ary_entry(arg_opt_labels, i));
+ /*
+ * we currently ignore misc params,
+ * local_size, stack_size and param.size are all calculated
+ */
+
+#define INT_PARAM(F) int_param(&iseq->body->param.F, params, SYM(F))
+ if (INT_PARAM(lead_num)) {
+ iseq->body->param.flags.has_lead = TRUE;
+ }
+ if (INT_PARAM(post_num)) iseq->body->param.flags.has_post = TRUE;
+ if (INT_PARAM(post_start)) iseq->body->param.flags.has_post = TRUE;
+ if (INT_PARAM(rest_start)) iseq->body->param.flags.has_rest = TRUE;
+ if (INT_PARAM(block_start)) iseq->body->param.flags.has_block = TRUE;
+#undef INT_PARAM
+
+ switch (TYPE(arg_opt_labels)) {
+ case T_ARRAY:
+ len = RARRAY_LENINT(arg_opt_labels);
+ iseq->body->param.flags.has_opt = !!(len - 1 >= 0);
+
+ if (iseq->body->param.flags.has_opt) {
+ VALUE *opt_table = ALLOC_N(VALUE, len);
+
+ for (i = 0; i < len; i++) {
+ VALUE ent = RARRAY_AREF(arg_opt_labels, i);
+ LABEL *label = register_label(iseq, labels_table, ent);
+ opt_table[i] = (VALUE)label;
+ }
+
+ iseq->body->param.opt_num = len - 1;
+ iseq->body->param.opt_table = opt_table;
}
+ case T_NIL:
+ break;
+ default:
+ rb_raise(rb_eTypeError, ":opt param is not an array: %+"PRIsVALUE,
+ arg_opt_labels);
+ }
- iseq->arg_simple = NUM2INT(arg_simple);
+ switch (TYPE(keywords)) {
+ case T_ARRAY:
+ iseq->body->param.keyword = iseq_build_kw(iseq, params, keywords);
+ case T_NIL:
+ break;
+ default:
+ rb_raise(rb_eTypeError, ":keywords param is not an array: %+"PRIsVALUE,
+ keywords);
+ }
+
+ if (Qtrue == rb_hash_aref(params, SYM(ambiguous_param0))) {
+ iseq->body->param.flags.ambiguous_param0 = TRUE;
+ }
+
+ if (int_param(&i, params, SYM(kwrest))) {
+ struct rb_iseq_param_keyword *keyword = (struct rb_iseq_param_keyword *)iseq->body->param.keyword;
+ if (keyword == NULL) {
+ iseq->body->param.keyword = keyword = ZALLOC(struct rb_iseq_param_keyword);
+ }
+ keyword->rest_start = i;
+ iseq->body->param.flags.has_kwrest = TRUE;
}
+#undef SYM
+ iseq_calc_param_size(iseq);
/* exception */
iseq_build_from_ary_exception(iseq, labels_table, exception);
/* body */
- iseq_build_from_ary_body(iseq, anchor, body, labels_table);
- return iseq->self;
+ iseq_build_from_ary_body(iseq, anchor, body, labels_wrapper);
}
/* for parser */
@@ -5897,22 +6726,23 @@ int
rb_dvar_defined(ID id)
{
rb_thread_t *th = GET_THREAD();
- rb_iseq_t *iseq;
+ const rb_iseq_t *iseq;
+
if (th->base_block && (iseq = th->base_block->iseq)) {
- while (iseq->type == ISEQ_TYPE_BLOCK ||
- iseq->type == ISEQ_TYPE_RESCUE ||
- iseq->type == ISEQ_TYPE_ENSURE ||
- iseq->type == ISEQ_TYPE_EVAL ||
- iseq->type == ISEQ_TYPE_MAIN
+ while (iseq->body->type == ISEQ_TYPE_BLOCK ||
+ iseq->body->type == ISEQ_TYPE_RESCUE ||
+ iseq->body->type == ISEQ_TYPE_ENSURE ||
+ iseq->body->type == ISEQ_TYPE_EVAL ||
+ iseq->body->type == ISEQ_TYPE_MAIN
) {
- int i;
+ unsigned int i;
- for (i = 0; i < iseq->local_table_size; i++) {
- if (iseq->local_table[i] == id) {
+ for (i = 0; i < iseq->body->local_table_size; i++) {
+ if (iseq->body->local_table[i] == id) {
return 1;
}
}
- iseq = iseq->parent_iseq;
+ iseq = iseq->body->parent_iseq;
}
}
return 0;
@@ -5922,14 +6752,14 @@ int
rb_local_defined(ID id)
{
rb_thread_t *th = GET_THREAD();
- rb_iseq_t *iseq;
+ const rb_iseq_t *iseq;
if (th->base_block && th->base_block->iseq) {
- int i;
- iseq = th->base_block->iseq->local_iseq;
+ unsigned int i;
+ iseq = th->base_block->iseq->body->local_iseq;
- for (i=0; i<iseq->local_table_size; i++) {
- if (iseq->local_table[i] == id) {
+ for (i=0; i<iseq->body->local_table_size; i++) {
+ if (iseq->body->local_table[i] == id) {
return 1;
}
}
@@ -5948,3 +6778,1595 @@ rb_parse_in_main(void)
{
return GET_THREAD()->parse_in_eval < 0;
}
+
+static int
+caller_location(VALUE *path, VALUE *absolute_path)
+{
+ const rb_thread_t *const th = GET_THREAD();
+ const rb_control_frame_t *const cfp =
+ rb_vm_get_ruby_level_next_cfp(th, th->cfp);
+
+ if (cfp) {
+ int line = rb_vm_get_sourceline(cfp);
+ *path = cfp->iseq->body->location.path;
+ *absolute_path = cfp->iseq->body->location.absolute_path;
+ return line;
+ }
+ else {
+ *path = rb_str_new2("<compiled>");
+ *absolute_path = *path;
+ return 1;
+ }
+}
+
+typedef struct {
+ VALUE arg;
+ rb_insn_func_t func;
+ int line;
+} accessor_args;
+
+static const rb_iseq_t *
+method_for_self(VALUE name, VALUE arg, rb_insn_func_t func,
+ VALUE (*build)(rb_iseq_t *, LINK_ANCHOR *, VALUE))
+{
+ VALUE path, absolute_path;
+ accessor_args acc;
+
+ acc.arg = arg;
+ acc.func = func;
+ acc.line = caller_location(&path, &absolute_path);
+ return rb_iseq_new_with_opt((NODE *)IFUNC_NEW(build, (VALUE)&acc, 0),
+ rb_sym2str(name), path, absolute_path,
+ INT2FIX(acc.line), 0, ISEQ_TYPE_METHOD, 0);
+}
+
+static VALUE
+for_self_aref(rb_iseq_t *iseq, LINK_ANCHOR *ret, VALUE a)
+{
+ const accessor_args *const args = (void *)a;
+ const int line = args->line;
+
+ iseq_set_local_table(iseq, 0);
+ iseq->body->param.lead_num = 0;
+ iseq->body->param.size = 0;
+
+ ADD_INSN1(ret, line, putobject, args->arg);
+ ADD_INSN1(ret, line, opt_call_c_function, (VALUE)args->func);
+ return Qnil;
+}
+
+static VALUE
+for_self_aset(rb_iseq_t *iseq, LINK_ANCHOR *ret, VALUE a)
+{
+ const accessor_args *const args = (void *)a;
+ const int line = args->line;
+ static const ID vars[] = {1, idUScore};
+
+ iseq_set_local_table(iseq, vars);
+ iseq->body->param.lead_num = 1;
+ iseq->body->param.size = 1;
+
+ ADD_INSN2(ret, line, getlocal, INT2FIX(numberof(vars)-0), INT2FIX(0));
+ ADD_INSN1(ret, line, putobject, args->arg);
+ ADD_INSN1(ret, line, opt_call_c_function, (VALUE)args->func);
+ ADD_INSN(ret, line, pop);
+ return Qnil;
+}
+
+/*
+ * func (index) -> (value)
+ */
+const rb_iseq_t *
+rb_method_for_self_aref(VALUE name, VALUE arg, rb_insn_func_t func)
+{
+ return method_for_self(name, arg, func, for_self_aref);
+}
+
+/*
+ * func (index, value) -> (index, value)
+ */
+const rb_iseq_t *
+rb_method_for_self_aset(VALUE name, VALUE arg, rb_insn_func_t func)
+{
+ return method_for_self(name, arg, func, for_self_aset);
+}
+
+/* ISeq binary format */
+
+typedef unsigned int ibf_offset_t;
+#define IBF_OFFSET(ptr) ((ibf_offset_t)(VALUE)(ptr))
+
+struct ibf_header {
+ char magic[4]; /* YARB */
+ unsigned int major_version;
+ unsigned int minor_version;
+ unsigned int size;
+ unsigned int extra_size;
+
+ unsigned int iseq_list_size;
+ unsigned int id_list_size;
+ unsigned int object_list_size;
+
+ ibf_offset_t iseq_list_offset;
+ ibf_offset_t id_list_offset;
+ ibf_offset_t object_list_offset;
+};
+
+struct ibf_id_entry {
+ enum {
+ ibf_id_enc_ascii,
+ ibf_id_enc_utf8,
+ ibf_id_enc_other
+ } enc : 2;
+ char body[1];
+};
+
+struct ibf_dump {
+ VALUE str;
+ VALUE iseq_list; /* [iseq0 offset, ...] */
+ VALUE obj_list; /* [objs] */
+ st_table *iseq_table; /* iseq -> iseq number */
+ st_table *id_table; /* id -> id number */
+};
+
+rb_iseq_t * iseq_alloc(void);
+
+struct ibf_load {
+ const char *buff;
+ const struct ibf_header *header;
+ ID *id_list; /* [id0, ...] */
+ VALUE iseq_list; /* [iseq0, ...] */
+ VALUE obj_list; /* [obj0, ...] */
+ VALUE loader_obj;
+ VALUE str;
+ rb_iseq_t *iseq;
+};
+
+static ibf_offset_t
+ibf_dump_pos(struct ibf_dump *dump)
+{
+ return (unsigned int)rb_str_strlen(dump->str);
+}
+
+static ibf_offset_t
+ibf_dump_write(struct ibf_dump *dump, const void *buff, unsigned long size)
+{
+ ibf_offset_t pos = ibf_dump_pos(dump);
+ rb_str_cat(dump->str, (const char *)buff, size);
+ /* TODO: overflow check */
+ return pos;
+}
+
+static void
+ibf_dump_overwrite(struct ibf_dump *dump, void *buff, unsigned int size, long offset)
+{
+ VALUE str = dump->str;
+ char *ptr = RSTRING_PTR(str);
+ if ((unsigned long)(size + offset) > (unsigned long)RSTRING_LEN(str))
+ rb_bug("ibf_dump_overwrite: overflow");
+ memcpy(ptr + offset, buff, size);
+}
+
+static void *
+ibf_load_alloc(const struct ibf_load *load, ibf_offset_t offset, int size)
+{
+ void *buff = ruby_xmalloc(size);
+ memcpy(buff, load->buff + offset, size);
+ return buff;
+}
+
+#define IBF_W(b, type, n) (type *)(VALUE)ibf_dump_write(dump, (b), sizeof(type) * (n))
+#define IBF_WV(variable) ibf_dump_write(dump, &(variable), sizeof(variable))
+#define IBF_WP(b, type, n) ibf_dump_write(dump, (b), sizeof(type) * (n))
+#define IBF_R(val, type, n) (type *)ibf_load_alloc(load, IBF_OFFSET(val), sizeof(type) * (n))
+
+static int
+ibf_table_lookup(struct st_table *table, st_data_t key)
+{
+ st_data_t val;
+
+ if (st_lookup(table, key, &val)) {
+ return (int)val;
+ }
+ else {
+ return -1;
+ }
+}
+
+static int
+ibf_table_index(struct st_table *table, st_data_t key)
+{
+ int index = ibf_table_lookup(table, key);
+
+ if (index < 0) { /* not found */
+ index = (int)table->num_entries;
+ st_insert(table, key, (st_data_t)index);
+ }
+
+ return index;
+}
+
+/* dump/load generic */
+
+static VALUE ibf_load_object(const struct ibf_load *load, VALUE object_index);
+static rb_iseq_t *ibf_load_iseq(const struct ibf_load *load, const rb_iseq_t *index_iseq);
+
+static VALUE
+ibf_dump_object(struct ibf_dump *dump, VALUE obj)
+{
+ long index = RARRAY_LEN(dump->obj_list);
+ long i;
+ for (i=0; i<index; i++) {
+ if (RARRAY_AREF(dump->obj_list, i) == obj) return (VALUE)i; /* dedup */
+ }
+ rb_ary_push(dump->obj_list, obj);
+ return (VALUE)index;
+}
+
+static VALUE
+ibf_dump_id(struct ibf_dump *dump, ID id)
+{
+ return (VALUE)ibf_table_index(dump->id_table, (st_data_t)id);
+}
+
+static ID
+ibf_load_id(const struct ibf_load *load, const ID id_index)
+{
+ ID id;
+
+ if (id_index == 0) {
+ id = 0;
+ }
+ else {
+ id = load->id_list[(long)id_index];
+
+ if (id == 0) {
+ long *indices = (long *)(load->buff + load->header->id_list_offset);
+ VALUE str = ibf_load_object(load, indices[id_index]);
+ id = NIL_P(str) ? 0 : rb_intern_str(str); /* str == nil -> internal junk id */
+ load->id_list[(long)id_index] = id;
+ }
+ }
+
+ return id;
+}
+
+/* dump/load: code */
+
+static VALUE
+ibf_dump_callinfo(struct ibf_dump *dump, const struct rb_call_info *ci)
+{
+ return (ci->flag & VM_CALL_KWARG) ? Qtrue : Qfalse;
+}
+
+static ibf_offset_t ibf_dump_iseq_each(struct ibf_dump *dump, const rb_iseq_t *iseq);
+
+static rb_iseq_t *
+ibf_dump_iseq(struct ibf_dump *dump, const rb_iseq_t *iseq)
+{
+ if (iseq == NULL) {
+ return (rb_iseq_t *)-1;
+ }
+ else {
+ int iseq_index = ibf_table_lookup(dump->iseq_table, (st_data_t)iseq);
+ if (iseq_index < 0) {
+ iseq_index = ibf_table_index(dump->iseq_table, (st_data_t)iseq);
+ rb_ary_store(dump->iseq_list, iseq_index, LONG2NUM(ibf_dump_iseq_each(dump, rb_iseq_check(iseq))));
+ }
+ return (rb_iseq_t *)(VALUE)iseq_index;
+ }
+}
+
+static VALUE
+ibf_dump_gentry(struct ibf_dump *dump, const struct rb_global_entry *entry)
+{
+ return (VALUE)ibf_dump_id(dump, entry->id);
+}
+
+static VALUE
+ibf_load_gentry(const struct ibf_load *load, const struct rb_global_entry *entry)
+{
+ ID gid = ibf_load_id(load, (ID)(VALUE)entry);
+ return (VALUE)rb_global_entry(gid);
+}
+
+static VALUE *
+ibf_dump_code(struct ibf_dump *dump, const rb_iseq_t *iseq)
+{
+ const int iseq_size = iseq->body->iseq_size;
+ int code_index;
+ VALUE *code;
+ const VALUE *orig_code = rb_iseq_original_iseq(iseq);
+
+ code = ALLOCA_N(VALUE, iseq_size);
+
+ for (code_index=0; code_index<iseq_size;) {
+ const VALUE insn = orig_code[code_index];
+ const char *types = insn_op_types(insn);
+ int op_index;
+
+ code[code_index++] = (VALUE)insn;
+
+ for (op_index=0; types[op_index]; op_index++, code_index++) {
+ VALUE op = orig_code[code_index];
+ switch (types[op_index]) {
+ case TS_CDHASH:
+ case TS_VALUE:
+ code[code_index] = ibf_dump_object(dump, op);
+ break;
+ case TS_ISEQ:
+ code[code_index] = (VALUE)ibf_dump_iseq(dump, (const rb_iseq_t *)op);
+ break;
+ case TS_IC:
+ {
+ unsigned int i;
+ for (i=0; i<iseq->body->is_size; i++) {
+ if (op == (VALUE)&iseq->body->is_entries[i]) {
+ break;
+ }
+ }
+ code[code_index] = i;
+ }
+ break;
+ case TS_CALLINFO:
+ code[code_index] = ibf_dump_callinfo(dump, (const struct rb_call_info *)op);
+ break;
+ case TS_CALLCACHE:
+ code[code_index] = 0;
+ break;
+ case TS_ID:
+ code[code_index] = ibf_dump_id(dump, (ID)op);
+ break;
+ case TS_GENTRY:
+ code[code_index] = ibf_dump_gentry(dump, (const struct rb_global_entry *)op);
+ break;
+ case TS_FUNCPTR:
+ rb_raise(rb_eRuntimeError, "TS_FUNCPTR is not supported");
+ break;
+ default:
+ code[code_index] = op;
+ break;
+ }
+ }
+ assert(insn_len(insn) == op_index+1);
+ }
+
+ return IBF_W(code, VALUE, iseq_size);
+}
+
+static VALUE *
+ibf_load_code(const struct ibf_load *load, const rb_iseq_t *iseq, const struct rb_iseq_constant_body *body)
+{
+ const int iseq_size = body->iseq_size;
+ int code_index;
+ VALUE *code = IBF_R(body->iseq_encoded, VALUE, iseq_size);
+
+ struct rb_call_info *ci_entries = iseq->body->ci_entries;
+ struct rb_call_info_with_kwarg *ci_kw_entries = (struct rb_call_info_with_kwarg *)&iseq->body->ci_entries[iseq->body->ci_size];
+ struct rb_call_cache *cc_entries = iseq->body->cc_entries;
+ union iseq_inline_storage_entry *is_entries = iseq->body->is_entries;
+
+ for (code_index=0; code_index<iseq_size;) {
+ const VALUE insn = code[code_index++];
+ const char *types = insn_op_types(insn);
+ int op_index;
+
+ for (op_index=0; types[op_index]; op_index++, code_index++) {
+ VALUE op = code[code_index];
+
+ switch (types[op_index]) {
+ case TS_CDHASH:
+ case TS_VALUE:
+ code[code_index] = ibf_load_object(load, op);
+ break;
+ case TS_ISEQ:
+ code[code_index] = (VALUE)ibf_load_iseq(load, (const rb_iseq_t *)op);
+ break;
+ case TS_IC:
+ code[code_index] = (VALUE)&is_entries[(int)op];
+ break;
+ case TS_CALLINFO:
+ code[code_index] = op ? (VALUE)ci_kw_entries++ : (VALUE)ci_entries++; /* op is Qtrue (kw) or Qfalse (!kw) */
+ break;
+ case TS_CALLCACHE:
+ code[code_index] = (VALUE)cc_entries++;
+ break;
+ case TS_ID:
+ code[code_index] = ibf_load_id(load, (ID)op);
+ break;
+ case TS_GENTRY:
+ code[code_index] = ibf_load_gentry(load, (const struct rb_global_entry *)op);
+ break;
+ case TS_FUNCPTR:
+ rb_raise(rb_eRuntimeError, "TS_FUNCPTR is not supported");
+ break;
+ default:
+ /* code[code_index] = op; */
+ break;
+ }
+ }
+ assert(insn_len(insn) == op_index+1);
+ };
+
+
+ return code;
+}
+
+static VALUE *
+ibf_dump_param_opt_table(struct ibf_dump *dump, const rb_iseq_t *iseq)
+{
+ int opt_num = iseq->body->param.opt_num;
+
+ if (opt_num > 0) {
+ return IBF_W(iseq->body->param.opt_table, VALUE, opt_num + 1);
+ }
+ else {
+ return NULL;
+ }
+}
+
+static VALUE *
+ibf_load_param_opt_table(const struct ibf_load *load, const struct rb_iseq_constant_body *body)
+{
+ int opt_num = body->param.opt_num;
+
+ if (opt_num > 0) {
+ ibf_offset_t offset = IBF_OFFSET(body->param.opt_table);
+ VALUE *table = ALLOC_N(VALUE, opt_num+1);
+ MEMCPY(table, load->buff + offset, VALUE, opt_num+1);
+ return table;
+ }
+ else {
+ return NULL;
+ }
+}
+
+static struct rb_iseq_param_keyword *
+ibf_dump_param_keyword(struct ibf_dump *dump, const rb_iseq_t *iseq)
+{
+ const struct rb_iseq_param_keyword *kw = iseq->body->param.keyword;
+
+ if (kw) {
+ struct rb_iseq_param_keyword dump_kw = *kw;
+ int dv_num = kw->num - kw->required_num;
+ ID *ids = kw->num > 0 ? ALLOCA_N(ID, kw->num) : NULL;
+ VALUE *dvs = dv_num > 0 ? ALLOCA_N(VALUE, dv_num) : NULL;
+ int i;
+
+ for (i=0; i<kw->num; i++) ids[i] = (ID)ibf_dump_id(dump, kw->table[i]);
+ for (i=0; i<dv_num; i++) dvs[i] = (VALUE)ibf_dump_object(dump, kw->default_values[i]);
+
+ dump_kw.table = IBF_W(ids, ID, kw->num);
+ dump_kw.default_values = IBF_W(dvs, VALUE, dv_num);
+ return IBF_W(&dump_kw, struct rb_iseq_param_keyword, 1);
+ }
+ else {
+ return NULL;
+ }
+}
+
+static const struct rb_iseq_param_keyword *
+ibf_load_param_keyword(const struct ibf_load *load, const struct rb_iseq_constant_body *body)
+{
+ if (body->param.keyword) {
+ struct rb_iseq_param_keyword *kw = IBF_R(body->param.keyword, struct rb_iseq_param_keyword, 1);
+ ID *ids = IBF_R(kw->table, ID, kw->num);
+ int dv_num = kw->num - kw->required_num;
+ VALUE *dvs = IBF_R(kw->default_values, VALUE, dv_num);
+ int i;
+
+ for (i=0; i<kw->num; i++) {
+ ids[i] = ibf_load_id(load, ids[i]);
+ }
+ for (i=0; i<dv_num; i++) {
+ dvs[i] = ibf_load_object(load, dvs[i]);
+ }
+
+ kw->table = ids;
+ kw->default_values = dvs;
+ return kw;
+ }
+ else {
+ return NULL;
+ }
+}
+
+static struct iseq_line_info_entry *
+ibf_dump_line_info_table(struct ibf_dump *dump, const rb_iseq_t *iseq)
+{
+ return IBF_W(iseq->body->line_info_table, struct iseq_line_info_entry, iseq->body->line_info_size);
+}
+
+static struct iseq_line_info_entry *
+ibf_load_line_info_table(const struct ibf_load *load, const struct rb_iseq_constant_body *body)
+{
+ return IBF_R(body->line_info_table, struct iseq_line_info_entry, body->line_info_size);
+}
+
+static ID *
+ibf_dump_local_table(struct ibf_dump *dump, const rb_iseq_t *iseq)
+{
+ const int size = iseq->body->local_size - 1;
+ ID *table = ALLOCA_N(ID, size);
+ int i;
+
+ for (i=0; i<size; i++) {
+ table[i] = ibf_dump_id(dump, iseq->body->local_table[i]);
+ }
+
+ return IBF_W(table, ID, size);
+}
+
+static ID *
+ibf_load_local_table(const struct ibf_load *load, const struct rb_iseq_constant_body *body)
+{
+ const int size = body->local_size - 1;
+
+ if (size > 0) {
+ ID *table = IBF_R(body->local_table, ID, size);
+ int i;
+
+ for (i=0; i<size; i++) {
+ table[i] = ibf_load_id(load, table[i]);
+ }
+ return table;
+ }
+ else {
+ return NULL;
+ }
+}
+
+static struct iseq_catch_table *
+ibf_dump_catch_table(struct ibf_dump *dump, const rb_iseq_t *iseq)
+{
+ const struct iseq_catch_table *table = iseq->body->catch_table;
+
+ if (table) {
+ int byte_size = iseq_catch_table_bytes(iseq->body->catch_table->size);
+ struct iseq_catch_table *dump_table = (struct iseq_catch_table *)ALLOCA_N(char, byte_size);
+ unsigned int i;
+ dump_table->size = table->size;
+ for (i=0; i<table->size; i++) {
+ dump_table->entries[i] = table->entries[i];
+ dump_table->entries[i].iseq = ibf_dump_iseq(dump, table->entries[i].iseq);
+ }
+ return (struct iseq_catch_table *)(VALUE)ibf_dump_write(dump, dump_table, byte_size);
+ }
+ else {
+ return NULL;
+ }
+}
+
+static struct iseq_catch_table *
+ibf_load_catch_table(const struct ibf_load *load, const struct rb_iseq_constant_body *body)
+{
+ if (body->catch_table) {
+ struct iseq_catch_table *table;
+ unsigned int i;
+ unsigned int size;
+ size = *(unsigned int *)(load->buff + IBF_OFFSET(body->catch_table));
+ table = ibf_load_alloc(load, IBF_OFFSET(body->catch_table), iseq_catch_table_bytes(size));
+ for (i=0; i<size; i++) {
+ table->entries[i].iseq = ibf_load_iseq(load, table->entries[i].iseq);
+ }
+ return table;
+ }
+ else {
+ return NULL;
+ }
+}
+
+static struct rb_call_info *
+ibf_dump_ci_entries(struct ibf_dump *dump, const rb_iseq_t *iseq)
+{
+ const unsigned int ci_size = iseq->body->ci_size;
+ const unsigned int ci_kw_size = iseq->body->ci_kw_size;
+ const struct rb_call_info *ci_entries = iseq->body->ci_entries;
+ struct rb_call_info *dump_ci_entries;
+ struct rb_call_info_with_kwarg *dump_ci_kw_entries;
+ int byte_size = ci_size * sizeof(struct rb_call_info) +
+ ci_kw_size * sizeof(struct rb_call_info_with_kwarg);
+ unsigned int i;
+
+ dump_ci_entries = (struct rb_call_info *)ALLOCA_N(char, byte_size);
+ dump_ci_kw_entries = (struct rb_call_info_with_kwarg *)&dump_ci_entries[ci_size];
+ memcpy(dump_ci_entries, ci_entries, byte_size);
+
+ for (i=0; i<ci_size; i++) { /* conver ID for each ci */
+ dump_ci_entries[i].mid = ibf_dump_id(dump, dump_ci_entries[i].mid);
+ }
+ for (i=0; i<ci_kw_size; i++) {
+ const struct rb_call_info_kw_arg *kw_arg = dump_ci_kw_entries[i].kw_arg;
+ int j;
+ VALUE *keywords = ALLOCA_N(VALUE, kw_arg->keyword_len);
+ for (j=0; j<kw_arg->keyword_len; j++) {
+ keywords[j] = (VALUE)ibf_dump_object(dump, kw_arg->keywords[j]); /* kw_arg->keywords[n] is Symbol */
+ }
+ dump_ci_kw_entries[i].kw_arg = (struct rb_call_info_kw_arg *)(VALUE)ibf_dump_write(dump, &kw_arg->keyword_len, sizeof(int));
+ ibf_dump_write(dump, keywords, sizeof(VALUE) * kw_arg->keyword_len);
+
+ dump_ci_kw_entries[i].ci.mid = ibf_dump_id(dump, dump_ci_kw_entries[i].ci.mid);
+ }
+ return (struct rb_call_info *)(VALUE)ibf_dump_write(dump, dump_ci_entries, byte_size);
+}
+
+static struct rb_call_info *
+ibf_load_ci_entries(const struct ibf_load *load, const struct rb_iseq_constant_body *body)
+{
+ unsigned int i;
+ const unsigned int ci_size = body->ci_size;
+ const unsigned int ci_kw_size = body->ci_kw_size;
+ struct rb_call_info *ci_entries = ibf_load_alloc(load, IBF_OFFSET(body->ci_entries),
+ sizeof(struct rb_call_info) * body->ci_size +
+ sizeof(struct rb_call_info_with_kwarg) * body->ci_kw_size);
+ struct rb_call_info_with_kwarg *ci_kw_entries = (struct rb_call_info_with_kwarg *)&ci_entries[ci_size];
+
+ for (i=0; i<ci_size; i++) {
+ ci_entries[i].mid = ibf_load_id(load, ci_entries[i].mid);
+ }
+ for (i=0; i<ci_kw_size; i++) {
+ int j;
+ ibf_offset_t kw_arg_offset = IBF_OFFSET(ci_kw_entries[i].kw_arg);
+ const int keyword_len = *(int *)(load->buff + kw_arg_offset);
+ const VALUE *keywords = (VALUE *)(load->buff + kw_arg_offset + sizeof(int));
+ struct rb_call_info_kw_arg *kw_arg = ruby_xmalloc(sizeof(struct rb_call_info_kw_arg) + sizeof(VALUE) * (keyword_len - 1));
+ kw_arg->keyword_len = keyword_len;
+ for (j=0; j<kw_arg->keyword_len; j++) {
+ kw_arg->keywords[j] = (VALUE)ibf_load_object(load, keywords[j]);
+ }
+ ci_kw_entries[i].kw_arg = kw_arg;
+ ci_kw_entries[i].ci.mid = ibf_load_id(load, ci_kw_entries[i].ci.mid);
+ }
+
+ return ci_entries;
+}
+
+static ibf_offset_t
+ibf_dump_iseq_each(struct ibf_dump *dump, const rb_iseq_t *iseq)
+{
+ struct rb_iseq_constant_body dump_body;
+ dump_body = *iseq->body;
+
+ dump_body.location.path = ibf_dump_object(dump, dump_body.location.path);
+ dump_body.location.absolute_path = ibf_dump_object(dump, dump_body.location.absolute_path);
+ dump_body.location.base_label = ibf_dump_object(dump, dump_body.location.base_label);
+ dump_body.location.label = ibf_dump_object(dump, dump_body.location.label);
+
+ dump_body.iseq_encoded = ibf_dump_code(dump, iseq);
+ dump_body.param.opt_table = ibf_dump_param_opt_table(dump, iseq);
+ dump_body.param.keyword = ibf_dump_param_keyword(dump, iseq);
+ dump_body.line_info_table = ibf_dump_line_info_table(dump, iseq);
+ dump_body.local_table = ibf_dump_local_table(dump, iseq);
+ dump_body.catch_table = ibf_dump_catch_table(dump, iseq);
+ dump_body.parent_iseq = ibf_dump_iseq(dump, iseq->body->parent_iseq);
+ dump_body.local_iseq = ibf_dump_iseq(dump, iseq->body->local_iseq);
+ dump_body.is_entries = NULL;
+ dump_body.ci_entries = ibf_dump_ci_entries(dump, iseq);
+ dump_body.cc_entries = NULL;
+ dump_body.mark_ary = ISEQ_FLIP_CNT(iseq);
+
+ return ibf_dump_write(dump, &dump_body, sizeof(dump_body));
+}
+
+static VALUE
+ibf_load_location_str(const struct ibf_load *load, VALUE str_index)
+{
+ VALUE str = ibf_load_object(load, str_index);
+ if (str != Qnil) {
+ str = rb_fstring(str);
+ }
+ return str;
+}
+
+static void
+ibf_load_iseq_each(const struct ibf_load *load, rb_iseq_t *iseq, ibf_offset_t offset)
+{
+ struct rb_iseq_constant_body *load_body = iseq->body = ZALLOC(struct rb_iseq_constant_body);
+ const struct rb_iseq_constant_body *body = (struct rb_iseq_constant_body *)(load->buff + offset);
+
+ /* memcpy(load_body, load->buff + offset, sizeof(*load_body)); */
+ load_body->type = body->type;
+ load_body->stack_max = body->stack_max;
+ load_body->local_size = body->local_size;
+ load_body->iseq_size = body->iseq_size;
+ load_body->param = body->param;
+ load_body->local_table_size = body->local_table_size;
+ load_body->is_size = body->is_size;
+ load_body->ci_size = body->ci_size;
+ load_body->ci_kw_size = body->ci_kw_size;
+ load_body->line_info_size = body->line_info_size;
+
+ RB_OBJ_WRITE(iseq, &load_body->mark_ary, iseq_mark_ary_create((int)body->mark_ary));
+
+ RB_OBJ_WRITE(iseq, &load_body->location.path, ibf_load_location_str(load, body->location.path));
+ RB_OBJ_WRITE(iseq, &load_body->location.absolute_path, ibf_load_location_str(load, body->location.absolute_path));
+ RB_OBJ_WRITE(iseq, &load_body->location.base_label, ibf_load_location_str(load, body->location.base_label));
+ RB_OBJ_WRITE(iseq, &load_body->location.label, ibf_load_location_str(load, body->location.label));
+ load_body->location.first_lineno = body->location.first_lineno;
+
+ load_body->is_entries = ZALLOC_N(union iseq_inline_storage_entry, body->is_size);
+ load_body->ci_entries = ibf_load_ci_entries(load, body);
+ load_body->cc_entries = ZALLOC_N(struct rb_call_cache, body->ci_size + body->ci_kw_size);
+ load_body->param.opt_table = ibf_load_param_opt_table(load, body);
+ load_body->param.keyword = ibf_load_param_keyword(load, body);
+ load_body->line_info_table = ibf_load_line_info_table(load, body);
+ load_body->local_table = ibf_load_local_table(load, body);
+ load_body->catch_table = ibf_load_catch_table(load, body);
+ load_body->parent_iseq = ibf_load_iseq(load, body->parent_iseq);
+ load_body->local_iseq = ibf_load_iseq(load, body->local_iseq);
+
+ load_body->iseq_encoded = ibf_load_code(load, iseq, body);
+
+ rb_iseq_translate_threaded_code(iseq);
+}
+
+
+static void
+ibf_dump_iseq_list(struct ibf_dump *dump, struct ibf_header *header)
+{
+ const long size = RARRAY_LEN(dump->iseq_list);
+ ibf_offset_t *list = ALLOCA_N(ibf_offset_t, size);
+ long i;
+
+ for (i=0; i<size; i++) {
+ list[i] = (ibf_offset_t)NUM2LONG(rb_ary_entry(dump->iseq_list, i));
+ }
+
+ header->iseq_list_offset = ibf_dump_write(dump, list, sizeof(ibf_offset_t) * size);
+ header->iseq_list_size = (unsigned int)size;
+}
+
+struct ibf_dump_id_list_i_arg {
+ struct ibf_dump *dump;
+ long *list;
+ int current_i;
+};
+
+static int
+ibf_dump_id_list_i(st_data_t key, st_data_t val, st_data_t ptr)
+{
+ struct ibf_dump_id_list_i_arg *arg = (struct ibf_dump_id_list_i_arg *)ptr;
+ int i = (int)val;
+ ID id = (ID)key;
+ assert(arg->current_i == i);
+ arg->current_i++;
+
+ if (rb_id2name(id)) {
+ arg->list[i] = (long)ibf_dump_object(arg->dump, rb_id2str(id));
+ }
+ else {
+ arg->list[i] = 0;
+ }
+
+ return ST_CONTINUE;
+}
+
+static void
+ibf_dump_id_list(struct ibf_dump *dump, struct ibf_header *header)
+{
+ const long size = dump->id_table->num_entries;
+ struct ibf_dump_id_list_i_arg arg;
+ arg.list = ALLOCA_N(long, size);
+ arg.dump = dump;
+ arg.current_i = 0;
+
+ st_foreach(dump->id_table, ibf_dump_id_list_i, (st_data_t)&arg);
+
+ header->id_list_offset = ibf_dump_write(dump, arg.list, sizeof(long) * size);
+ header->id_list_size = (unsigned int)size;
+}
+
+#define IBF_OBJECT_INTERNAL FL_PROMOTED0
+
+/*
+ * Binary format
+ * - ibf_object_header
+ * - ibf_object_xxx (xxx is type)
+ */
+
+struct ibf_object_header {
+ unsigned int type: 5;
+ unsigned int special_const: 1;
+ unsigned int frozen: 1;
+ unsigned int internal: 1;
+};
+
+enum ibf_object_class_index {
+ IBF_OBJECT_CLASS_OBJECT,
+ IBF_OBJECT_CLASS_ARRAY,
+ IBF_OBJECT_CLASS_STANDARD_ERROR
+};
+
+struct ibf_object_string {
+ long encindex;
+ long len;
+ char ptr[1];
+};
+
+struct ibf_object_regexp {
+ long srcstr;
+ char option;
+};
+
+struct ibf_object_array {
+ long len;
+ long ary[1];
+};
+
+struct ibf_object_hash {
+ long len;
+ long keyval[1];
+};
+
+struct ibf_object_struct_range {
+ long class_index;
+ long len;
+ long beg;
+ long end;
+ int excl;
+};
+
+struct ibf_object_bignum {
+ ssize_t slen;
+ BDIGIT digits[1];
+};
+
+enum ibf_object_data_type {
+ IBF_OBJECT_DATA_ENCODING
+};
+
+struct ibf_object_complex_rational {
+ long a, b;
+};
+
+struct ibf_object_symbol {
+ long str;
+};
+
+#define IBF_OBJHEADER(offset) (struct ibf_object_header *)(load->buff + (offset))
+#define IBF_OBJBODY(type, offset) (type *)(load->buff + sizeof(struct ibf_object_header) + (offset))
+
+static void
+ibf_dump_object_unsupported(struct ibf_dump *dump, VALUE obj)
+{
+ rb_obj_info_dump(obj);
+ rb_bug("ibf_dump_object_unsupported: unsupported");
+}
+
+static VALUE
+ibf_load_object_unsupported(const struct ibf_load *load, const struct ibf_object_header *header, ibf_offset_t offset)
+{
+ rb_bug("unsupported");
+ return Qnil;
+}
+
+static void
+ibf_dump_object_class(struct ibf_dump *dump, VALUE obj)
+{
+ enum ibf_object_class_index cindex;
+ if (obj == rb_cObject) {
+ cindex = IBF_OBJECT_CLASS_OBJECT;
+ }
+ else if (obj == rb_cArray) {
+ cindex = IBF_OBJECT_CLASS_ARRAY;
+ }
+ else if (obj == rb_eStandardError) {
+ cindex = IBF_OBJECT_CLASS_STANDARD_ERROR;
+ }
+ else {
+ rb_obj_info_dump(obj);
+ rb_p(obj);
+ rb_bug("unsupported class");
+ }
+ ibf_dump_write(dump, &cindex, sizeof(cindex));
+}
+
+static VALUE
+ibf_load_object_class(const struct ibf_load *load, const struct ibf_object_header *header, ibf_offset_t offset)
+{
+ enum ibf_object_class_index *cindexp = IBF_OBJBODY(enum ibf_object_class_index, offset);
+ enum ibf_object_class_index cindex = *cindexp;
+
+ switch (cindex) {
+ case IBF_OBJECT_CLASS_OBJECT:
+ return rb_cObject;
+ case IBF_OBJECT_CLASS_ARRAY:
+ return rb_cArray;
+ case IBF_OBJECT_CLASS_STANDARD_ERROR:
+ return rb_eStandardError;
+ }
+
+ rb_bug("ibf_load_object_class: unknown class (%d)", (int)cindex);
+}
+
+
+static void
+ibf_dump_object_float(struct ibf_dump *dump, VALUE obj)
+{
+ double dbl = RFLOAT_VALUE(obj);
+ ibf_dump_write(dump, &dbl, sizeof(dbl));
+}
+
+static VALUE
+ibf_load_object_float(const struct ibf_load *load, const struct ibf_object_header *header, ibf_offset_t offset)
+{
+ double *dblp = IBF_OBJBODY(double, offset);
+ return DBL2NUM(*dblp);
+}
+
+static void
+ibf_dump_object_string(struct ibf_dump *dump, VALUE obj)
+{
+ long encindex = (long)rb_enc_get_index(obj);
+ long len = RSTRING_LEN(obj);
+ const char *ptr = RSTRING_PTR(obj);
+
+ if (encindex > RUBY_ENCINDEX_BUILTIN_MAX) {
+ rb_encoding *enc = rb_enc_from_index((int)encindex);
+ const char *enc_name = rb_enc_name(enc);
+ encindex = RUBY_ENCINDEX_BUILTIN_MAX + ibf_dump_object(dump, rb_str_new2(enc_name));
+ }
+
+ IBF_WV(encindex);
+ IBF_WV(len);
+ IBF_WP(ptr, char, len);
+}
+
+static VALUE
+ibf_load_object_string(const struct ibf_load *load, const struct ibf_object_header *header, ibf_offset_t offset)
+{
+ const struct ibf_object_string *string = IBF_OBJBODY(struct ibf_object_string, offset);
+ VALUE str = rb_str_new(string->ptr, string->len);
+ int encindex = (int)string->encindex;
+
+ if (encindex > RUBY_ENCINDEX_BUILTIN_MAX) {
+ VALUE enc_name_str = ibf_load_object(load, encindex - RUBY_ENCINDEX_BUILTIN_MAX);
+ encindex = rb_enc_find_index(RSTRING_PTR(enc_name_str));
+ }
+ rb_enc_associate_index(str, encindex);
+
+ if (header->internal) rb_obj_hide(str);
+ if (header->frozen) str = rb_fstring(str);
+
+ return str;
+}
+
+static void
+ibf_dump_object_regexp(struct ibf_dump *dump, VALUE obj)
+{
+ struct ibf_object_regexp regexp;
+ regexp.srcstr = RREGEXP_SRC(obj);
+ regexp.option = (char)rb_reg_options(obj);
+ regexp.srcstr = (long)ibf_dump_object(dump, regexp.srcstr);
+ IBF_WV(regexp);
+}
+
+static VALUE
+ibf_load_object_regexp(const struct ibf_load *load, const struct ibf_object_header *header, ibf_offset_t offset)
+{
+ const struct ibf_object_regexp *regexp = IBF_OBJBODY(struct ibf_object_regexp, offset);
+ VALUE srcstr = ibf_load_object(load, regexp->srcstr);
+ VALUE reg = rb_reg_compile(srcstr, (int)regexp->option, NULL, 0);
+
+ if (header->internal) rb_obj_hide(reg);
+ if (header->frozen) rb_obj_freeze(reg);
+
+ return reg;
+}
+
+static void
+ibf_dump_object_array(struct ibf_dump *dump, VALUE obj)
+{
+ long i, len = (int)RARRAY_LEN(obj);
+ IBF_WV(len);
+ for (i=0; i<len; i++) {
+ long index = (long)ibf_dump_object(dump, RARRAY_AREF(obj, i));
+ IBF_WV(index);
+ }
+}
+
+static VALUE
+ibf_load_object_array(const struct ibf_load *load, const struct ibf_object_header *header, ibf_offset_t offset)
+{
+ const struct ibf_object_array *array = IBF_OBJBODY(struct ibf_object_array, offset);
+ VALUE ary = rb_ary_new_capa(array->len);
+ int i;
+
+ for (i=0; i<array->len; i++) {
+ rb_ary_push(ary, ibf_load_object(load, array->ary[i]));
+ }
+
+ if (header->internal) rb_obj_hide(ary);
+ if (header->frozen) rb_obj_freeze(ary);
+
+ return ary;
+}
+
+static int
+ibf_dump_object_hash_i(st_data_t key, st_data_t val, st_data_t ptr)
+{
+ struct ibf_dump *dump = (struct ibf_dump *)ptr;
+ long key_index = (long)ibf_dump_object(dump, (VALUE)key);
+ long val_index = (long)ibf_dump_object(dump, (VALUE)val);
+ IBF_WV(key_index);
+ IBF_WV(val_index);
+ return ST_CONTINUE;
+}
+
+static void
+ibf_dump_object_hash(struct ibf_dump *dump, VALUE obj)
+{
+ long len = RHASH_SIZE(obj);
+ IBF_WV(len);
+ if (len > 0) st_foreach(RHASH(obj)->ntbl, ibf_dump_object_hash_i, (st_data_t)dump);
+}
+
+static VALUE
+ibf_load_object_hash(const struct ibf_load *load, const struct ibf_object_header *header, ibf_offset_t offset)
+{
+ const struct ibf_object_hash *hash = IBF_OBJBODY(struct ibf_object_hash, offset);
+ VALUE obj = rb_hash_new();
+ int i;
+
+ for (i=0; i<hash->len; i++) {
+ VALUE key = ibf_load_object(load, hash->keyval[i*2 ]);
+ VALUE val = ibf_load_object(load, hash->keyval[i*2+1]);
+ rb_hash_aset(obj, key, val);
+ }
+ rb_hash_rehash(obj);
+
+ if (header->internal) rb_obj_hide(obj);
+ if (header->frozen) rb_obj_freeze(obj);
+
+ return obj;
+}
+
+static void
+ibf_dump_object_struct(struct ibf_dump *dump, VALUE obj)
+{
+ if (rb_obj_is_kind_of(obj, rb_cRange)) {
+ struct ibf_object_struct_range range;
+ VALUE beg, end;
+ range.len = 3;
+ range.class_index = 0;
+
+ rb_range_values(obj, &beg, &end, &range.excl);
+ range.beg = (long)ibf_dump_object(dump, beg);
+ range.end = (long)ibf_dump_object(dump, end);
+
+ IBF_WV(range);
+ }
+ else {
+ rb_bug("ibf_dump_object_struct: unsupported class");
+ }
+}
+
+static VALUE
+ibf_load_object_struct(const struct ibf_load *load, const struct ibf_object_header *header, ibf_offset_t offset)
+{
+ const struct ibf_object_struct_range *range = IBF_OBJBODY(struct ibf_object_struct_range, offset);
+ VALUE beg = ibf_load_object(load, range->beg);
+ VALUE end = ibf_load_object(load, range->end);
+ VALUE obj = rb_range_new(beg, end, range->excl);
+ if (header->internal) rb_obj_hide(obj);
+ if (header->frozen) rb_obj_freeze(obj);
+ return obj;
+}
+
+static void
+ibf_dump_object_bignum(struct ibf_dump *dump, VALUE obj)
+{
+ ssize_t len = BIGNUM_LEN(obj);
+ ssize_t slen = BIGNUM_SIGN(obj) > 0 ? len : len * -1;
+ BDIGIT *d = BIGNUM_DIGITS(obj);
+
+ IBF_WV(slen);
+ IBF_WP(d, BDIGIT, len);
+}
+
+static VALUE
+ibf_load_object_bignum(const struct ibf_load *load, const struct ibf_object_header *header, ibf_offset_t offset)
+{
+ const struct ibf_object_bignum *bignum = IBF_OBJBODY(struct ibf_object_bignum, offset);
+ int sign = bignum->slen > 0;
+ ssize_t len = sign > 0 ? bignum->slen : -1 * bignum->slen;
+ VALUE obj = rb_integer_unpack(bignum->digits, len * 2, 2, 0,
+ INTEGER_PACK_LITTLE_ENDIAN | (sign == 0 ? INTEGER_PACK_NEGATIVE : 0));
+ if (header->internal) rb_obj_hide(obj);
+ if (header->frozen) rb_obj_freeze(obj);
+ return obj;
+}
+
+static void
+ibf_dump_object_data(struct ibf_dump *dump, VALUE obj)
+{
+ if (rb_data_is_encoding(obj)) {
+ rb_encoding *enc = rb_to_encoding(obj);
+ const char *name = rb_enc_name(enc);
+ enum ibf_object_data_type type = IBF_OBJECT_DATA_ENCODING;
+ long len = strlen(name) + 1;
+ IBF_WV(type);
+ IBF_WV(len);
+ IBF_WP(name, char, strlen(name) + 1);
+ }
+ else {
+ ibf_dump_object_unsupported(dump, obj);
+ }
+}
+
+static VALUE
+ibf_load_object_data(const struct ibf_load *load, const struct ibf_object_header *header, ibf_offset_t offset)
+{
+ const enum ibf_object_data_type *typep = IBF_OBJBODY(enum ibf_object_data_type, offset);
+ /* const long *lenp = IBF_OBJBODY(long, offset + sizeof(enum ibf_object_data_type)); */
+ const char *data = IBF_OBJBODY(char, offset + sizeof(enum ibf_object_data_type) + sizeof(long));
+
+ switch (*typep) {
+ case IBF_OBJECT_DATA_ENCODING:
+ {
+ VALUE encobj = rb_enc_from_encoding(rb_enc_find(data));
+ return encobj;
+ }
+ }
+
+ return ibf_load_object_unsupported(load, header, offset);
+}
+
+static void
+ibf_dump_object_complex_rational(struct ibf_dump *dump, VALUE obj)
+{
+ long real = (long)ibf_dump_object(dump, RCOMPLEX(obj)->real);
+ long imag = (long)ibf_dump_object(dump, RCOMPLEX(obj)->imag);
+
+ IBF_WV(real);
+ IBF_WV(imag);
+}
+
+static VALUE
+ibf_load_object_complex_rational(const struct ibf_load *load, const struct ibf_object_header *header, ibf_offset_t offset)
+{
+ const struct ibf_object_complex_rational *nums = IBF_OBJBODY(struct ibf_object_complex_rational, offset);
+ VALUE a = ibf_load_object(load, nums->a);
+ VALUE b = ibf_load_object(load, nums->b);
+ VALUE obj = header->type == T_COMPLEX ?
+ rb_complex_new(a, b) : rb_rational_new(a, b);
+
+ if (header->internal) rb_obj_hide(obj);
+ if (header->frozen) rb_obj_freeze(obj);
+ return obj;
+}
+
+static void
+ibf_dump_object_symbol(struct ibf_dump *dump, VALUE obj)
+{
+ VALUE str = rb_sym2str(obj);
+ long str_index = (long)ibf_dump_object(dump, str);
+ IBF_WV(str_index);
+}
+
+static VALUE
+ibf_load_object_symbol(const struct ibf_load *load, const struct ibf_object_header *header, ibf_offset_t offset)
+{
+ /* const struct ibf_object_header *header = IBF_OBJHEADER(offset); */
+ const struct ibf_object_symbol *symbol = IBF_OBJBODY(struct ibf_object_symbol, offset);
+ VALUE str = ibf_load_object(load, symbol->str);
+ ID id = rb_intern_str(str);
+ return ID2SYM(id);
+}
+
+typedef void (*ibf_dump_object_function)(struct ibf_dump *dump, VALUE obj);
+static ibf_dump_object_function dump_object_functions[RUBY_T_MASK+1] = {
+ ibf_dump_object_unsupported, /* T_NONE */
+ ibf_dump_object_unsupported, /* T_OBJECT */
+ ibf_dump_object_class, /* T_CLASS */
+ ibf_dump_object_unsupported, /* T_MODULE */
+ ibf_dump_object_float, /* T_FLOAT */
+ ibf_dump_object_string, /* T_STRING */
+ ibf_dump_object_regexp, /* T_REGEXP */
+ ibf_dump_object_array, /* T_ARRAY */
+ ibf_dump_object_hash, /* T_HASH */
+ ibf_dump_object_struct, /* T_STRUCT */
+ ibf_dump_object_bignum, /* T_BIGNUM */
+ ibf_dump_object_unsupported, /* T_FILE */
+ ibf_dump_object_data, /* T_DATA */
+ ibf_dump_object_unsupported, /* T_MATCH */
+ ibf_dump_object_complex_rational, /* T_COMPLEX */
+ ibf_dump_object_complex_rational, /* T_RATIONAL */
+ ibf_dump_object_unsupported, /* 0x10 */
+ ibf_dump_object_unsupported, /* 0x11 T_NIL */
+ ibf_dump_object_unsupported, /* 0x12 T_TRUE */
+ ibf_dump_object_unsupported, /* 0x13 T_FALSE */
+ ibf_dump_object_symbol, /* 0x14 T_SYMBOL */
+ ibf_dump_object_unsupported, /* T_FIXNUM */
+ ibf_dump_object_unsupported, /* T_UNDEF */
+ ibf_dump_object_unsupported, /* 0x17 */
+ ibf_dump_object_unsupported, /* 0x18 */
+ ibf_dump_object_unsupported, /* 0x19 */
+ ibf_dump_object_unsupported, /* T_IMEMO 0x1a */
+ ibf_dump_object_unsupported, /* T_NODE 0x1b */
+ ibf_dump_object_unsupported, /* T_ICLASS 0x1c */
+ ibf_dump_object_unsupported, /* T_ZOMBIE 0x1d */
+ ibf_dump_object_unsupported, /* 0x1e */
+ ibf_dump_object_unsupported /* 0x1f */
+};
+
+static ibf_offset_t
+lbf_dump_object_object(struct ibf_dump *dump, VALUE obj)
+{
+ struct ibf_object_header obj_header;
+ ibf_offset_t current_offset = ibf_dump_pos(dump);
+ obj_header.type = TYPE(obj);
+
+ if (SPECIAL_CONST_P(obj)) {
+ if (RB_TYPE_P(obj, T_SYMBOL) ||
+ RB_TYPE_P(obj, T_FLOAT)) {
+ obj_header.internal = FALSE;
+ goto dump_object;
+ }
+ obj_header.special_const = TRUE;
+ obj_header.frozen = TRUE;
+ obj_header.internal = TRUE;
+ IBF_WV(obj_header);
+ IBF_WV(obj);
+ }
+ else {
+ obj_header.internal = (RBASIC_CLASS(obj) == 0) ? TRUE : FALSE;
+ dump_object:
+ obj_header.special_const = FALSE;
+ obj_header.frozen = FL_TEST(obj, FL_FREEZE) ? TRUE : FALSE;
+ IBF_WV(obj_header);
+ (*dump_object_functions[obj_header.type])(dump, obj);
+ }
+
+ return current_offset;
+}
+
+typedef VALUE (*ibf_load_object_function)(const struct ibf_load *load, const struct ibf_object_header *header, ibf_offset_t);
+static ibf_load_object_function load_object_functions[RUBY_T_MASK+1] = {
+ ibf_load_object_unsupported, /* T_NONE */
+ ibf_load_object_unsupported, /* T_OBJECT */
+ ibf_load_object_class, /* T_CLASS */
+ ibf_load_object_unsupported, /* T_MODULE */
+ ibf_load_object_float, /* T_FLOAT */
+ ibf_load_object_string, /* T_STRING */
+ ibf_load_object_regexp, /* T_REGEXP */
+ ibf_load_object_array, /* T_ARRAY */
+ ibf_load_object_hash, /* T_HASH */
+ ibf_load_object_struct, /* T_STRUCT */
+ ibf_load_object_bignum, /* T_BIGNUM */
+ ibf_load_object_unsupported, /* T_FILE */
+ ibf_load_object_data, /* T_DATA */
+ ibf_load_object_unsupported, /* T_MATCH */
+ ibf_load_object_complex_rational, /* T_COMPLEX */
+ ibf_load_object_complex_rational, /* T_RATIONAL */
+ ibf_load_object_unsupported, /* 0x10 */
+ ibf_load_object_unsupported, /* T_NIL */
+ ibf_load_object_unsupported, /* T_TRUE */
+ ibf_load_object_unsupported, /* T_FALSE */
+ ibf_load_object_symbol,
+ ibf_load_object_unsupported, /* T_FIXNUM */
+ ibf_load_object_unsupported, /* T_UNDEF */
+ ibf_load_object_unsupported, /* 0x17 */
+ ibf_load_object_unsupported, /* 0x18 */
+ ibf_load_object_unsupported, /* 0x19 */
+ ibf_load_object_unsupported, /* T_IMEMO 0x1a */
+ ibf_load_object_unsupported, /* T_NODE 0x1b */
+ ibf_load_object_unsupported, /* T_ICLASS 0x1c */
+ ibf_load_object_unsupported, /* T_ZOMBIE 0x1d */
+ ibf_load_object_unsupported, /* 0x1e */
+ ibf_load_object_unsupported /* 0x1f */
+};
+
+static VALUE
+ibf_load_object(const struct ibf_load *load, VALUE object_index)
+{
+ if (object_index == 0) {
+ return Qnil;
+ }
+ else if (object_index >= load->header->object_list_size) {
+ rb_raise(rb_eIndexError, "object index out of range: %"PRIdVALUE, object_index);
+ }
+ else {
+ VALUE obj = rb_ary_entry(load->obj_list, (long)object_index);
+ if (obj == Qnil) { /* TODO: avoid multiple Qnil load */
+ ibf_offset_t *offsets = (ibf_offset_t *)(load->header->object_list_offset + load->buff);
+ ibf_offset_t offset = offsets[object_index];
+ const struct ibf_object_header *header = IBF_OBJHEADER(offset);
+
+ if (header->special_const) {
+ VALUE *vp = IBF_OBJBODY(VALUE, offset);
+ obj = *vp;
+ }
+ else {
+ obj = (*load_object_functions[header->type])(load, header, offset);
+ }
+
+ rb_ary_store(load->obj_list, (long)object_index, obj);
+ }
+ iseq_add_mark_object(load->iseq, obj);
+ return obj;
+ }
+}
+
+static void
+ibf_dump_object_list(struct ibf_dump *dump, struct ibf_header *header)
+{
+ VALUE list = rb_ary_tmp_new(RARRAY_LEN(dump->obj_list));
+ int i, size;
+
+ for (i=0; i<RARRAY_LEN(dump->obj_list); i++) {
+ VALUE obj = RARRAY_AREF(dump->obj_list, i);
+ ibf_offset_t offset = lbf_dump_object_object(dump, obj);
+ rb_ary_push(list, UINT2NUM(offset));
+ }
+ size = i;
+ header->object_list_offset = ibf_dump_pos(dump);
+
+ for (i=0; i<size; i++) {
+ ibf_offset_t offset = NUM2UINT(RARRAY_AREF(list, i));
+ IBF_WV(offset);
+ }
+
+ header->object_list_size = size;
+}
+
+static void
+ibf_dump_mark(void *ptr)
+{
+ struct ibf_dump *dump = (struct ibf_dump *)ptr;
+ rb_gc_mark(dump->str);
+ rb_gc_mark(dump->iseq_list);
+ rb_gc_mark(dump->obj_list);
+}
+
+static void
+ibf_dump_free(void *ptr)
+{
+ struct ibf_dump *dump = (struct ibf_dump *)ptr;
+ if (dump->iseq_table) {
+ st_free_table(dump->iseq_table);
+ dump->iseq_table = 0;
+ }
+ if (dump->id_table) {
+ st_free_table(dump->id_table);
+ dump->id_table = 0;
+ }
+ ruby_xfree(dump);
+}
+
+static size_t
+ibf_dump_memsize(const void *ptr)
+{
+ struct ibf_dump *dump = (struct ibf_dump *)ptr;
+ size_t size = sizeof(*dump);
+ if (dump->iseq_table) size += st_memsize(dump->iseq_table);
+ if (dump->id_table) size += st_memsize(dump->id_table);
+ return size;
+}
+
+static const rb_data_type_t ibf_dump_type = {
+ "ibf_dump",
+ {ibf_dump_mark, ibf_dump_free, ibf_dump_memsize,},
+ 0, 0, RUBY_TYPED_WB_PROTECTED | RUBY_TYPED_FREE_IMMEDIATELY
+};
+
+static void
+ibf_dump_setup(struct ibf_dump *dump, VALUE dumper_obj)
+{
+ RB_OBJ_WRITE(dumper_obj, &dump->str, rb_str_new(0, 0));
+ RB_OBJ_WRITE(dumper_obj, &dump->iseq_list, rb_ary_tmp_new(0));
+ RB_OBJ_WRITE(dumper_obj, &dump->obj_list, rb_ary_tmp_new(1));
+ rb_ary_push(dump->obj_list, Qnil); /* 0th is nil */
+ dump->iseq_table = st_init_numtable(); /* need free */
+ dump->id_table = st_init_numtable(); /* need free */
+
+ ibf_table_index(dump->id_table, 0); /* id_index:0 is 0 */
+}
+
+VALUE
+iseq_ibf_dump(const rb_iseq_t *iseq, VALUE opt)
+{
+ struct ibf_dump *dump;
+ struct ibf_header header = {{0}};
+ VALUE dump_obj;
+ VALUE str;
+
+ if (iseq->body->parent_iseq != NULL ||
+ iseq->body->local_iseq != iseq) {
+ rb_raise(rb_eRuntimeError, "should be top of iseq");
+ }
+ if (RTEST(ISEQ_COVERAGE(iseq))) {
+ rb_raise(rb_eRuntimeError, "should not compile with coverage");
+ }
+
+ dump_obj = TypedData_Make_Struct(0, struct ibf_dump, &ibf_dump_type, dump);
+ ibf_dump_setup(dump, dump_obj);
+
+ ibf_dump_write(dump, &header, sizeof(header));
+ ibf_dump_write(dump, RUBY_PLATFORM, strlen(RUBY_PLATFORM) + 1);
+ ibf_dump_iseq(dump, iseq);
+
+ header.magic[0] = 'Y'; /* YARB */
+ header.magic[1] = 'A';
+ header.magic[2] = 'R';
+ header.magic[3] = 'B';
+ header.major_version = ISEQ_MAJOR_VERSION;
+ header.minor_version = ISEQ_MINOR_VERSION;
+ ibf_dump_iseq_list(dump, &header);
+ ibf_dump_id_list(dump, &header);
+ ibf_dump_object_list(dump, &header);
+ header.size = ibf_dump_pos(dump);
+
+ if (RTEST(opt)) {
+ VALUE opt_str = opt;
+ const char *ptr = StringValuePtr(opt_str);
+ header.extra_size = RSTRING_LENINT(opt_str);
+ ibf_dump_write(dump, ptr, header.extra_size);
+ }
+ else {
+ header.extra_size = 0;
+ }
+
+ ibf_dump_overwrite(dump, &header, sizeof(header), 0);
+
+ str = dump->str;
+ ibf_dump_free(dump);
+ DATA_PTR(dump_obj) = NULL;
+ RB_GC_GUARD(dump_obj);
+ return str;
+}
+
+static const ibf_offset_t *
+ibf_iseq_list(const struct ibf_load *load)
+{
+ return (ibf_offset_t *)(load->buff + load->header->iseq_list_offset);
+}
+
+void
+ibf_load_iseq_complete(rb_iseq_t *iseq)
+{
+ struct ibf_load *load = RTYPEDDATA_DATA(iseq->aux.loader.obj);
+ rb_iseq_t *prev_src_iseq = load->iseq;
+ load->iseq = iseq;
+ ibf_load_iseq_each(load, iseq, ibf_iseq_list(load)[iseq->aux.loader.index]);
+ ISEQ_COMPILE_DATA(iseq) = NULL;
+ FL_UNSET(iseq, ISEQ_NOT_LOADED_YET);
+ load->iseq = prev_src_iseq;
+}
+
+#if USE_LAZY_LOAD
+const rb_iseq_t *
+rb_iseq_complete(const rb_iseq_t *iseq)
+{
+ ibf_load_iseq_complete((rb_iseq_t *)iseq);
+ return iseq;
+}
+#endif
+
+static rb_iseq_t *
+ibf_load_iseq(const struct ibf_load *load, const rb_iseq_t *index_iseq)
+{
+ int iseq_index = (int)(VALUE)index_iseq;
+
+ if (iseq_index == -1) {
+ return NULL;
+ }
+ else {
+ VALUE iseqv = rb_ary_entry(load->iseq_list, iseq_index);
+
+ if (iseqv != Qnil) {
+ return (rb_iseq_t *)iseqv;
+ }
+ else {
+ rb_iseq_t *iseq = iseq_imemo_alloc();
+ FL_SET(iseq, ISEQ_NOT_LOADED_YET);
+ iseq->aux.loader.obj = load->loader_obj;
+ iseq->aux.loader.index = iseq_index;
+ rb_ary_store(load->iseq_list, iseq_index, (VALUE)iseq);
+
+#if !USE_LAZY_LOAD
+ ibf_load_iseq_complete(iseq);
+#endif /* !USE_LAZY_LOAD */
+
+ if (load->iseq) {
+ iseq_add_mark_object(load->iseq, (VALUE)iseq);
+ }
+ return iseq;
+ }
+ }
+}
+
+static void
+ibf_load_setup(struct ibf_load *load, VALUE loader_obj, VALUE str)
+{
+ rb_check_safe_obj(str);
+
+ if (RSTRING_LENINT(str) < (int)sizeof(struct ibf_header)) {
+ rb_raise(rb_eRuntimeError, "broken binary format");
+ }
+ RB_OBJ_WRITE(loader_obj, &load->str, str);
+ load->loader_obj = loader_obj;
+ load->buff = StringValuePtr(str);
+ load->header = (struct ibf_header *)load->buff;
+ RB_OBJ_WRITE(loader_obj, &load->iseq_list, rb_ary_tmp_new(0));
+ RB_OBJ_WRITE(loader_obj, &load->obj_list, rb_ary_tmp_new(0));
+ load->id_list = ZALLOC_N(ID, load->header->id_list_size);
+ load->iseq = NULL;
+
+ if (RSTRING_LENINT(str) < (int)load->header->size) {
+ rb_raise(rb_eRuntimeError, "broken binary format");
+ }
+ if (strncmp(load->header->magic, "YARB", 4) != 0) {
+ rb_raise(rb_eRuntimeError, "unknown binary format");
+ }
+ if (load->header->major_version != ISEQ_MAJOR_VERSION ||
+ load->header->minor_version != ISEQ_MINOR_VERSION) {
+ rb_raise(rb_eRuntimeError, "unmatched version file (%u.%u for %u.%u)",
+ load->header->major_version, load->header->minor_version, ISEQ_MAJOR_VERSION, ISEQ_MINOR_VERSION);
+ }
+ if (strcmp(load->buff + sizeof(struct ibf_header), RUBY_PLATFORM) != 0) {
+ rb_raise(rb_eRuntimeError, "unmatched platform");
+ }
+}
+
+static void
+ibf_loader_mark(void *ptr)
+{
+ if (ptr) {
+ struct ibf_load *load = (struct ibf_load *)ptr;
+ rb_gc_mark(load->str);
+ rb_gc_mark(load->iseq_list);
+ rb_gc_mark(load->obj_list);
+ }
+}
+
+static void
+ibf_loader_free(void *ptr)
+{
+ if (ptr) {
+ struct ibf_load *load = (struct ibf_load *)ptr;
+ ruby_xfree(load->id_list);
+ ruby_xfree(load);
+ }
+}
+
+static size_t
+ibf_loader_memsize(const void *ptr)
+{
+ struct ibf_load *load = (struct ibf_load *)ptr;
+ return sizeof(struct ibf_load) + load->header->id_list_size * sizeof(ID);
+}
+
+static const rb_data_type_t ibf_load_type = {
+ "ibf_loader",
+ {ibf_loader_mark, ibf_loader_free, ibf_loader_memsize,},
+ 0, 0, RUBY_TYPED_WB_PROTECTED | RUBY_TYPED_FREE_IMMEDIATELY
+};
+
+const rb_iseq_t *
+iseq_ibf_load(VALUE str)
+{
+ struct ibf_load *load;
+ const rb_iseq_t *iseq;
+ VALUE loader_obj = TypedData_Make_Struct(0, struct ibf_load, &ibf_load_type, load);
+
+ ibf_load_setup(load, loader_obj, str);
+ iseq = ibf_load_iseq(load, 0);
+
+ RB_GC_GUARD(loader_obj);
+ return iseq;
+}
+
+VALUE
+iseq_ibf_load_extra_data(VALUE str)
+{
+ struct ibf_load *load;
+ VALUE loader_obj = TypedData_Make_Struct(0, struct ibf_load, &ibf_load_type, load);
+ VALUE extra_str;
+
+ ibf_load_setup(load, loader_obj, str);
+ extra_str = rb_str_new(load->buff + load->header->size, load->header->extra_size);
+ RB_GC_GUARD(loader_obj);
+ return extra_str;
+}
+
diff --git a/complex.c b/complex.c
index 3e9d63117a..5199dcc7c2 100644
--- a/complex.c
+++ b/complex.c
@@ -5,9 +5,13 @@
which is written in ruby.
*/
-#include "ruby.h"
-#include "internal.h"
+#include "ruby/config.h"
+#if defined _MSC_VER
+/* Microsoft Visual C does not define M_PI and others by default */
+# define _USE_MATH_DEFINES 1
+#endif
#include <math.h>
+#include "internal.h"
#define NDEBUG
#include <assert.h>
@@ -15,13 +19,21 @@
#define ZERO INT2FIX(0)
#define ONE INT2FIX(1)
#define TWO INT2FIX(2)
+#define RFLOAT_0 DBL2NUM(0)
+#if defined(HAVE_SIGNBIT) && defined(__GNUC__) && defined(__sun) && \
+ !defined(signbit)
+extern int signbit(double);
+#endif
VALUE rb_cComplex;
-static ID id_abs, id_abs2, id_arg, id_cmp, id_conj, id_convert,
- id_denominator, id_divmod, id_eqeq_p, id_expt, id_fdiv, id_floor,
- id_idiv, id_imag, id_inspect, id_negate, id_numerator, id_quo,
- id_real, id_real_p, id_to_f, id_to_i, id_to_r, id_to_s,
+static VALUE nucomp_abs(VALUE self);
+static VALUE nucomp_arg(VALUE self);
+
+static ID id_abs, id_arg, id_convert,
+ id_denominator, id_eqeq_p, id_expt, id_fdiv,
+ id_negate, id_numerator, id_quo,
+ id_real_p, id_to_f, id_to_i, id_to_r,
id_i_real, id_i_imag;
#define f_boolcast(x) ((x) ? Qtrue : Qfalse)
@@ -76,20 +88,6 @@ f_add(VALUE x, VALUE y)
}
inline static VALUE
-f_cmp(VALUE x, VALUE y)
-{
- if (FIXNUM_P(x) && FIXNUM_P(y)) {
- long c = FIX2LONG(x) - FIX2LONG(y);
- if (c > 0)
- c = 1;
- else if (c < 0)
- c = -1;
- return INT2FIX(c);
- }
- return rb_funcall(x, id_cmp, 1, y);
-}
-
-inline static VALUE
f_div(VALUE x, VALUE y)
{
if (FIXNUM_P(y) && FIX2LONG(y) == 1)
@@ -106,16 +104,6 @@ f_gt_p(VALUE x, VALUE y)
}
inline static VALUE
-f_lt_p(VALUE x, VALUE y)
-{
- if (FIXNUM_P(x) && FIXNUM_P(y))
- return f_boolcast(FIX2LONG(x) < FIX2LONG(y));
- return rb_funcall(x, '<', 1, y);
-}
-
-binop(mod, '%')
-
-inline static VALUE
f_mul(VALUE x, VALUE y)
{
#ifndef PRESERVE_SIGNEDZERO
@@ -152,16 +140,10 @@ f_sub(VALUE x, VALUE y)
}
fun1(abs)
-fun1(abs2)
fun1(arg)
-fun1(conj)
fun1(denominator)
-fun1(floor)
-fun1(imag)
-fun1(inspect)
fun1(negate)
fun1(numerator)
-fun1(real)
fun1(real_p)
inline static VALUE
@@ -180,9 +162,6 @@ f_to_f(VALUE x)
}
fun1(to_r)
-fun1(to_s)
-
-fun2(divmod)
inline static VALUE
f_eqeq_p(VALUE x, VALUE y)
@@ -194,7 +173,6 @@ f_eqeq_p(VALUE x, VALUE y)
fun2(expt)
fun2(fdiv)
-fun2(idiv)
fun2(quo)
inline static VALUE
@@ -258,12 +236,6 @@ k_numeric_p(VALUE x)
}
inline static VALUE
-k_integer_p(VALUE x)
-{
- return f_kind_of_p(x, rb_cInteger);
-}
-
-inline static VALUE
k_fixnum_p(VALUE x)
{
return f_kind_of_p(x, rb_cFixnum);
@@ -294,10 +266,8 @@ k_complex_p(VALUE x)
}
#define k_exact_p(x) (!k_float_p(x))
-#define k_inexact_p(x) k_float_p(x)
#define k_exact_zero_p(x) (k_exact_p(x) && f_zero_p(x))
-#define k_exact_one_p(x) (k_exact_p(x) && f_one_p(x))
#define get_dat1(x) \
struct RComplex *dat;\
@@ -376,6 +346,8 @@ nucomp_canonicalization(int f)
{
canonicalization = f;
}
+#else
+#define canonicalization 0
#endif
inline static void
@@ -457,13 +429,6 @@ nucomp_s_new(int argc, VALUE *argv, VALUE klass)
}
inline static VALUE
-f_complex_new1(VALUE klass, VALUE x)
-{
- assert(!k_complex_p(x));
- return nucomp_s_canonicalize_internal(klass, x, ZERO);
-}
-
-inline static VALUE
f_complex_new2(VALUE klass, VALUE x, VALUE y)
{
assert(!k_complex_p(x));
@@ -478,6 +443,8 @@ f_complex_new2(VALUE klass, VALUE x, VALUE y)
*
* Complex(1, 2) #=> (1+2i)
* Complex('1+2i') #=> (1+2i)
+ * Complex(nil) #=> TypeError
+ * Complex(1, nil) #=> TypeError
*
* Syntax of string form:
*
@@ -537,7 +504,6 @@ m_log_bang(VALUE x)
imp1(sin)
imp1(sinh)
-imp1(sqrt)
static VALUE
m_cos(VALUE x)
@@ -570,6 +536,8 @@ m_sin(VALUE x)
}
#if 0
+imp1(sqrt)
+
static VALUE
m_sqrt(VALUE x)
{
@@ -593,11 +561,44 @@ m_sqrt(VALUE x)
}
#endif
-inline static VALUE
+static VALUE
f_complex_polar(VALUE klass, VALUE x, VALUE y)
{
assert(!k_complex_p(x));
assert(!k_complex_p(y));
+ if (f_zero_p(x) || f_zero_p(y)) {
+ if (canonicalization) return x;
+ return nucomp_s_new_internal(klass, x, RFLOAT_0);
+ }
+ if (RB_FLOAT_TYPE_P(y)) {
+ const double arg = RFLOAT_VALUE(y);
+ if (arg == M_PI) {
+ x = f_negate(x);
+ if (canonicalization) return x;
+ y = RFLOAT_0;
+ }
+ else if (arg == M_PI_2) {
+ y = x;
+ x = RFLOAT_0;
+ }
+ else if (arg == M_PI_2+M_PI) {
+ y = f_negate(x);
+ x = RFLOAT_0;
+ }
+ else if (RB_FLOAT_TYPE_P(x)) {
+ const double abs = RFLOAT_VALUE(x);
+ const double real = abs * cos(arg), imag = abs * sin(arg);
+ x = DBL2NUM(real);
+ if (canonicalization && imag == 0.0) return x;
+ y = DBL2NUM(imag);
+ }
+ else {
+ y = f_mul(x, DBL2NUM(sin(arg)));
+ x = f_mul(x, DBL2NUM(cos(arg)));
+ if (canonicalization && f_zero_p(y)) return x;
+ }
+ return nucomp_s_new_internal(klass, x, y);
+ }
return nucomp_s_canonicalize_internal(klass,
f_mul(x, m_cos(y)),
f_mul(x, m_sin(y)));
@@ -622,8 +623,8 @@ nucomp_s_polar(int argc, VALUE *argv, VALUE klass)
switch (rb_scan_args(argc, argv, "11", &abs, &arg)) {
case 1:
nucomp_real_check(abs);
- arg = ZERO;
- break;
+ if (canonicalization) return abs;
+ return nucomp_s_new_internal(klass, abs, ZERO);
default:
nucomp_real_check(abs);
nucomp_real_check(arg);
@@ -716,11 +717,12 @@ f_addsub(VALUE self, VALUE other,
* Complex(9, 8) + 4 #=> (13+8i)
* Complex(20, 9) + 9.8 #=> (29.8+9i)
*/
-static VALUE
-nucomp_add(VALUE self, VALUE other)
+VALUE
+rb_nucomp_add(VALUE self, VALUE other)
{
return f_addsub(self, other, f_add, '+');
}
+#define nucomp_add rb_nucomp_add
/*
* call-seq:
@@ -740,6 +742,19 @@ nucomp_sub(VALUE self, VALUE other)
return f_addsub(self, other, f_sub, '-');
}
+static VALUE
+safe_mul(VALUE a, VALUE b, int az, int bz)
+{
+ double v;
+ if (!az && bz && RB_FLOAT_TYPE_P(a) && (v = RFLOAT_VALUE(a), !isnan(v))) {
+ a = signbit(v) ? DBL2NUM(-1.0) : DBL2NUM(1.0);
+ }
+ if (!bz && az && RB_FLOAT_TYPE_P(b) && (v = RFLOAT_VALUE(b), !isnan(v))) {
+ b = signbit(v) ? DBL2NUM(-1.0) : DBL2NUM(1.0);
+ }
+ return f_mul(a, b);
+}
+
/*
* call-seq:
* cmp * numeric -> complex
@@ -752,18 +767,24 @@ nucomp_sub(VALUE self, VALUE other)
* Complex(9, 8) * 4 #=> (36+32i)
* Complex(20, 9) * 9.8 #=> (196.0+88.2i)
*/
-static VALUE
-nucomp_mul(VALUE self, VALUE other)
+VALUE
+rb_nucomp_mul(VALUE self, VALUE other)
{
if (k_complex_p(other)) {
VALUE real, imag;
+ VALUE areal, aimag, breal, bimag;
+ int arzero, aizero, brzero, bizero;
get_dat2(self, other);
- real = f_sub(f_mul(adat->real, bdat->real),
- f_mul(adat->imag, bdat->imag));
- imag = f_add(f_mul(adat->real, bdat->imag),
- f_mul(adat->imag, bdat->real));
+ arzero = !!f_zero_p(areal = adat->real);
+ aizero = !!f_zero_p(aimag = adat->imag);
+ brzero = !!f_zero_p(breal = bdat->real);
+ bizero = !!f_zero_p(bimag = bdat->imag);
+ real = f_sub(safe_mul(areal, breal, arzero, brzero),
+ safe_mul(aimag, bimag, aizero, bizero));
+ imag = f_add(safe_mul(areal, bimag, arzero, bizero),
+ safe_mul(aimag, breal, aizero, brzero));
return f_complex_new2(CLASS_OF(self), real, imag);
}
@@ -776,6 +797,7 @@ nucomp_mul(VALUE self, VALUE other)
}
return rb_num_coerce_bin(self, other, '*');
}
+#define nucomp_mul rb_nucomp_mul
inline static VALUE
f_divide(VALUE self, VALUE other,
@@ -998,8 +1020,8 @@ nucomp_coerce(VALUE self, VALUE other)
if (RB_TYPE_P(other, T_COMPLEX))
return rb_assoc_new(other, self);
- rb_raise(rb_eTypeError, "%s can't be coerced into %s",
- rb_obj_classname(other), rb_obj_classname(self));
+ rb_raise(rb_eTypeError, "%"PRIsVALUE" can't be coerced into %"PRIsVALUE,
+ rb_obj_class(other), rb_obj_class(self));
return Qnil;
}
@@ -1233,10 +1255,6 @@ nucomp_eql_p(VALUE self, VALUE other)
inline static VALUE
f_signbit(VALUE x)
{
-#if defined(HAVE_SIGNBIT) && defined(__GNUC__) && defined(__sun) && \
- !defined(signbit)
- extern int signbit(double);
-#endif
if (RB_TYPE_P(x, T_FLOAT)) {
double f = RFLOAT_VALUE(x);
return f_boolcast(!isnan(f) && signbit(f));
@@ -1285,7 +1303,7 @@ f_format(VALUE self, VALUE (*func)(VALUE))
static VALUE
nucomp_to_s(VALUE self)
{
- return f_format(self, f_to_s);
+ return f_format(self, rb_String);
}
/*
@@ -1306,7 +1324,7 @@ nucomp_inspect(VALUE self)
VALUE s;
s = rb_usascii_str_new2("(");
- rb_str_concat(s, f_format(self, f_inspect));
+ rb_str_concat(s, f_format(self, rb_inspect));
rb_str_cat2(s, ")");
return s;
@@ -1386,6 +1404,20 @@ rb_Complex(VALUE x, VALUE y)
return nucomp_s_convert(2, a, rb_cComplex);
}
+VALUE
+rb_complex_set_real(VALUE cmp, VALUE r)
+{
+ RCOMPLEX_SET_REAL(cmp, r);
+ return cmp;
+}
+
+VALUE
+rb_complex_set_imag(VALUE cmp, VALUE i)
+{
+ RCOMPLEX_SET_IMAG(cmp, i);
+ return cmp;
+}
+
/*
* call-seq:
* cmp.to_i -> integer
@@ -1402,10 +1434,9 @@ nucomp_to_i(VALUE self)
{
get_dat1(self);
- if (k_inexact_p(dat->imag) || f_nonzero_p(dat->imag)) {
- VALUE s = f_to_s(self);
- rb_raise(rb_eRangeError, "can't convert %s into Integer",
- StringValuePtr(s));
+ if (!k_exact_zero_p(dat->imag)) {
+ rb_raise(rb_eRangeError, "can't convert %"PRIsVALUE" into Integer",
+ self);
}
return f_to_i(dat->real);
}
@@ -1426,10 +1457,9 @@ nucomp_to_f(VALUE self)
{
get_dat1(self);
- if (k_inexact_p(dat->imag) || f_nonzero_p(dat->imag)) {
- VALUE s = f_to_s(self);
- rb_raise(rb_eRangeError, "can't convert %s into Float",
- StringValuePtr(s));
+ if (!k_exact_zero_p(dat->imag)) {
+ rb_raise(rb_eRangeError, "can't convert %"PRIsVALUE" into Float",
+ self);
}
return f_to_f(dat->real);
}
@@ -1452,10 +1482,9 @@ nucomp_to_r(VALUE self)
{
get_dat1(self);
- if (k_inexact_p(dat->imag) || f_nonzero_p(dat->imag)) {
- VALUE s = f_to_s(self);
- rb_raise(rb_eRangeError, "can't convert %s into Rational",
- StringValuePtr(s));
+ if (!k_exact_zero_p(dat->imag)) {
+ rb_raise(rb_eRangeError, "can't convert %"PRIsVALUE" into Rational",
+ self);
}
return f_to_r(dat->real);
}
@@ -1480,10 +1509,9 @@ nucomp_rationalize(int argc, VALUE *argv, VALUE self)
rb_scan_args(argc, argv, "01", NULL);
- if (k_inexact_p(dat->imag) || f_nonzero_p(dat->imag)) {
- VALUE s = f_to_s(self);
- rb_raise(rb_eRangeError, "can't convert %s into Rational",
- StringValuePtr(s));
+ if (!k_exact_zero_p(dat->imag)) {
+ rb_raise(rb_eRangeError, "can't convert %"PRIsVALUE" into Rational",
+ self);
}
return rb_funcall2(dat->real, rb_intern("rationalize"), argc, argv);
}
@@ -1668,8 +1696,6 @@ isimagunit(int c)
c == 'j' || c == 'J');
}
-VALUE rb_cstr_to_rat(const char *, int);
-
static VALUE
str2num(char *s)
{
@@ -1774,19 +1800,26 @@ parse_comp(const char *s, int strict,
VALUE *num)
{
char *buf, *b;
+ VALUE tmp;
+ int ret = 1;
- buf = ALLOCA_N(char, strlen(s) + 1);
+ buf = ALLOCV_N(char, tmp, strlen(s) + 1);
b = buf;
skip_ws(&s);
- if (!read_comp(&s, strict, num, &b))
- return 0;
- skip_ws(&s);
+ if (!read_comp(&s, strict, num, &b)) {
+ ret = 0;
+ }
+ else {
+ skip_ws(&s);
- if (strict)
- if (*s != '\0')
- return 0;
- return 1;
+ if (strict)
+ if (*s != '\0')
+ ret = 0;
+ }
+ ALLOCV_END(tmp);
+
+ return ret;
}
static VALUE
@@ -1812,9 +1845,8 @@ string_to_c_strict(VALUE self)
s = (char *)"";
if (!parse_comp(s, 1, &num)) {
- VALUE ins = f_inspect(self);
- rb_raise(rb_eArgError, "invalid value for convert(): %s",
- StringValuePtr(ins));
+ rb_raise(rb_eArgError, "invalid value for convert(): %+"PRIsVALUE,
+ self);
}
return num;
@@ -2055,9 +2087,10 @@ float_arg(VALUE self)
* and i is imaginary unit. Real a equals complex a+0i
* mathematically.
*
- * In ruby, you can create complex object with Complex, Complex::rect,
- * Complex::polar or to_c method.
+ * Complex object can be created as literal, and also by using
+ * Kernel#Complex, Complex::rect, Complex::polar or to_c method.
*
+ * 2+1i #=> (2+1i)
* Complex(1) #=> (1+0i)
* Complex(2, 3) #=> (2+3i)
* Complex.polar(2, 3) #=> (-1.9799849932008908+0.2822400161197344i)
@@ -2091,29 +2124,19 @@ Init_Complex(void)
assert(fprintf(stderr, "assert() is now active\n"));
id_abs = rb_intern("abs");
- id_abs2 = rb_intern("abs2");
id_arg = rb_intern("arg");
- id_cmp = rb_intern("<=>");
- id_conj = rb_intern("conj");
id_convert = rb_intern("convert");
id_denominator = rb_intern("denominator");
- id_divmod = rb_intern("divmod");
id_eqeq_p = rb_intern("==");
id_expt = rb_intern("**");
id_fdiv = rb_intern("fdiv");
- id_floor = rb_intern("floor");
- id_idiv = rb_intern("div");
- id_imag = rb_intern("imag");
- id_inspect = rb_intern("inspect");
id_negate = rb_intern("-@");
id_numerator = rb_intern("numerator");
id_quo = rb_intern("quo");
- id_real = rb_intern("real");
id_real_p = rb_intern("real?");
id_to_f = rb_intern("to_f");
id_to_i = rb_intern("to_i");
id_to_r = rb_intern("to_r");
- id_to_s = rb_intern("to_s");
id_i_real = rb_intern("@real");
id_i_imag = rb_intern("@image"); /* @image, not @imag */
@@ -2153,10 +2176,6 @@ Init_Complex(void)
rb_undef_method(rb_cComplex, "truncate");
rb_undef_method(rb_cComplex, "i");
-#if 0 /* NUBY */
- rb_undef_method(rb_cComplex, "//");
-#endif
-
rb_define_method(rb_cComplex, "real", nucomp_real, 0);
rb_define_method(rb_cComplex, "imaginary", nucomp_imag, 0);
rb_define_method(rb_cComplex, "imag", nucomp_imag, 0);
@@ -2204,8 +2223,11 @@ Init_Complex(void)
rb_define_method(rb_cComplex, "to_s", nucomp_to_s, 0);
rb_define_method(rb_cComplex, "inspect", nucomp_inspect, 0);
+ rb_undef_method(rb_cComplex, "positive?");
+ rb_undef_method(rb_cComplex, "negative?");
+
rb_define_private_method(rb_cComplex, "marshal_dump", nucomp_marshal_dump, 0);
- compat = rb_define_class_under(rb_cComplex, "compatible", rb_cObject);
+ compat = rb_define_class_under(rb_cComplex, "compatible", rb_cObject); /* :nodoc: */
rb_define_private_method(compat, "marshal_load", nucomp_marshal_load, 1);
rb_marshal_define_compat(rb_cComplex, compat, nucomp_dumper, nucomp_loader);
@@ -2247,6 +2269,8 @@ Init_Complex(void)
*/
rb_define_const(rb_cComplex, "I",
f_complex_new_bang2(rb_cComplex, ZERO, ONE));
+
+ rb_provide("complex.so"); /* for backward compatibility */
}
/*
diff --git a/configure.in b/configure.in
index 1a001e6253..2cd0f27b64 100644
--- a/configure.in
+++ b/configure.in
@@ -11,6 +11,10 @@ AC_DEFUN([RUBY_PREREQ_AC],
AC_DISABLE_OPTION_CHECKING
+AC_ARG_VAR([cflags], [additional CFLAGS])
+AC_ARG_VAR([cppflags], [additional CPPFLAGS])
+AC_ARG_VAR([cxxflags], [additional CXXFLAGS])
+
AC_DEFUN([RUBY_RM_RECURSIVE], [
m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]), [2.70]), [-1], [
# suppress error messages, rm: cannot remove 'conftest.dSYM', from
@@ -39,21 +43,20 @@ AC_ARG_WITH(baseruby,
AS_CASE(["$withval"],[*ruby*],[BASERUBY=$withval],[AC_MSG_ERROR(need ruby)])
],
[
- BASERUBY="ruby"
+ AC_PATH_PROG([BASERUBY], [ruby], [false])
])
-if test "`RUBYOPT=- $BASERUBY -e 'p 42' 2>/dev/null`" = 42; then
- if test "`RUBYOPT=- $BASERUBY --disable=gems -e 'p 42' 2>/dev/null`" = 42; then
+if test "`RUBYOPT=- $BASERUBY -e 'print 42' 2>/dev/null`" = 42; then
+ if test "`RUBYOPT=- $BASERUBY --disable=gems -e 'print 42' 2>/dev/null`" = 42; then
BASERUBY="$BASERUBY --disable=gems"
fi
+ $BASERUBY -C "$srcdir/tool" downloader.rb -e gnu config.guess config.sub
+ HAVE_BASERUBY=yes
else
BASERUBY="echo executable host ruby is required. use --with-baseruby option.; false"
+ HAVE_BASERUBY=no
fi
AC_SUBST(BASERUBY)
-
-for conf in config.guess config.sub; do
- test -f "$srcdir/tool/$conf" && continue
- $BASERUBY -C "$srcdir/tool" get-config_files $conf
-done
+AC_SUBST(HAVE_BASERUBY)
AC_DEFUN([RUBY_MINGW32],
[AS_CASE(["$host_os"],
@@ -99,8 +102,15 @@ AC_DEFUN([RUBY_NACL],
[no], [nacl_cv_build_variant=glibc],
[yes], [nacl_cv_build_variant=newlib])])
- AS_CASE(["$build_cpu"],
- [x86_64|i?86], [nacl_cv_cpu_nick=x86], [nacl_cv_cpu_nick=$build_cpu])
+ AS_CASE(["$target_cpu"],
+ [x86_64], [nacl_cv_cpu_nick=x86
+ nacl_cv_cpu_nick2=x86_64],
+ [i?86], [nacl_cv_cpu_nick=x86
+ nacl_cv_cpu_nick2=x86_32],
+ [le32], [nacl_cv_cpu_nick=pnacl
+ nacl_cv_cpu_nick2=pnacl
+ ac_cv_exeext=.pexe],
+ [nacl_cv_cpu_nick=$target_cpu])
AS_CASE(["$build_os"],
[linux*], [nacl_cv_os_nick=linux],
[darwin*], [nacl_cv_os_nick=mac],
@@ -111,9 +121,15 @@ AC_DEFUN([RUBY_NACL],
ac_tool_prefix="$host_cpu-nacl-"
AC_MSG_CHECKING([NativeClient toolchain])
- if test -d \
+ if test x"$nacl_cv_cpu_nick" = xpnacl; then
+ NACL_TOOLCHAIN="${nacl_cv_os_nick}_pnacl"
+ ac_tool_prefix=pnacl-
+ elif test -d \
"${NACL_SDK_ROOT}/toolchain/${nacl_cv_os_nick}_${nacl_cv_cpu_nick}_${nacl_cv_build_variant}"; then
NACL_TOOLCHAIN="${nacl_cv_os_nick}_${nacl_cv_cpu_nick}_${nacl_cv_build_variant}"
+ elif test -d \
+ "${NACL_SDK_ROOT}/toolchain/${nacl_cv_os_nick}_x86_${nacl_cv_cpu_nick}/${nacl_cv_build_variant}"; then
+ NACL_TOOLCHAIN="${nacl_cv_os_nick}_x86_${nacl_cv_cpu_nick}/${nacl_cv_build_variant}"
else
AS_CASE(
["${nacl_cv_build_variant}"],
@@ -141,10 +157,32 @@ AC_DEFUN([RUBY_NACL],
if ! echo -- "${PATH}" | grep -F "${NACL_SDK_ROOT}/toolchain/${NACL_TOOLCHAIN}/bin" > /dev/null; then
PATH="${PATH}:${NACL_SDK_ROOT}/toolchain/${NACL_TOOLCHAIN}/bin"
fi
+ AC_MSG_RESULT(${NACL_SDK_ROOT}/toolchain/${NACL_TOOLCHAIN}/bin)
+
+ RUBY_APPEND_OPTIONS(XCFLAGS, '-I$(NACL_SDK_ROOT)/include')
+ if test x"${nacl_cv_cpu_nick}" = xpnacl; then
+ RUBY_APPEND_OPTIONS(XCFLAGS, '-isystem $(NACL_SDK_ROOT)/include/pnacl')
+ elif test x"${nacl_cv_build_variant}" = xnewlib; then
+ RUBY_APPEND_OPTIONS(XCFLAGS, '-isystem $(NACL_SDK_ROOT)/include/newlib')
+ fi
+
+ AC_MSG_CHECKING([nacl library path])
+ if test -d "${NACL_SDK_ROOT}/lib/${nacl_cv_build_variant}_${nacl_cv_cpu_nick2}/Release"; then
+ nacl_cv_libpath="${nacl_cv_build_variant}_${nacl_cv_cpu_nick2}"
+ elif test -d "${NACL_SDK_ROOT}/lib/${nacl_cv_cpu_nick2}/Release"; then
+ nacl_cv_libpath="${nacl_cv_cpu_nick2}"
+ else
+ AC_MSG_ERROR([not found])
+ fi
+ AC_MSG_RESULT([${nacl_cv_libpath}])
+ RUBY_APPEND_OPTIONS(XLDFLAGS, '-L$(NACL_SDK_ROOT)/'"lib/${nacl_cv_libpath}/Release")
AC_SUBST(NACL_TOOLCHAIN)
AC_SUBST(NACL_SDK_ROOT)
- AC_SUBST(NACL_SDK_VARIANT, nacl_cv_build_variant)
+ AC_SUBST(NACL_SDK_VARIANT, "${nacl_cv_build_variant}")
+ AC_SUBST(NACL_LIB_PATH, "${nacl_cv_libpath}")
+ AC_CHECK_TOOLS(CC, [clang gcc])
+ AC_CHECK_TOOLS(CXX, [clang++ g++])
])])
AC_DEFUN([RUBY_NACL_CHECK_PEPPER_TYPES],
@@ -197,8 +235,6 @@ AC_SUBST(MINOR)
AC_SUBST(TEENY)
RUBY_PROGRAM_VERSION=`sed -n 's/^#define RUBY_VERSION "\(.*\)"/\1/p' $srcdir/version.h`
AC_SUBST(RUBY_PROGRAM_VERSION)
-RUBY_RELEASE_DATE=`sed -n 's/^#define RUBY_RELEASE_DATE "\(.*\)"/\1/p' $srcdir/version.h`
-AC_SUBST(RUBY_RELEASE_DATE)
RUBY_PATCHLEVEL=`sed -n 's/^#define RUBY_PATCHLEVEL //p' $srcdir/version.h`
AC_DEFINE(CANONICALIZATION_FOR_MATHN)
dnl checks for alternative programs
@@ -223,6 +259,7 @@ AS_CASE(["$build_os"],
[xgcc-4.2|x/usr/bin/gcc-4.2], [: ${CXX=g++-4.2}],
[xgcc|x/usr/bin/gcc], [: ${CXX=g++}],
[xcc|x/usr/bin/cc], [: ${CXX=c++}],
+ [xicc], [: ${CXX=icpc}],
[xclang|x/usr/bin/clang], [: ${CXX=clang++}])
])
test -z "$CC" || ac_cv_prog_CC="$CC"
@@ -231,6 +268,9 @@ test -z "$CXX" || ac_cv_prog_CXX="$CXX"
if test "$program_prefix" = NONE; then
program_prefix=
fi
+if test "$prefix" -ef .; then
+ AC_MSG_ERROR(--prefix cannot be the current working directory.)
+fi
RUBY_BASE_NAME=`echo ruby | sed "$program_transform_name"`
RUBYW_BASE_NAME=`echo rubyw | sed "$program_transform_name"`
AC_SUBST(RUBY_BASE_NAME)
@@ -242,14 +282,21 @@ test x"$target_alias" = x &&
target_os=`echo $target_os | sed 's/linux-gnu$/linux/;s/linux-gnu/linux-/'`
ac_install_sh='' # unusable for extension libraries.
-AS_CASE($target_os,
- [darwin*], [os_version_style=major+0],
- [os_version_style=full])
AC_ARG_WITH(os-version-style,
AS_HELP_STRING([--with-os-version-style=TYPE],
[OS version number for target and target_os [[full]]]
[(full|teeny|minor+0|minor|major+0|major|none)]),
- [os_version_style=$withval])
+ [os_version_style=$withval],
+ [os_version_style=full
+ AS_CASE($target_os, [[*[0-9].*]],
+ [AS_CASE([`/usr/bin/ruby -e 'puts RUBY_PLATFORM' 2>/dev/null`],
+ [[*-*[0-9].*.0]], [os_version_style=minor+0],
+ [[*-*[0-9].*.*]], [os_version_style=full],
+ [[*-*[0-9].0] ], [os_version_style=major+0],
+ [[*-*[0-9].*] ], [os_version_style=minor],
+ [[*-*[0-9]] ], [os_version_style=major],
+ )])
+ ])
os_version_style_transform=
AS_CASE("${os_version_style}",
[full|teeny], [],
@@ -308,9 +355,11 @@ AC_MSG_RESULT([$ARCH_FLAG])
AC_DEFUN([RUBY_UNIVERSAL_ARCH], [
# RUBY_UNIVERSAL_ARCH begin
+ARCH_FLAG=`expr " $CXXFLAGS " : ['.* \(-m[0-9][0-9]*\) ']`
+test ${CXXFLAGS+set} && CXXFLAGS=`echo "$CXXFLAGS" | sed [-e 's/ *-arch *[^ ]*//g' -e 's/ *-m32//g' -e 's/ *-m64//g']`
ARCH_FLAG=`expr " $CFLAGS " : ['.* \(-m[0-9][0-9]*\) ']`
-test ${CFLAGS+set} && CFLAGS=`echo "$CFLAGS" | sed -e 's/ *-arch *[^ ]*//g' -e 's/ *-m32//g' -e 's/ *-m64//g'`
-test ${LDFLAGS+set} && LDFLAGS=`echo "$LDFLAGS" | sed -e 's/ *-arch *[^ ]*//g' -e 's/ *-m32//g' -e 's/ *-m64//g'`
+test ${CFLAGS+set} && CFLAGS=`echo "$CFLAGS" | sed [-e 's/ *-arch *[^ ]*//g' -e 's/ *-m32//g' -e 's/ *-m64//g']`
+test ${LDFLAGS+set} && LDFLAGS=`echo "$LDFLAGS" | sed [-e 's/ *-arch *[^ ]*//g' -e 's/ *-m32//g' -e 's/ *-m64//g']`
unset universal_binary universal_archnames
if test ${target_archs+set}; then
AC_MSG_CHECKING([target architectures])
@@ -388,8 +437,8 @@ else
rb_cv_target_archs=${target_archs}
fi
if test "x${ARCH_FLAG}" != x; then
- CFLAGS="$CFLAGS ${ARCH_FLAG}"
- LDFLAGS="${LDFLAGS+$LDFLAGS }${ARCH_FLAG}"
+ CFLAGS="${CFLAGS:+$CFLAGS }${ARCH_FLAG}"
+ LDFLAGS="${LDFLAGS:+$LDFLAGS }${ARCH_FLAG}"
fi
# RUBY_UNIVERSAL_ARCH end
])
@@ -423,7 +472,7 @@ fi
RUBY_NACL
AS_CASE(["$host_os:$build_os"],
[darwin*:darwin*], [
- AC_CHECK_TOOLS(CC, [gcc-4.2 clang gcc cc])
+ AC_CHECK_TOOLS(CC, [clang gcc cc])
# Following Apple deployed clang are broken
# clang version 1.0 (http://llvm.org/svn/llvm-project/cfe/tags/Apple/clang-23 exported)
# Apple clang version 2.0 (tags/Apple/clang-137) (based on LLVM 2.9svn)
@@ -453,7 +502,9 @@ if test "$GCC" = yes; then
linker_flag=-Wl,
: ${optflags=-O3}
gcc_major=`echo =__GNUC__ | $CC -E -xc - | sed '/^=/!d;s///'`
+ gcc_minor=`echo =__GNUC_MINOR__ | $CC -E -xc - | sed '/^=/!d;s///'`
test -n "$gcc_major" || gcc_major=0
+ test -n "$gcc_minor" || gcc_minor=0
# RUBY_APPEND_OPTIONS(XCFLAGS, ["-include ruby/config.h" "-include ruby/missing.h"])
else
linker_flag=
@@ -571,8 +622,10 @@ AC_DEFUN([RUBY_DTRACE_AVAILABLE],
[
echo "provider conftest{ probe fire(); };" > conftest_provider.d
if $DTRACE -h -o conftest_provider.h -s conftest_provider.d >/dev/null 2>/dev/null; then
- # DTrace is available on the system
- rb_cv_dtrace_available=yes
+ AC_TRY_COMPILE([@%:@include "conftest_provider.h"], [CONFTEST_FIRE();], [
+ # DTrace is available on the system
+ rb_cv_dtrace_available=yes
+ ], [rb_cv_dtrace_available=no])
else
# DTrace is not available while dtrace command exists
# for example FreeBSD 8 or FreeBSD 9 without DTrace build option
@@ -585,6 +638,7 @@ AC_DEFUN([RUBY_DTRACE_AVAILABLE],
AC_DEFUN([RUBY_DTRACE_POSTPROCESS],
[AC_CACHE_CHECK(whether $DTRACE needs post processing, rb_cv_prog_dtrace_g,
[
+ rb_cv_prog_dtrace_g=no
if {
cat >conftest_provider.d <<_PROBES &&
provider conftest {
@@ -592,16 +646,20 @@ AC_DEFUN([RUBY_DTRACE_POSTPROCESS],
};
_PROBES
$DTRACE -h -o conftest_provider.h -s conftest_provider.d >/dev/null 2>/dev/null &&
- cat >conftest.c <<_CONF &&
- @%:@include "conftest_provider.h"
- int main(void){ CONFTEST_FIRE(); return 0; }
-_CONF
- $CC $CFLAGS $CPPFLAGS -c -o conftest.o conftest.c &&
- $DTRACE -G -s conftest_provider.d conftest.o 2>/dev/null
+ :
}; then
- rb_cv_prog_dtrace_g=yes
- else
- rb_cv_prog_dtrace_g=no
+ AC_TRY_COMPILE([@%:@include "conftest_provider.h"], [CONFTEST_FIRE();], [
+ if {
+ cp -p conftest.${ac_objext} conftest.${ac_objext}.save &&
+ $DTRACE -G -s conftest_provider.d conftest.${ac_objext} 2>/dev/null &&
+ :
+ }; then
+ if cmp -s conftest.o conftest.${ac_objext}.save; then
+ rb_cv_prog_dtrace_g=yes
+ else
+ rb_cv_prog_dtrace_g=rebuild
+ fi
+ fi])
fi
rm -f conftest.[co] conftest_provider.[dho]
])
@@ -684,16 +742,25 @@ RUBY_WERROR_FLAG([
]
)
AC_MSG_CHECKING([whether LDFLAGS is valid])
+ {
+ mkdir tmp.$$.try_link &&
+ cd tmp.$$.try_link &&
+ cp ../confdefs.h . &&
+ echo '<?xml?><plist><dict><key>CFBundleIdentifier</key><string></string></dict></plist>' > Info.plist &&
+ :
+ } || AC_MSG_ERROR([failed to make temporary directory])
AC_TRY_LINK([], [],
[AC_MSG_RESULT(yes)],
[
+ cd .. && rm -fr tmp.$$.try_link
AC_MSG_RESULT(no)
AC_MSG_ERROR([something wrong with LDFLAGS="$LDFLAGS"])
]
)
+ cd .. && rm -fr tmp.$$.try_link
])
-AC_DEFUN(RUBY_TRY_CFLAGS, [
+AC_DEFUN([RUBY_TRY_CFLAGS], [
AC_MSG_CHECKING([whether ]$1[ is accepted as CFLAGS])
RUBY_WERROR_FLAG([
CFLAGS="[$]CFLAGS $1"
@@ -705,7 +772,7 @@ AC_DEFUN(RUBY_TRY_CFLAGS, [
])
])
-AC_DEFUN(RUBY_TRY_LDFLAGS, [
+AC_DEFUN([RUBY_TRY_LDFLAGS], [
save_LDFLAGS="$LDFLAGS"
LDFLAGS="[$]LDFLAGS $1"
AC_MSG_CHECKING([whether $1 is accepted as LDFLAGS])
@@ -720,6 +787,24 @@ AC_DEFUN(RUBY_TRY_LDFLAGS, [
save_LDFLAGS=
])
+: ${RPATHFLAG=''}
+rpathflag=''
+AS_IF([test x"${RPATHFLAG}" = x], [
+ AS_CASE(["$target_os"],
+ [hpux*], [AS_IF([test "$rb_cv_prog_gnu_ld" = no], [rpathflag='+b '])],
+ [aix*], [rpathflag='-blibpath:'],
+ [for rpathflag in -R "-rpath "; do
+ AS_CASE("$rpathflag",
+ [*" "], [AS_CASE(["${linker_flag}"],
+ [*,], [rpathflag=`echo "$rpathflag" | tr ' ' ,`])])
+ rpathflag="${linker_flag}${rpathflag}"
+ RUBY_TRY_LDFLAGS([${rpathflag}.], [], [rpathflag=])
+ AS_IF([test "x${rpathflag}" != x], [])
+ done])
+], [
+ rpathflag=`echo "$RPATHFLAG" | sed 's/%.*//'`
+])
+
AS_CASE([$RUBY_PATCHLEVEL], [-*],
[particular_werror_flags=yes], [particular_werror_flags=no])
AC_ARG_ENABLE(werror,
@@ -736,7 +821,11 @@ if test "$GCC:${warnflags+set}:no" = yes::no; then
else
extra_warning=
fi
+ if test $gcc_major -eq 5; then
+ extra_warning="$extra_warning -Wno-maybe-uninitialized"
+ fi
for wflag in -Wno-unused-parameter -Wno-parentheses -Wno-long-long \
+ -diag-disable=2259 \
-Wno-missing-field-initializers \
-Wunused-variable \
-Werror=pointer-arith \
@@ -745,6 +834,8 @@ if test "$GCC:${warnflags+set}:no" = yes::no; then
-Werror=shorten-64-to-32 \
-Werror=implicit-function-declaration \
-Werror=division-by-zero \
+ -Werror=deprecated-declarations \
+ -Wno-packed-bitfield-compat \
$extra_warning \
; do
if test "$particular_werror_flags" != yes; then
@@ -770,17 +861,37 @@ if test "$GCC:${warnflags+set}:no" = yes::no; then
rb_cv_warnflags="$warnflags"
warnflags=
fi
+RUBY_TRY_CFLAGS(-Qunused-arguments, [RUBY_APPEND_OPTIONS(rb_cv_wsuppress_flags, -Qunused-arguments)])
+
+for n in infinity nan; do
+ m=AS_TR_CPP($n)
+ AC_CACHE_CHECK([whether $m is available without C99 option], rb_cv_$n,
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_BOOL_COMPILE_TRY(AC_INCLUDES_DEFAULT([@%:@include <math.h>
+@%:@ifndef $m
+@%:@error no $m
+@%:@endif
+]), [1])], [eval rb_cv_$n=yes], [eval rb_cv_$n=no])])
+ if eval test '"$rb_cv_'$n'"' = yes; then
+ AC_DEFINE_UNQUOTED([HAVE_]$m)
+ fi
+done
+
if test "$GCC" = yes; then
- # -D_FORTIFY_SOURCE
- # When defined _FORTIFY_SOURCE, glibc enables some additional sanity
- # argument check. The performance drop is very little and Ubuntu enables
- # _FORTIFY_SOURCE=2 by default. So, let's support it for protecting us from
- # a mistake of silly C extensions.
- RUBY_TRY_CFLAGS(-D_FORTIFY_SOURCE=2, [RUBY_APPEND_OPTION(XCFLAGS, -D_FORTIFY_SOURCE=2)])
+ # NaCl's glibc build generates undefined references to __memset_chk.
+ # TODO(sbc): Remove this once NaCl's glibc is fixed.
+ AS_CASE(["$target_os"], [nacl], [], [
+ # -D_FORTIFY_SOURCE
+ # When defined _FORTIFY_SOURCE, glibc enables some additional sanity
+ # argument check. The performance drop is very little and Ubuntu enables
+ # _FORTIFY_SOURCE=2 by default. So, let's support it for protecting us from
+ # a mistake of silly C extensions.
+ RUBY_TRY_CFLAGS(-D_FORTIFY_SOURCE=2, [RUBY_APPEND_OPTION(XCFLAGS, -D_FORTIFY_SOURCE=2)])
+ ])
# -fstack-protector
AS_CASE(["$target_os"],
- [mingw*|nacl|haiku], [
+ [mingw*|nacl], [
stack_protector=no
])
if test -z "${stack_protector+set}"; then
@@ -801,21 +912,46 @@ if test "$GCC" = yes; then
# various headers. Most frequent situation is the use of //
# comments. We bypass ANSI C mode for them. Otherwise
# extension libs cannot include those headers.
+
+ # Since math.h in some mingw64 wrongly delcares frexp and modf
+ # to be pure, the variables pointed by the second arguments are
+ # considered uninitialized unexpectedly.
+ AC_CACHE_CHECK([whether frexp and modf are broken],
+ rb_cv_mingw64_broken_frexp_modf,
+ [
+ save_CFLAGS="$CFLAGS"
+ if test "$particular_werror_flags" = "yes"; then
+ CFLAGS="$CFLAGS -Werror=uninitialized"
+ else
+ CFLAGS="$CFLAGS -Werror -Wuninitialized"
+ fi
+ AC_TRY_COMPILE([@%:@include <math.h>
+ int foo(double x)
+ {
+ int exp;
+ frexp(x, &exp);
+ return exp;
+ }], [if (foo(0.0)) return 1;],
+ [rb_cv_mingw64_broken_frexp_modf=no],
+ [rb_cv_mingw64_broken_frexp_modf=yes])
+ CFLAGS="$save_CFLAGS"
+ ])
+ if test "$rb_cv_mingw64_broken_frexp_modf" = yes; then
+ AC_DEFINE(RUBY_MINGW64_BROKEN_FREXP_MODF)
+ fi
],
- [cygwin*|darwin*|netbsd*], [
+ [cygwin*|darwin*|netbsd*|nacl], [
# need lgamma_r(), finite()
],
- [haiku], [
- # Haiku R1/alpha3 uses gcc-4.4.4 which can not handle anonymous union
- # with ANSI standard flags. Anonumous union is required to compile
- # socket extension where <net/if.h> uses anonymous union.
- ],
[
# ANSI (no XCFLAGS because this is C only)
- RUBY_TRY_CFLAGS(-ansi -std=iso9899:199409, [
- RUBY_APPEND_OPTION(warnflags, -ansi -std=iso9899:199409)
- RUBY_APPEND_OPTION(strict_warnflags, -ansi -std=iso9899:199409)
- ])
+ for ansi_options in -std=iso9899:1999 "-ansi -std=iso9899:199409"; do
+ RUBY_TRY_CFLAGS(${ansi_options}, [
+ RUBY_APPEND_OPTIONS(warnflags, ${ansi_options})
+ RUBY_APPEND_OPTIONS(strict_warnflags, ${ansi_options})
+ ], [ansi_options=])
+ test "x${ansi_options}" = x || break
+ done
])
# suppress annoying -Wstrict-overflow warnings
@@ -850,28 +986,16 @@ if test "$GCC" = yes; then
AS_CASE(["$target_os"], [mingw*], [
RUBY_TRY_CFLAGS(-fno-omit-frame-pointer, [optflags="${optflags+$optflags }-fno-omit-frame-pointer"])
+ RUBY_TRY_CFLAGS(-static-libgcc, [static_libgcc=yes], [static_libgcc=no])
+ if test "$static_libgcc" = yes; then
+ RUBY_APPEND_OPTION(EXTLDFLAGS, -static-libgcc)
+ fi
])
# disable fast-math
- for oflag in -fno-fast-math; do
+ for oflag in -fno-fast-math -fp-model\ precise; do
RUBY_TRY_CFLAGS($oflag, [RUBY_APPEND_OPTION(optflags, $oflag)])
done
- AS_CASE(["$target"],
- [*-darwin*], [
- # doesn't seem necessary on Mac OS X
- ],
- [[i[4-6]86*]], [
- RUBY_TRY_CFLAGS(-msse2 -mfpmath=sse, [
- RUBY_APPEND_OPTION(XCFLAGS, -msse2 -mfpmath=sse)
- ])
- AS_CASE(["$XCFLAGS"],
- [[*-msse2*]], [
- RUBY_TRY_CFLAGS(-mstackrealign, [
- RUBY_APPEND_OPTION(XCFLAGS, -mstackrealign)
- ])
- ])
- ]
- )
fi
AC_ARG_WITH(opt-dir,
@@ -880,7 +1004,7 @@ AC_ARG_WITH(opt-dir,
[
val=`echo "$PATH_SEPARATOR$withval" | sed "s|$PATH_SEPARATOR\([[^$PATH_SEPARATOR]*]\)| -I\1/include|g;s/^ //"`
CPPFLAGS="$CPPFLAGS $val"
- val=`echo "$PATH_SEPARATOR$withval" | sed "s|$PATH_SEPARATOR\([[^$PATH_SEPARATOR]*]\)| -L\1/lib|g;s/^ //"`
+ val=`echo "$PATH_SEPARATOR$withval" | sed "s|$PATH_SEPARATOR\([[^$PATH_SEPARATOR]*]\)| -L\1/lib${rpathflag:+ $rpathflag\\\\1/lib}|g;s/^ //"`
LDFLAGS="$LDFLAGS $val"
LDFLAGS_OPTDIR="$val"
OPT_DIR="$withval"
@@ -945,15 +1069,33 @@ AS_CASE(["$target_os"],
],
[macosx_10_5=yes], [macosx_10_5=no])
AC_MSG_RESULT($macosx_10_5)
+ AS_IF([test "${target_os@%:@darwin}" -ge 16], [
+ ac_cv_func___syscall=no
+ ac_cv_func_syscall=no
+ ac_cv_header_sys_syscall_h=no
+ ac_cv_header_syscall_h=no
+ ])
if test $macosx_10_5 = yes; then
- ac_cv_header_ucontext_h=no
+ ac_cv_func_getcontext=no
+ ac_cv_func_setcontext=no
else
AC_DEFINE(BROKEN_SETREUID, 1)
AC_DEFINE(BROKEN_SETREGID, 1)
fi
+ incs=`$CC -v -E -xc - < /dev/null 2>&1 | sed ['1,/^@%:@include </d;s/^ *//;s|[^./][^/]*/\.\./||g;/\/include$/!d;s||/lib|;/\/usr\/lib/d']`
+ for d in `$CC -print-search-dirs | sed -e '/^libraries: */!d;s///' | tr : '\012' | fgrep -v /../ | sed -n 's|^\(/.*/lib\)/$|\1|p'`; do
+ incs=`echo "$incs" | fgrep -v "$d"`
+ done
+ for d in $incs; do
+ test -d "$d" && RUBY_APPEND_OPTIONS(LDFLAGS, "-L$d")
+ done
ac_cv_type_getgroups=gid_t # getgroups() on Rosetta fills garbage
ac_cv_lib_crypt_crypt=no
ac_cv_func_fdatasync=no # Mac OS X wrongly reports it has fdatasync()
+ ac_cv_func_vfork=no
+ if test $gcc_major -lt 4 -o \( $gcc_major -eq 4 -a $gcc_minor -lt 3 \); then
+ ac_cv_func___builtin_setjmp=no
+ fi
AC_CACHE_CHECK(for broken crypt with 8bit chars, rb_cv_broken_crypt,
[AC_TRY_RUN([
#include <stdio.h>
@@ -998,14 +1140,60 @@ main()
],
[hpux*], [ LIBS="-lm $LIBS"
ac_cv_c_inline=no],
-[beos*|haiku*], [
- ac_cv_func_link=no
- ac_cv_func_sched_yield=no
- ac_cv_func_pthread_attr_setinheritsched=no
- AS_CASE(["$target_os"],
- [beos*], [ ac_cv_header_net_socket_h=yes],
- [haiku*], [ ac_cv_func_shutdown=no])
- LIBS="$LIBS" # m lib is include in root under BeOS/Haiku
+[solaris*], [ LIBS="-lm $LIBS"
+ ac_cv_func_vfork=no
+ AC_MSG_CHECKING(whether _XOPEN_SOURCE is already given)
+ AC_TRY_COMPILE([#include <unistd.h>
+ #ifndef _XOPEN_SOURCE
+ #error _XOPEN_SOURCE is not defined
+ #endif
+ ], [],
+ [given_xopen_source=yes], [given_xopen_source=no])
+ AC_MSG_RESULT($given_xopen_source)
+ if test $given_xopen_source = no; then
+ # On Solaris, with gcc, -std=iso9899:1999 in $ansi_options
+ # is often also needed in CPPFLAGS, because some feature
+ # definitions vary depending on such standards options.
+ AS_CASE(["${ansi_options}"],
+ [*-std=iso9899:1999*], [
+ RUBY_APPEND_OPTIONS(CPPFLAGS, ${ansi_options})
+ ])
+ AC_MSG_CHECKING(appropriate _XOPEN_SOURCE value to define)
+ define_xopen_source=""
+ for tmp_xpg in 7 6 5; do
+ if test x"$define_xopen_source" != x; then
+ break
+ fi
+ # Both AC_TRY_CPP and AC_TRY_COMPILE should pass
+ # because some options may not be set to CPPFLAGS.
+ AC_TRY_CPP([
+ #define _XOPEN_SOURCE ${tmp_xpg}00
+ #include <unistd.h>
+ #ifndef _XPG${tmp_xpg}
+ #error _XPG${tmp_xpg} should be defined by _XOPEN_SOURCE=${tmp_xpg}00
+ #endif
+ ], [
+ AC_TRY_COMPILE([
+ #define _XOPEN_SOURCE ${tmp_xpg}00
+ #include <unistd.h>
+ #ifndef _XPG${tmp_xpg}
+ #error _XPG${tmp_xpg} should be defined by _XOPEN_SOURCE=${tmp_xpg}00
+ #endif
+ ], [],
+ [define_xopen_source=${tmp_xpg}00], [])
+ ], [])
+ done
+ if test x"$define_xopen_source" = x; then
+ define_xopen_source=no
+ fi
+ AC_MSG_RESULT($define_xopen_source)
+ if test x"$define_xopen_source" != xno; then
+ RUBY_APPEND_OPTIONS(CPPFLAGS, -D_XOPEN_SOURCE=$define_xopen_source)
+ fi
+ fi
+ ],
+[haiku*], [
+ LIBS="$LIBS" # m lib is include in root
],
[cygwin*], [ ac_cv_header_langinfo_h=yes
AC_CHECK_FUNCS(cygwin_conv_path)
@@ -1022,6 +1210,7 @@ main()
ac_cv_header_sys_time_h=no
ac_cv_header_sys_times_h=no
ac_cv_header_sys_socket_h=no
+ ac_cv_func_lstat=yes
ac_cv_func_times=yes
ac_cv_func_waitpid=yes
ac_cv_func_fsync=yes
@@ -1030,7 +1219,10 @@ main()
ac_cv_func_isinf=yes
ac_cv_func_isnan=yes
ac_cv_func_finite=yes
+ ac_cv_func_lchown=yes
ac_cv_func_link=yes
+ ac_cv_func_readlink=yes
+ ac_cv_func_symlink=yes
ac_cv_lib_crypt_crypt=no
ac_cv_func_getpgrp_void=no
ac_cv_func_memcmp_working=yes
@@ -1045,17 +1237,17 @@ main()
ac_cv_func_clock_gettime=yes
ac_cv_func_clock_getres=yes
ac_cv_func_malloc_usable_size=no
+ { test "$target_cpu" = x64 && ac_cv_func___builtin_setjmp=no; }
AC_CHECK_TYPE([NET_LUID], [], [],
- [@%:@include <windows.h>
- @%:@include <iphlpapi.h>])
+ [@%:@include <winsock2.h>
+ @%:@include <iphlpapi.h>])
if test x"$ac_cv_type_NET_LUID" = xyes; then
AC_DEFINE(HAVE_TYPE_NET_LUID, 1)
fi
AC_CHECK_FUNCS(_gmtime64_s)
+ AC_CHECK_FUNCS(_wfreopen_s)
AC_LIBOBJ([langinfo])
],
-[os2-emx*], [ LIBS="-lm $LIBS"
- ac_cv_lib_dir_opendir=no],
[bsdi*], [ LIBS="-lm $LIBS"
AC_DEFINE(BROKEN_SETREUID, 1)
AC_DEFINE(BROKEN_SETREGID, 1)
@@ -1066,21 +1258,23 @@ main()
ac_cv_func_shutdown=no
ac_cv_func_close=no
],
+[netbsd*], [ LIBS="-lm $LIBS"
+ ],
[dragonfly*], [ LIBS="-lm $LIBS"
# isinf() and isnan() are macros on DragonFly.
ac_cv_func_isinf=yes
ac_cv_func_isnan=yes
],
+[aix*],[ LIBS="-lm $LIBS"
+ ac_cv_func_round=no
+ ],
[nacl], [
LIBS="-lm $LIBS"
if test "${nacl_cv_build_variant}" = "newlib"; then
RUBY_APPEND_OPTION(CPPFLAGS, -DNACL_NEWLIB)
- RUBY_APPEND_OPTION(LIBS, '-lnosys')
else
RUBY_APPEND_OPTION(XCFLAGS, -fPIC)
fi
- ac_cv_func_shutdown=no
- ac_cv_func_fcntl=no
],
[ LIBS="-lm $LIBS"])
@@ -1094,44 +1288,46 @@ AC_HEADER_DIRENT
dnl AC_HEADER_STDC has been checked in AC_USE_SYSTEM_EXTENSIONS
AC_HEADER_STDBOOL
AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS( \
- limits.h \
- sys/file.h \
- sys/ioctl.h \
- sys/syscall.h \
- fcntl.h \
- sys/fcntl.h \
- sys/select.h \
- sys/time.h \
- sys/times.h \
- sys/param.h \
- syscall.h \
- pwd.h \
- grp.h \
- a.out.h \
- utime.h \
- direct.h \
- sys/resource.h \
- sys/mkdev.h \
- sys/utime.h \
- float.h \
- ieeefp.h \
- ucontext.h \
- intrinsics.h \
- langinfo.h \
- locale.h \
- sys/sendfile.h \
- time.h \
- net/socket.h \
- sys/socket.h \
- process.h \
- sys/prctl.h \
- atomic.h \
- malloc.h \
- malloc_np.h \
- malloc/malloc.h \
- setjmpex.h
-)
+
+AC_CHECK_HEADERS(a.out.h)
+AC_CHECK_HEADERS(atomic.h)
+AC_CHECK_HEADERS(direct.h)
+AC_CHECK_HEADERS(grp.h)
+AC_CHECK_HEADERS(fcntl.h)
+AC_CHECK_HEADERS(float.h)
+AC_CHECK_HEADERS(ieeefp.h)
+AC_CHECK_HEADERS(intrinsics.h)
+AC_CHECK_HEADERS(langinfo.h)
+AC_CHECK_HEADERS(limits.h)
+AC_CHECK_HEADERS(locale.h)
+AC_CHECK_HEADERS(malloc.h)
+AC_CHECK_HEADERS(malloc/malloc.h)
+AC_CHECK_HEADERS(malloc_np.h)
+AC_CHECK_HEADERS(net/socket.h)
+AC_CHECK_HEADERS(process.h)
+AC_CHECK_HEADERS(pwd.h)
+AC_CHECK_HEADERS(setjmpex.h)
+AC_CHECK_HEADERS(sys/attr.h)
+AC_CHECK_HEADERS(sys/fcntl.h)
+AC_CHECK_HEADERS(sys/file.h)
+AC_CHECK_HEADERS(sys/id.h)
+AC_CHECK_HEADERS(sys/ioctl.h)
+AC_CHECK_HEADERS(sys/mkdev.h)
+AC_CHECK_HEADERS(sys/param.h)
+AC_CHECK_HEADERS(sys/prctl.h)
+AC_CHECK_HEADERS(sys/resource.h)
+AC_CHECK_HEADERS(sys/select.h)
+AC_CHECK_HEADERS(sys/sendfile.h)
+AC_CHECK_HEADERS(sys/socket.h)
+AC_CHECK_HEADERS(sys/syscall.h)
+AC_CHECK_HEADERS(sys/time.h)
+AC_CHECK_HEADERS(sys/times.h)
+AC_CHECK_HEADERS(sys/uio.h)
+AC_CHECK_HEADERS(sys/utime.h)
+AC_CHECK_HEADERS(syscall.h)
+AC_CHECK_HEADERS(time.h)
+AC_CHECK_HEADERS(ucontext.h)
+AC_CHECK_HEADERS(utime.h)
AC_ARG_WITH([gmp],
[AS_HELP_STRING([--without-gmp],
@@ -1141,25 +1337,87 @@ AC_ARG_WITH([gmp],
AS_IF([test "x$with_gmp" != xno],
[AC_CHECK_HEADERS(gmp.h)
AS_IF([test "x$ac_cv_header_gmp_h" != xno],
- AC_CHECK_LIB([gmp], [__gmpz_init]))
- with_gmp="$ac_cv_lib_gmp___gmpz_init"
- AS_IF([test -z "$with_gmp"], [with_gmp=no])])
+ AC_SEARCH_LIBS([__gmpz_init], [gmp],
+ [AC_DEFINE(HAVE_LIBGMP, 1)]))])
+
+AC_ARG_WITH([jemalloc],
+ [AS_HELP_STRING([--with-jemalloc],[use jemalloc allocator])],
+ [with_jemalloc=$withval], [with_jemalloc=no])
+AS_IF([test "x$with_jemalloc" = xyes],[
+ AC_SEARCH_LIBS([malloc_conf], [jemalloc],
+ [AC_DEFINE(HAVE_LIBJEMALLOC, 1)], [with_jemalloc=no])
+ AC_CHECK_HEADER(jemalloc/jemalloc.h, [
+ AC_DEFINE(RUBY_ALTERNATIVE_MALLOC_HEADER, [<jemalloc/jemalloc.h>])
+ ])
+ AS_IF([test "x$with_jemalloc" = xno], [
+ AC_CACHE_CHECK([for jemalloc with JEMALLOC_MANGLE], rb_cv_jemalloc_demangle,
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([@%:@define JEMALLOC_MANGLE 1
+ @%:@ifdef RUBY_ALTERNATIVE_MALLOC_HEADER
+ @%:@include RUBY_ALTERNATIVE_MALLOC_HEADER
+ @%:@else
+ @%:@include <jemalloc.h>
+ @%:@endif], [return !&malloc_conf])],
+ [rb_cv_jemalloc_demangle=yes],
+ [rb_cv_jemalloc_demangle=no])
+ ])
+ ])
+ AS_IF([test "x$rb_cv_jemalloc_demangle" = xyes], [
+ AC_DEFINE(JEMALLOC_MANGLE)
+ with_jemalloc=yes
+ ])
+ AS_IF([test "x$with_jemalloc" = xyes],
+ [
+ ac_cv_func_malloc_usable_size=yes
+ ],
+ [AC_MSG_ERROR([jemalloc requested but not found])
+ ])
+])
dnl check for large file stuff
mv confdefs.h confdefs1.h
: > confdefs.h
AC_SYS_LARGEFILE
+# On 32-bit Solaris, it is safe to define _LARGEFILE_SOURCE
+# which is not added by AC_SYS_LARGEFILE.
+if test x"$enable_largefile" != xno; then
+ AS_CASE(["$target_os"], [solaris*], [
+ AC_MSG_CHECKING([wheather _LARGEFILE_SOURCE should be defined])
+ AS_CASE(["${ac_cv_sys_file_offset_bits}:${ac_cv_sys_large_files}"],
+ ["64:"|"64:no"|"64:unknown"], [
+ # insert _LARGEFILE_SOURCE before _FILE_OFFSET_BITS line
+ # that is the same order as "getconf LFS_CFLAGS" output
+ mv confdefs.h largefile0.h
+ : > confdefs.h
+ AC_DEFINE(_LARGEFILE_SOURCE)
+ cat largefile0.h >> confdefs.h
+ rm largefile0.h
+ AC_MSG_RESULT([yes])
+ ], [AC_MSG_RESULT([no])])
+ ])
+fi
mv confdefs.h largefile.h
mv confdefs1.h confdefs.h
cat largefile.h >> confdefs.h
-AS_CASE(["$target_os"],[mingw*], [ac_cv_type_off_t=yes;ac_cv_sizeof_off_t=8])
+AS_CASE(["$target_os"],
+ [mingw*], [ac_cv_type_off_t=yes;ac_cv_sizeof_off_t=8],
+ [aix*], [
+ AS_CASE(["$target_cpu:$ac_cv_sys_large_files"],
+ [ppc64:*|powerpc64:*], [],
+ [*:no|*:unknown], [],
+ [
+ # AIX currently does not support a 32-bit call to posix_fadvise()
+ # if _LARGE_FILES is defined.
+ ac_cv_func_posix_fadvise=no
+ ])
+ ])
AC_C_BIGENDIAN
AC_C_CONST
AC_C_CHAR_UNSIGNED
AC_C_INLINE
AC_C_VOLATILE
+AC_C_TYPEOF
AS_CASE(":$ac_cv_c_const:$ac_cv_c_volatile:",
[*:no:*], [AC_MSG_ERROR(ANSI C-conforming const and volatile are mandatory)])
@@ -1258,7 +1516,6 @@ RUBY_CHECK_SIZEOF(short)
RUBY_CHECK_SIZEOF(long, [int], [ILP LP])
RUBY_CHECK_SIZEOF(long long)
RUBY_CHECK_SIZEOF(__int64)
-RUBY_CHECK_SIZEOF(__int128)
RUBY_CHECK_SIZEOF(off_t)
RUBY_CHECK_SIZEOF(void*, [int long "long long"], [ILP LP LLP])
RUBY_CHECK_SIZEOF(float)
@@ -1266,10 +1523,29 @@ RUBY_CHECK_SIZEOF(double)
RUBY_CHECK_SIZEOF(time_t, [long "long long"], [], [@%:@include <time.h>])
RUBY_CHECK_SIZEOF(clock_t, [], [], [@%:@include <time.h>])
+AC_CACHE_CHECK(packed struct attribute, rb_cv_packed_struct,
+ [rb_cv_packed_struct=no
+ for mac in \
+ "__pragma(pack(push, 1)) x __pragma(pack(pop))" \
+ "x __attribute__((packed))" \
+ ; do
+ AC_TRY_COMPILE([@%:@define PACKED_STRUCT(x) $mac
+ PACKED_STRUCT(struct { int a; });], [],
+ [rb_cv_packed_struct=$mac; break])
+ done])
+packed_struct_unaligned=x
+if test "$rb_cv_packed_struct" != no; then
+ AC_DEFINE_UNQUOTED([PACKED_STRUCT(x)], [$rb_cv_packed_struct])
+else
+ AC_DEFINE_UNQUOTED([PACKED_STRUCT(x)], x)
+fi
+AC_DEFINE_UNQUOTED(PACKED_STRUCT_UNALIGNED(x), $packed_struct_unaligned)
+
AC_DEFUN([RUBY_CHECK_PRINTF_PREFIX], [
AC_CACHE_CHECK([for printf prefix for $1], [rb_cv_pri_prefix_]AS_TR_SH($1),[
[rb_cv_pri_prefix_]AS_TR_SH($1)=[NONE]
- RUBY_WERROR_FLAG(for pri in $2; do
+ RUBY_WERROR_FLAG(RUBY_APPEND_OPTIONS(CFLAGS, $rb_cv_wsuppress_flags)
+ for pri in $2; do
AC_TRY_COMPILE(
[@%:@include <stdio.h>
@%:@include <stddef.h>
@@ -1337,7 +1613,16 @@ AC_DEFUN([RUBY_REPLACE_TYPE], [dnl
[
t=INT])
rb_cv_[$1]_convertible=${u}${t}])
- test "${AS_TR_SH(ac_cv_type_[$1])}" = "yes" && n="$1"
+ if test "${AS_TR_SH(ac_cv_type_[$1])}" = "yes"; then
+ n="$1"
+ else
+ AS_CASE(["${rb_cv_[$1]_convertible}"],
+ [*LL], [n="long long"],
+ [*LONG], [n="long"],
+ [n="int"])
+ AS_CASE(["${rb_cv_[$1]_convertible}"],
+ [U*], [n="unsigned $n"])
+ fi
AS_CASE("${rb_cv_[$1]_convertible}", [U*], [u=+1], [u=-1])
AC_DEFINE_UNQUOTED(rb_[$1], $n)
AC_DEFINE_UNQUOTED([SIGNEDNESS_OF_]AS_TR_CPP($1), $u)
@@ -1459,48 +1744,81 @@ EOH
])dnl
])dnl
-dnl RUBY_FUNC_ATTRIBUTE(attrib, macroname, cachevar, condition)
-AC_DEFUN([RUBY_FUNC_ATTRIBUTE], [dnl
+dnl RUBY_DECL_ATTRIBUTE(attrib, macroname, cachevar, condition, type, code)
+AC_DEFUN([RUBY_DECL_ATTRIBUTE], [dnl
m4_ifval([$2], dnl
- [AS_VAR_PUSHDEF([attrib],[$2])], dnl
- [AS_VAR_PUSHDEF([attrib],[FUNC_]AS_TR_CPP($1))] dnl
+ [AS_VAR_PUSHDEF([attrib], m4_bpatsubst([$2], [(.*)], []))], dnl
+ [AS_VAR_PUSHDEF([attrib], m4_toupper(m4_format(%.4s, [$5]))[_]AS_TR_CPP($1))] dnl
)dnl
m4_ifval([$3], dnl
[AS_VAR_PUSHDEF([rbcv],[$3])], dnl
- [AS_VAR_PUSHDEF([rbcv],[rb_cv_func_][$1])]dnl
+ [AS_VAR_PUSHDEF([rbcv],[rb_cv_]m4_format(%.4s, [$5])[_][$1])]dnl
)dnl
+m4_pushdef([attrib_code],[m4_bpatsubst([$1],["],[\\"])])dnl
+m4_pushdef([attrib_params],[m4_bpatsubst([$2(x)],[^[^()]*(\([^()]*\)).*],[\1])])dnl
m4_ifval([$4], [rbcv_cond=["$4"]; test "$rbcv_cond" || unset rbcv_cond])
-AC_CACHE_CHECK(for [$1] function attribute, rbcv,
+AC_CACHE_CHECK(for m4_ifval([$2],[m4_bpatsubst([$2], [(.*)], [])],[$1]) [$5] attribute, rbcv, dnl
[rbcv=x
RUBY_WERROR_FLAG([
-for mac in "__attribute__ (($1)) x" "x __attribute__ (($1))" "__declspec($1) x" x; do
+for mac in \
+ "__attribute__ ((attrib_code)) x" \
+ "x __attribute__ ((attrib_code))" \
+ "__declspec(attrib_code) x" \
+ x; do
m4_ifval([$4],mac="$mac"${rbcv_cond+" /* only if $rbcv_cond */"})
AC_TRY_COMPILE(
m4_ifval([$4],${rbcv_cond+[@%:@if ]$rbcv_cond})
-[@%:@define ]attrib[(x) $mac]
+[@%:@define ]attrib[](attrib_params)[ $mac]
m4_ifval([$4],${rbcv_cond+[@%:@else]}
-${rbcv_cond+[@%:@define ]attrib[(x) x]}
+${rbcv_cond+[@%:@define ]attrib[](attrib_params)[ x]}
${rbcv_cond+[@%:@endif]})
- attrib[(void conftest_attribute_check(void));], [],
+$6
+ attrib[](attrib_params)[;], [],
[rbcv="$mac"; break])
done
])])
if test "$rbcv" != x; then
- RUBY_DEFINE_IF(m4_ifval([$4],[${rbcv_cond}]), attrib[(x)], $rbcv)
+ RUBY_DEFINE_IF(m4_ifval([$4],[${rbcv_cond}]), attrib[](attrib_params)[], $rbcv)
fi
-m4_ifval([$4], [unset rbcv_cond])dnl
+m4_ifval([$4], [unset rbcv_cond]) dnl
+m4_popdef([attrib_params])dnl
+m4_popdef([attrib_code])dnl
AS_VAR_POPDEF([attrib])dnl
AS_VAR_POPDEF([rbcv])dnl
])
+dnl RUBY_FUNC_ATTRIBUTE(attrib, macroname, cachevar, condition)
+AC_DEFUN([RUBY_FUNC_ATTRIBUTE], [dnl
+ RUBY_DECL_ATTRIBUTE([$1], [$2], [$3], [$4],
+ [function], [@%:@define x void conftest_attribute_check(void)]
+ )
+])
+
+dnl RUBY_TYPE_ATTRIBUTE(attrib, macroname, cachevar, condition)
+AC_DEFUN([RUBY_TYPE_ATTRIBUTE], [dnl
+ RUBY_DECL_ATTRIBUTE([$1], [$2], [$3], [$4],
+ [type], [
+@%:@define x struct conftest_attribute_check {int i;}
+@%:@define mesg ("")
+])
+])
+
RUBY_FUNC_ATTRIBUTE(noreturn, NORETURN)
RUBY_FUNC_ATTRIBUTE(deprecated, DEPRECATED)
+RUBY_FUNC_ATTRIBUTE(deprecated("by "@%:@n), DEPRECATED_BY(n,x), rb_cv_func_deprecated_by)
+RUBY_TYPE_ATTRIBUTE(deprecated mesg, DEPRECATED_TYPE(mesg,x), rb_cv_type_deprecated)
RUBY_FUNC_ATTRIBUTE(noinline, NOINLINE)
+RUBY_FUNC_ATTRIBUTE(weak, WEAK, rb_cv_func_weak)
+if test "$rb_cv_func_weak" != x; then
+ AC_DEFINE(HAVE_FUNC_WEAK)
+fi
if_i386=${universal_binary+[defined __i386__]}
RUBY_FUNC_ATTRIBUTE(stdcall, [], [], ${if_i386})
RUBY_FUNC_ATTRIBUTE(cdecl, [], [], ${if_i386})
RUBY_FUNC_ATTRIBUTE(fastcall, [], [], ${if_i386})
+RUBY_FUNC_ATTRIBUTE(optimize("O0"), FUNC_UNOPTIMIZED, rb_cv_func_unoptimized)
+RUBY_FUNC_ATTRIBUTE(optimize("-Os","-fomit-frame-pointer"), FUNC_MINIMIZED, rb_cv_func_minimized)
if test "$GCC" = yes; then
AC_CACHE_CHECK([for function alias], [rb_cv_gcc_function_alias],
@@ -1525,6 +1843,7 @@ if test "$GCC" = yes; then
__atomic_exchange_n(&atomic_var, 1, __ATOMIC_SEQ_CST);
__atomic_fetch_add(&atomic_var, 1, __ATOMIC_SEQ_CST);
__atomic_fetch_sub(&atomic_var, 1, __ATOMIC_SEQ_CST);
+ __atomic_or_fetch(&atomic_var, 1, __ATOMIC_SEQ_CST);
],
[rb_cv_gcc_atomic_builtins=yes],
[rb_cv_gcc_atomic_builtins=no])])
@@ -1539,6 +1858,8 @@ if test "$GCC" = yes; then
__sync_lock_test_and_set(&atomic_var, 1);
__sync_fetch_and_add(&atomic_var, 1);
__sync_fetch_and_sub(&atomic_var, 1);
+ __sync_or_and_fetch(&atomic_var, 1);
+ __sync_val_compare_and_swap(&atomic_var, 0, 1);
],
[rb_cv_gcc_sync_builtins=yes],
[rb_cv_gcc_sync_builtins=no])])
@@ -1548,8 +1869,8 @@ if test "$GCC" = yes; then
AC_CACHE_CHECK(for __builtin_unreachable, rb_cv_func___builtin_unreachable,
[RUBY_WERROR_FLAG(
- [AC_TRY_LINK([@%:@include <stdlib.h>],
- [exit(0); __builtin_unreachable();],
+ [AC_TRY_LINK([volatile int zero;],
+ [if (zero) __builtin_unreachable();],
[rb_cv_func___builtin_unreachable=yes],
[rb_cv_func___builtin_unreachable=no])
])
@@ -1590,6 +1911,32 @@ if test "$rb_cv_function_name_string" != no; then
AC_DEFINE_UNQUOTED(RUBY_FUNCTION_NAME_STRING, [$rb_cv_function_name_string])
fi
+AC_CACHE_CHECK(if enum over int is allowed, rb_cv_enum_over_int, [
+ rb_cv_enum_over_int=no
+ if test "x$ac_cv_type_long_long" = xyes; then
+ type="unsigned long long" max="ULLONG_MAX"
+ else
+ type="unsigned long" max="ULONG_MAX"
+ fi
+ RUBY_WERROR_FLAG([
+ AC_COMPILE_IFELSE([
+ AC_LANG_BOOL_COMPILE_TRY([
+ @%:@include <limits.h>
+ enum {conftest_max = $max};
+ ], [
+ (conftest_max == $max) &&
+ (sizeof(conftest_max) == sizeof($type))
+ ]
+ )],
+ [rb_cv_enum_over_int=yes],
+ [rb_cv_enum_over_int=no]
+ )
+ ])
+])
+if test $rb_cv_enum_over_int = yes; then
+ AC_DEFINE(ENUM_OVER_INT, 1)
+fi
+
dnl Check whether we need to define sys_nerr locally
AC_CHECK_DECLS([sys_nerr], [], [], [$ac_includes_default
@%:@include <errno.h>])
@@ -1623,10 +1970,11 @@ RUBY_CHECK_PRINTF_PREFIX(ptrdiff_t, t)
AC_STRUCT_ST_BLKSIZE
AC_STRUCT_ST_BLOCKS
AC_STRUCT_ST_RDEV
-RUBY_CHECK_SIZEOF([struct stat.st_size], [int long "long long"], [], [@%:@include <sys/stat.h>])
+RUBY_CHECK_SIZEOF([struct stat.st_size], [off_t int long "long long"], [], [@%:@include <sys/stat.h>])
if test "$ac_cv_member_struct_stat_st_blocks" = yes; then
- RUBY_CHECK_SIZEOF([struct stat.st_blocks], [int long "long long"], [], [@%:@include <sys/stat.h>])
+ RUBY_CHECK_SIZEOF([struct stat.st_blocks], [off_t int long "long long"], [], [@%:@include <sys/stat.h>])
fi
+RUBY_CHECK_SIZEOF([struct stat.st_ino], [long "long long"], [], [@%:@include <sys/stat.h>])
AC_CHECK_MEMBERS([struct stat.st_atim])
AC_CHECK_MEMBERS([struct stat.st_atimespec])
AC_CHECK_MEMBERS([struct stat.st_atimensec])
@@ -1636,6 +1984,7 @@ AC_CHECK_MEMBERS([struct stat.st_mtimensec])
AC_CHECK_MEMBERS([struct stat.st_ctim])
AC_CHECK_MEMBERS([struct stat.st_ctimespec])
AC_CHECK_MEMBERS([struct stat.st_ctimensec])
+AC_CHECK_MEMBERS([struct stat.st_birthtimespec])
AC_CHECK_TYPES([struct timeval], [], [], [@%:@ifdef HAVE_TIME_H
@%:@include <time.h>
@@ -1702,7 +2051,6 @@ typedef $1 t; int s = sizeof(t) == 42;])],
["$ac_cv_sizeof_long"], [ rb_cv_type_$1="m4_if([$3], [], [], [$3 ])long"],
["$ac_cv_sizeof_long_long"], [ rb_cv_type_$1="m4_if([$3], [], [], [$3 ])long long"],
["$ac_cv_sizeof___int64"], [ rb_cv_type_$1="m4_if([$3], [], [], [$3 ])__int64"],
- ["$ac_cv_sizeof___int128"], [ rb_cv_type_$1="m4_if([$3], [], [], [$3 ])__int128"],
[ rb_cv_type_$1=no])])])
if test "${rb_cv_type_$1}" != no; then
AC_DEFINE([HAVE_]AS_TR_CPP($1), 1)
@@ -1724,8 +2072,6 @@ RUBY_DEFINT(int32_t, 4)
RUBY_DEFINT(uint32_t, 4, unsigned)
RUBY_DEFINT(int64_t, 8)
RUBY_DEFINT(uint64_t, 8, unsigned)
-RUBY_DEFINT(int128_t, 16)
-RUBY_DEFINT(uint128_t, 16, unsigned)
RUBY_DEFINT(intptr_t, void*)
RUBY_DEFINT(uintptr_t, void*, unsigned)
RUBY_DEFINT(ssize_t, size_t, [], [@%:@include <sys/types.h>]) dnl may differ from int, so not use AC_TYPE_SSIZE_T.
@@ -1835,10 +2181,29 @@ AS_CASE(["$target_os"],[freebsd*],[
AC_DEFINE(BROKEN_CLOSE)
AC_REPLACE_FUNCS(close)
])
-AC_REPLACE_FUNCS(dup2 memmove strerror\
- strchr strstr crypt flock\
- isnan finite isinf hypot acosh erf tgamma lgamma_r cbrt \
- strlcpy strlcat ffs setproctitle)
+
+AC_REPLACE_FUNCS(acosh)
+AC_REPLACE_FUNCS(cbrt)
+AC_REPLACE_FUNCS(crypt)
+AC_REPLACE_FUNCS(dup2)
+AC_REPLACE_FUNCS(erf)
+AC_REPLACE_FUNCS(explicit_bzero)
+AC_REPLACE_FUNCS(ffs)
+AC_REPLACE_FUNCS(finite)
+AC_REPLACE_FUNCS(flock)
+AC_REPLACE_FUNCS(hypot)
+AC_REPLACE_FUNCS(isinf)
+AC_REPLACE_FUNCS(isnan)
+AC_REPLACE_FUNCS(lgamma_r)
+AC_REPLACE_FUNCS(memmove)
+AC_REPLACE_FUNCS(nextafter)
+AC_REPLACE_FUNCS(setproctitle)
+AC_REPLACE_FUNCS(strchr)
+AC_REPLACE_FUNCS(strerror)
+AC_REPLACE_FUNCS(strlcat)
+AC_REPLACE_FUNCS(strlcpy)
+AC_REPLACE_FUNCS(strstr)
+AC_REPLACE_FUNCS(tgamma)
# for missing/setproctitle.c
AS_CASE(["$target_os"],
@@ -1860,17 +2225,51 @@ else
AC_LIBOBJ([signbit])
fi
+AC_CACHE_CHECK(for broken memmem, rb_cv_broken_memmem, [
+ AC_TRY_RUN([
+@%:@include <string.h>
+
+int
+main(int argc, char **argv)
+{
+ const char *str = "hogefugafoobar";
+ const char *rs = "foo";
+ const char *empty = "";
+ char *p;
+
+ p = memmem(str, strlen(str), rs, strlen(rs));
+ if (p == str+8) {
+ p = memmem(str, strlen(str), empty, strlen(empty));
+ if (p == str)
+ return 0;
+ }
+ return 1;
+}
+ ],
+ rb_cv_broken_memmem=no,
+ rb_cv_broken_memmem=yes,
+ rb_cv_broken_memmem=yes)
+])
+test x"$rb_cv_broken_memmem" = xyes && ac_cv_func_memmem=no
+
+AC_FUNC_FORK
+
AC_CHECK_FUNCS(__syscall)
AC_CHECK_FUNCS(_longjmp) # used for AC_ARG_WITH(setjmp-type)
+# we don't use _setjmp if _longjmp doesn't exist.
+test x$ac_cv_func__longjmp = xno && ac_cv_func__setjmp=no
AC_CHECK_FUNCS(_setjmp) # used for AC_ARG_WITH(setjmp-type)
AC_CHECK_FUNCS(_setjmpex) # used for AC_ARG_WITH(setjmp-type)
+AC_CHECK_FUNCS(atan2l atan2f)
AC_CHECK_FUNCS(chroot)
AC_CHECK_FUNCS(chsize)
AC_CHECK_FUNCS(clock_gettime)
AC_CHECK_FUNCS(cosh)
AC_CHECK_FUNCS(daemon)
+AC_CHECK_FUNCS(dirfd)
AC_CHECK_FUNCS(dl_iterate_phdr)
AC_CHECK_FUNCS(dlopen)
+AC_CHECK_FUNCS(dladdr)
AC_CHECK_FUNCS(dup)
AC_CHECK_FUNCS(dup3)
AC_CHECK_FUNCS(eaccess)
@@ -1879,24 +2278,31 @@ AC_CHECK_FUNCS(fchmod)
AC_CHECK_FUNCS(fchown)
AC_CHECK_FUNCS(fcntl)
AC_CHECK_FUNCS(fdatasync)
+AC_CHECK_FUNCS(fgetattrlist)
AC_CHECK_FUNCS(fmod)
-AC_CHECK_FUNCS(fork)
AC_CHECK_FUNCS(fsync)
AC_CHECK_FUNCS(ftruncate)
AC_CHECK_FUNCS(ftruncate64) # used for Win32 platform
+AC_CHECK_FUNCS(getattrlist)
AC_CHECK_FUNCS(getcwd)
+AC_CHECK_FUNCS(getgidx)
+AC_CHECK_FUNCS(getgrnam)
AC_CHECK_FUNCS(getgrnam_r)
AC_CHECK_FUNCS(getgroups)
AC_CHECK_FUNCS(getpgid)
AC_CHECK_FUNCS(getpgrp)
AC_CHECK_FUNCS(getpriority)
AC_CHECK_FUNCS(getpwnam_r)
+AC_CHECK_FUNCS(getresgid)
+AC_CHECK_FUNCS(getresuid)
AC_CHECK_FUNCS(getrlimit)
AC_CHECK_FUNCS(getsid)
AC_CHECK_FUNCS(gettimeofday) # for making ac_cv_func_gettimeofday
+AC_CHECK_FUNCS(getuidx)
AC_CHECK_FUNCS(gmtime_r)
AC_CHECK_FUNCS(initgroups)
AC_CHECK_FUNCS(ioctl)
+AC_CHECK_FUNCS(isfinite)
AC_CHECK_FUNCS(issetugid)
AC_CHECK_FUNCS(killpg)
AC_CHECK_FUNCS(lchmod)
@@ -1910,7 +2316,12 @@ AC_CHECK_FUNCS(malloc_usable_size)
AC_CHECK_FUNCS(malloc_size)
AC_CHECK_FUNCS(mblen)
AC_CHECK_FUNCS(memalign)
+AC_CHECK_FUNCS(memset_s)
+AC_CHECK_FUNCS(writev)
AC_CHECK_FUNCS(memrchr)
+AC_CHECK_FUNCS(memmem)
+AC_CHECK_FUNCS(mkfifo)
+AC_CHECK_FUNCS(mknod)
AC_CHECK_FUNCS(mktime)
AC_CHECK_FUNCS(pipe2)
AC_CHECK_FUNCS(poll)
@@ -1918,8 +2329,10 @@ AC_CHECK_FUNCS(posix_fadvise)
AC_CHECK_FUNCS(posix_memalign)
AC_CHECK_FUNCS(ppoll)
AC_CHECK_FUNCS(pread)
+AC_CHECK_FUNCS(qsort_r)
AC_CHECK_FUNCS(readlink)
AC_CHECK_FUNCS(round)
+AC_CHECK_FUNCS(sched_getaffinity)
AC_CHECK_FUNCS(seekdir)
AC_CHECK_FUNCS(select_large_fdset)
AC_CHECK_FUNCS(sendfile)
@@ -1960,10 +2373,44 @@ AC_CHECK_FUNCS(utimes)
AC_CHECK_FUNCS(wait4)
AC_CHECK_FUNCS(waitpid)
+AS_IF([test "$ac_cv_func_memset_s" = yes],
+ [RUBY_DEFINE_IF([!defined __STDC_WANT_LIB_EXT1__], [__STDC_WANT_LIB_EXT1__], 1)])
+
+AS_IF([test "$ac_cv_func_getcwd" = yes], [
+ AC_CACHE_CHECK(if getcwd allocates buffer if NULL is given, [rb_cv_getcwd_malloc],
+ [AC_TRY_RUN([
+@%:@include <stddef.h>
+@%:@include <stdio.h>
+@%:@ifdef HAVE_UNISTD_H
+@%:@include <unistd.h>
+@%:@endif
+@%:@ifndef EXIT_SUCCESS
+@%:@define EXIT_SUCCESS 0
+@%:@endif
+@%:@ifndef EXIT_FAILURE
+@%:@define EXIT_FAILURE 1
+@%:@endif
+
+int
+main(int argc, char **argv)
+{
+ if (!getcwd(NULL, 0)) return EXIT_FAILURE;
+ return EXIT_SUCCESS;
+}
+],
+ rb_cv_getcwd_malloc=yes,
+ rb_cv_getcwd_malloc=no,
+ AS_CASE($target_os,
+ [linux*|darwin*|*bsd|cygwin*|mingw*|mswin*],
+ [rb_cv_getcwd_malloc=yes],
+ [rb_cv_getcwd_malloc=no]))])
+ AS_IF([test "$rb_cv_getcwd_malloc" = no], [AC_DEFINE(NO_GETCWD_MALLOC, 1)])
+])
+
AC_DEFUN([RUBY_CHECK_BUILTIN_FUNC], [dnl
AC_CACHE_CHECK([for $1], AS_TR_SH(rb_cv_builtin_$1),
[AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([], [$2;])],
+ [AC_LANG_PROGRAM([int foo;], [$2;])],
[AS_TR_SH(rb_cv_builtin_$1)=yes],
[AS_TR_SH(rb_cv_builtin_$1)=no])])
if test "${AS_TR_SH(rb_cv_builtin_$1)}" != no; then
@@ -1975,9 +2422,111 @@ RUBY_CHECK_BUILTIN_FUNC(__builtin_bswap64, [__builtin_bswap64(0)])
RUBY_CHECK_BUILTIN_FUNC(__builtin_clz, [__builtin_clz(0)])
RUBY_CHECK_BUILTIN_FUNC(__builtin_clzl, [__builtin_clzl(0)])
RUBY_CHECK_BUILTIN_FUNC(__builtin_clzll, [__builtin_clzll(0)])
-RUBY_CHECK_BUILTIN_FUNC(__builtin_choose_expr, [__builtin_choose_expr(0, 0, 0)])
+RUBY_CHECK_BUILTIN_FUNC(__builtin_choose_expr, [
+ [int x[__extension__(__builtin_choose_expr(1, 1, -1))]];
+ [int y[__extension__(__builtin_choose_expr(0, -1, 1))]];
+ ])
+if test x$rb_cv_builtin___builtin_choose_expr = xyes; then
+ RUBY_CHECK_BUILTIN_FUNC(__builtin_choose_expr_constant_p, [
+ [int x[__extension__(__builtin_choose_expr(__builtin_constant_p(1), 1, -1))]];
+ [int y[__extension__(__builtin_choose_expr(__builtin_constant_p(foo), -1, 1))]];
+ ])
+fi
RUBY_CHECK_BUILTIN_FUNC(__builtin_types_compatible_p, [__builtin_types_compatible_p(int, int)])
+if test "$ac_cv_func_qsort_r" != no; then
+ AC_CACHE_CHECK(whether qsort_r is GNU version, rb_cv_gnu_qsort_r,
+ [AC_TRY_COMPILE([
+@%:@include <stdlib.h>
+void qsort_r(void *base, size_t nmemb, size_t size,
+ int (*compar)(const void *, const void *, void *),
+ void *arg);
+],[ ],
+ [rb_cv_gnu_qsort_r=yes],
+ [rb_cv_gnu_qsort_r=no])
+ ])
+ AC_CACHE_CHECK(whether qsort_r is BSD version, rb_cv_bsd_qsort_r,
+ [AC_TRY_COMPILE([
+@%:@include <stdlib.h>
+void qsort_r(void *base, size_t nmemb, size_t size,
+ void *arg, int (*compar)(void *, const void *, const void *));
+],[ ],
+ [rb_cv_bsd_qsort_r=yes],
+ [rb_cv_bsd_qsort_r=no])
+ ])
+ AS_CASE("$rb_cv_gnu_qsort_r:$rb_cv_bsd_qsort_r",
+ [yes:no], [
+ AC_DEFINE(HAVE_GNU_QSORT_R, 1)
+ ],
+ [no:yes], [
+ AC_DEFINE(HAVE_BSD_QSORT_R, 1)
+ ])
+fi
+
+AC_CACHE_CHECK(whether atan2 handles Inf as C99, rb_cv_atan2_inf_c99, [
+ AS_IF([test $ac_cv_func_atan2f:$ac_cv_func_atan2l = yes:yes], [
+ AC_TRY_RUN([
+@%:@include <math.h>
+@%:@ifdef HAVE_UNISTD_H
+@%:@include <unistd.h>
+@%:@endif
+@%:@ifndef EXIT_SUCCESS
+@%:@define EXIT_SUCCESS 0
+@%:@endif
+@%:@ifndef EXIT_FAILURE
+@%:@define EXIT_FAILURE 1
+@%:@endif
+
+int
+main(int argc, char **argv)
+{
+ if (fabs(atan2(INFINITY, INFINITY) - M_PI_4) <= 0.01) return EXIT_SUCCESS;
+ return EXIT_FAILURE;
+}
+],
+ [rb_cv_atan2_inf_c99=yes],
+ [rb_cv_atan2_inf_c99=no],
+ [AS_CASE($target_os, [mingw*|mswin*], [rb_cv_atan2_inf_c99=no], [rb_cv_atan2_inf_c99=yes])]
+ )
+ ], [rb_cv_atan2_inf_c99=no])
+])
+AS_IF([test "x$rb_cv_atan2_inf_c99" = xyes], [AC_DEFINE(ATAN2_INF_C99)])
+
+AS_IF([test "x$ac_cv_func_lgamma_r" = xyes], [
+ AC_CACHE_CHECK(whether lgamma_r handles -0.0, rb_cv_lgamma_r_m0, [
+ AC_TRY_RUN([
+@%:@include <math.h>
+@%:@ifdef HAVE_UNISTD_H
+@%:@include <unistd.h>
+@%:@endif
+@%:@ifndef EXIT_SUCCESS
+@%:@define EXIT_SUCCESS 0
+@%:@endif
+@%:@ifndef EXIT_FAILURE
+@%:@define EXIT_FAILURE 1
+@%:@endif
+
+int
+main(int argc, char **argv)
+{
+ int sign;
+ double x = lgamma_r(-0.0, &sign);
+
+ /* should be [+inf, -1] */
+ if (x <= 0) return EXIT_FAILURE;
+ if (!isinf(x)) return EXIT_FAILURE;
+ if (sign != -1) return EXIT_FAILURE;
+ return EXIT_SUCCESS;
+}
+],
+ [rb_cv_lgamma_r_m0=yes],
+ [rb_cv_lgamma_r_m0=no],
+ [rb_cv_lgamma_r_m0=yes]
+ )
+ ])
+ AS_IF([test "x$rb_cv_lgamma_r_m0" = xno], [AC_DEFINE(LGAMMA_R_M0_FIX)])
+])
+
# Some platform need -lrt for clock_gettime, but the other don't.
if test x"$ac_cv_func_clock_gettime" != xyes; then
# glibc 2.17 moves clock_* functions from librt to the main C library.
@@ -2007,17 +2556,32 @@ AC_CACHE_CHECK(for sigsetjmp as a macro or function, ac_cv_func_sigsetjmp,
ac_cv_func_sigsetjmp=yes,
ac_cv_func_sigsetjmp=no)])
+AC_DEFUN([RUBY_CHECK_BUILTIN_SETJMP], [
+if test x"${ac_cv_func___builtin_setjmp}" = xyes; then
+ unset ac_cv_func___builtin_setjmp
+fi
AC_CACHE_CHECK(for __builtin_setjmp, ac_cv_func___builtin_setjmp,
-[AC_TRY_LINK([@%:@include <setjmp.h>
- jmp_buf jb; void t(v) int v; {__builtin_longjmp(jb, v);}],
- [__builtin_setjmp(jb);],
- [ac_cv_func___builtin_setjmp=yes],
- [ac_cv_func___builtin_setjmp=no])
+ [
+ ac_cv_func___builtin_setjmp=no
+ for cast in "" "(void **)"; do
+ RUBY_WERROR_FLAG(
+ [AC_TRY_LINK([@%:@include <setjmp.h>
+ @%:@include <stdio.h>
+ jmp_buf jb;
+ void t(void) {__builtin_longjmp($cast jb, 1);}
+ int jump(void) {(void)(__builtin_setjmp($cast jb) ? 1 : 0); return 0;}],
+ [
+ void (*volatile f)(void) = t;
+ if (!jump()) printf("%d\n", f != 0);
+ ],
+ [ac_cv_func___builtin_setjmp="yes with cast ($cast)"])
+ ])
+ test "$ac_cv_func___builtin_setjmp" = no || break
+ done])
])
-# we don't use _setjmp if _longjmp doesn't exist.
-test x$ac_cv_func__longjmp = xno && ac_cv_func__setjmp=no
-
+AC_DEFUN([RUBY_SETJMP_TYPE], [
+RUBY_CHECK_BUILTIN_SETJMP
AC_MSG_CHECKING(for setjmp type)
setjmp_suffix=
AC_ARG_WITH(setjmp-type,
@@ -2031,11 +2595,13 @@ AC_ARG_WITH(setjmp-type,
[setjmpex], [ setjmp_prefix= setjmp_suffix=ex],
[''], [ unset setjmp_prefix],
[ AC_MSG_ERROR(invalid setjmp type: $withval)])], [unset setjmp_prefix])
+setjmp_cast=
if test ${setjmp_prefix+set}; then
if test "${setjmp_prefix}" && eval test '$ac_cv_func_'${setjmp_prefix}setjmp${setjmp_suffix} = no; then
AC_MSG_ERROR(${setjmp_prefix}setjmp${setjmp_suffix} is not available)
fi
-elif test "$ac_cv_func___builtin_setjmp" = yes; then
+elif { AS_CASE("$ac_cv_func___builtin_setjmp", [yes*], [true], [false]) }; then
+ setjmp_cast=`expr "$ac_cv_func___builtin_setjmp" : "yes with cast (\(.*\))"`
setjmp_prefix=__builtin_
setjmp_suffix=
elif test "$ac_cv_header_setjmpex_h:$ac_cv_func__setjmpex" = yes:yes; then
@@ -2056,10 +2622,11 @@ if test x$setjmp_prefix = xsig; then
else
unset setjmp_sigmask
fi
-AC_MSG_RESULT(${setjmp_prefix}setjmp${setjmp_suffix})
-AC_DEFINE_UNQUOTED([RUBY_SETJMP(env)], [${setjmp_prefix}setjmp${setjmp_suffix}(env${setjmp_sigmask+,0})])
-AC_DEFINE_UNQUOTED([RUBY_LONGJMP(env,val)], [${setjmp_prefix}longjmp(env,val)])
+AC_MSG_RESULT(${setjmp_prefix}setjmp${setjmp_suffix}${setjmp_cast:+\($setjmp_cast\)})
+AC_DEFINE_UNQUOTED([RUBY_SETJMP(env)], [${setjmp_prefix}setjmp${setjmp_suffix}($setjmp_cast(env)${setjmp_sigmask+,0})])
+AC_DEFINE_UNQUOTED([RUBY_LONGJMP(env,val)], [${setjmp_prefix}longjmp($setjmp_cast(env),val)])
AC_DEFINE_UNQUOTED(RUBY_JMP_BUF, ${setjmp_sigmask+${setjmp_prefix}}jmp_buf)
+])
# End of setjmp check.
AC_ARG_ENABLE(setreuid,
@@ -2257,6 +2824,14 @@ if test "$ac_cv_func_setpgid:$ac_cv_func_setpgrp" = no:yes; then
AC_FUNC_SETPGRP
fi
+if test x"$ac_cv_func_dirfd" = xno; then
+ AS_CASE(["$target_os"],[solaris*],
+ [AC_CHECK_MEMBERS([DIR.d_fd, DIR.dd_fd],,,[
+#include <sys/types.h>
+#include <dirent.h>
+])])
+fi
+
if test x"$target_cpu" = xia64; then
AC_LIBOBJ([ia64])
AC_CACHE_CHECK(for __libc_ia64_register_backing_store_base,
@@ -2282,70 +2857,10 @@ else
AC_DEFINE(RSHIFT(x,y), (((x)<0) ? ~((~(x))>>(int)(y)) : (x)>>(int)(y)))
fi
-# win32.c still use this. Don't remove it.
-test "$rb_cv_fcnt" = "not found" && rb_cv_fcnt="not found (OK if using GNU libc)"
-AC_CACHE_CHECK([read count field in FILE structures], rb_cv_fcnt,
-[rb_cv_fcnt="not found (OK if using GNU libc)"
-for fcnt in dnl
- _cnt dnl
- __cnt dnl
- _r dnl
- readCount dnl
- _rcount dnl for emx0.9c
-; do
- AC_TRY_COMPILE([#include <stdio.h>
-],
- [FILE *f = stdin; f->$fcnt = 0;],
- [rb_cv_fcnt="$fcnt"; break])
-done])
-AS_CASE("$rb_cv_fcnt",
- ["not found"*], [rb_cv_fcnt="not found"],
- [AC_DEFINE_UNQUOTED(FILE_COUNT, $rb_cv_fcnt)])
-
-# win32.c still use this. Don't remove it.
-AC_CACHE_CHECK([read buffer ptr field in FILE structures], rb_cv_frptr,
-[for frptr in dnl
- _IO_read_ptr dnl
- _ptr dnl
- __ptr dnl
- bufpos dnl
- _p dnl
- __bufpos dnl
-; do
- AC_TRY_COMPILE([#include <stdio.h>
-],
- [FILE *f = stdin; char buf[256]; f->$frptr = buf;],
- rb_cv_frptr="$frptr"; break,
- rb_cv_frptr="not found")
-done])
-if test "$rb_cv_frptr" != "not found"; then
- AC_DEFINE_UNQUOTED(FILE_READPTR, $rb_cv_frptr)
-
- if test "$rb_cv_fcnt" = "not found"; then
- AC_CACHE_CHECK([read buffer end field in FILE structures], rb_cv_frend,
- [for frend in dnl
- _IO_read_end dnl
- bufread dnl
- __bufread dnl
- ; do
- AC_TRY_COMPILE([#include <stdio.h>
- ],
- [FILE *f = stdin; char buf[256]; f->$frend = buf;],
- rb_cv_frend="$frend"; break,
- rb_cv_frend="not found")
- done])
- if test "$rb_cv_frend" != "not found"; then
- AC_DEFINE_UNQUOTED(FILE_READEND, $rb_cv_frend)
- fi
- fi
-fi
-
if test x"$ac_cv_func_gettimeofday" != xyes; then
AC_MSG_ERROR(gettimeofday() must exist)
fi
-RUBY_CHECK_SIZEOF([struct stat.st_ino], [long "long long"], [], [@%:@include <sys/stat.h>])
-
if test "$ac_cv_func_sysconf" = yes; then
AC_DEFUN([RUBY_CHECK_SYSCONF], [dnl
AC_CACHE_CHECK([whether _SC_$1 is supported], rb_cv_have_sc_[]m4_tolower($1),
@@ -2362,7 +2877,7 @@ if test "$ac_cv_func_sysconf" = yes; then
RUBY_CHECK_SYSCONF(CLK_TCK)
fi
-AC_DEFUN(RUBY_STACK_GROW_DIRECTION, [
+AC_DEFUN([RUBY_STACK_GROW_DIRECTION], [
AS_VAR_PUSHDEF([stack_grow_dir], [rb_cv_stack_grow_dir_$1])
AC_CACHE_CHECK(stack growing direction on $1, stack_grow_dir, [
AS_CASE(["$1"],
@@ -2443,17 +2958,33 @@ if test x"$enable_pthread" = xyes; then
else
AC_MSG_WARN("Don't know how to find pthread library on your system -- thread support disabled")
fi
+ AC_CACHE_CHECK([whether pthread_t is scalar type], [rb_cv_scalar_pthread_t], [
+ AC_TRY_COMPILE([
+ @%:@include <pthread.h>
+ ], [
+ pthread_t thread_id;
+ thread_id = 0;
+ if (!thread_id) return 0;
+ ], [rb_cv_scalar_pthread_t=yes], [rb_cv_scalar_pthread_t=no])
+ ])
+ if test x"$rb_cv_scalar_pthread_t" = xyes; then
+ : # RUBY_CHECK_SIZEOF(pthread_t, [void* int long], [], [@%:@include <pthread.h>])
+ else
+ AC_DEFINE(NON_SCALAR_THREAD_ID)
+ fi
AC_CHECK_FUNCS(sched_yield pthread_attr_setinheritsched \
- pthread_getattr_np pthread_attr_get_np pthread_attr_getstack\
+ pthread_attr_get_np pthread_attr_getstack\
pthread_get_stackaddr_np pthread_get_stacksize_np \
thr_stksegment pthread_stackseg_np pthread_getthrds_np \
pthread_cond_init pthread_condattr_setclock pthread_condattr_init \
- pthread_sigmask pthread_setname_np)
+ pthread_sigmask pthread_setname_np pthread_set_name_np)
+ AS_CASE(["$target_os"],[aix*],[ac_cv_func_pthread_getattr_np=no],[AC_CHECK_FUNCS(pthread_getattr_np)])
if test "${host_os}" = "nacl"; then
ac_cv_func_pthread_attr_init=no
else
AC_CHECK_FUNCS(pthread_attr_init)
fi
+ set_current_thread_name=
if test "$ac_cv_func_pthread_setname_np" = yes; then
AC_CACHE_CHECK([arguments of pthread_setname_np], [rb_cv_func_pthread_setname_np_arguments],
[rb_cv_func_pthread_setname_np_arguments=
@@ -2479,19 +3010,52 @@ if test x"$enable_pthread" = xyes; then
]
)
if test -n "${rb_cv_func_pthread_setname_np_arguments}"; then
- AC_DEFINE_UNQUOTED(SET_THREAD_NAME(name), pthread_setname_np${rb_cv_func_pthread_setname_np_arguments})
- else
- AC_DEFINE_UNQUOTED(SET_THREAD_NAME(name), (void)0)
+ set_current_thread_name="pthread_setname_np${rb_cv_func_pthread_setname_np_arguments}"
fi
+ elif test "$ac_cv_func_pthread_set_name_np" = yes; then
+ set_current_thread_name="pthread_set_name_np(pthread_self(), name)"
fi
+ AS_IF([test -n "$set_current_thread_name"], [
+ AC_DEFINE_UNQUOTED(SET_CURRENT_THREAD_NAME(name), $set_current_thread_name)
+ AS_CASE([$set_current_thread_name],
+ [*'pthread_self()'*], [
+ set_another_thread_name=`echo "$set_current_thread_name" | sed 's/pthread_self()/thid/'`
+ AC_DEFINE_UNQUOTED(SET_ANOTHER_THREAD_NAME(thid,name), $set_another_thread_name)
+ ])
+ ])
fi
-if test x"$ac_cv_header_ucontext_h" = xyes; then
+
+if test x"$ac_cv_header_ucontext_h" = xno; then
+ AC_CACHE_CHECK([if signal.h defines ucontext_t], [rb_cv_ucontext_in_signal_h],
+ [AC_TRY_COMPILE([@%:@include <signal.h>],
+ [size_t size = sizeof(ucontext_t);],
+ [rb_cv_ucontext_in_signal_h=yes], [rb_cv_ucontext_in_signal_h=no])])
+ if test x"$rb_cv_ucontext_in_signal_h" = xyes; then
+ AC_DEFINE_UNQUOTED(UCONTEXT_IN_SIGNAL_H, 1)
+ fi
+fi
+if test x"$ac_cv_header_ucontext_h" = xyes -o x"$rb_cv_ucontext_in_signal_h" = xyes; then
+ AC_CACHE_CHECK([if mcontext_t is a pointer], [rb_cv_mcontext_t_ptr],
+ [AC_TRY_COMPILE([
+ @%:@include <signal.h>
+ @%:@ifdef HAVE_UCONTEXT_H
+ @%:@include <ucontext.h>
+ @%:@endif
+ mcontext_t test(mcontext_t mc) {return mc+1;}
+ ],
+ [test(0);],
+ [rb_cv_mcontext_t_ptr=yes], [rb_cv_mcontext_t_ptr=no])])
+ if test x"$rb_cv_mcontext_t_ptr" = xyes; then
+ AC_DEFINE_UNQUOTED(DEFINE_MCONTEXT_PTR(mc, uc), mcontext_t mc = (uc)->uc_mcontext)
+ else
+ AC_DEFINE_UNQUOTED(DEFINE_MCONTEXT_PTR(mc, uc), mcontext_t *mc = &(uc)->uc_mcontext)
+ fi
if test x"$rb_with_pthread" = xyes; then
AC_CHECK_FUNCS(getcontext setcontext)
fi
fi
-if test "$ac_cv_func_fork" = "yes" -a "$rb_with_pthread" = "yes"; then
+if test "$ac_cv_func_fork_works" = "yes" -a "$rb_with_pthread" = "yes"; then
AC_CACHE_CHECK([if fork works with pthread], rb_cv_fork_with_pthread,
[AC_TRY_RUN([
#include <stdlib.h>
@@ -2575,8 +3139,8 @@ AC_ARG_WITH(dln-a-out,
AC_CACHE_CHECK(whether ELF binaries are produced, rb_cv_binary_elf,
[AC_TRY_LINK([],[], [
-AS_CASE(["`head -1 conftest$EXEEXT | cat -e`"],
-['^?ELF'*], [rb_cv_binary_elf=yes], [rb_cv_binary_elf=no])],
+AS_CASE(["`head -1 conftest$EXEEXT | tr -dc '\177ELF' | tr '\177' .`"],
+[.ELF*], [rb_cv_binary_elf=yes], [rb_cv_binary_elf=no])],
rb_cv_binary_elf=no)])
if test "$rb_cv_binary_elf" = yes; then
@@ -2609,9 +3173,9 @@ AC_SUBST(LDSHAREDXX)dnl
AC_SUBST(DLEXT)dnl
AC_SUBST(DLEXT2)dnl
AC_SUBST(LIBEXT)dnl
+AC_SUBST(ASMEXT, S)dnl
STATIC=
-: ${PATHFLAG=''}
if test "$with_dln_a_out" != yes; then
rb_cv_dlopen=unknown
@@ -2627,7 +3191,7 @@ if test "$with_dln_a_out" != yes; then
# mkmf.rb's have_header() to fail if the desired resource happens to be
# installed in the /usr/local tree.
RUBY_APPEND_OPTION(CCDLFLAGS, -fno-common)],
- [bsdi*|beos*|haiku*|cygwin*|mingw*|aix*|interix*], [ ],
+ [bsdi*|cygwin*|mingw*|aix*|interix*], [ ],
[
RUBY_APPEND_OPTION(CCDLFLAGS, -fPIC)])
else
@@ -2644,20 +3208,14 @@ if test "$with_dln_a_out" != yes; then
AS_HELP_STRING([--enable-rpath], [embed run path into extension libraries.
enabled by default on ELF platforms]),
[enable_rpath=$enableval], [enable_rpath="$rb_cv_binary_elf"])
- if test "$enable_rpath" = yes; then
- RPATHFLAG=" ${linker_flag}-R%1\$-s"
- fi
AS_CASE(["$target_os"],
[hpux*], [ DLDFLAGS="$DLDFLAGS -E"
: ${LDSHARED='$(LD) -b'}
XLDFLAGS="$XLDFLAGS -Wl,-E"
: ${LIBPATHENV=SHLIB_PATH}
- if test "$rb_cv_prog_gnu_ld" = no; then
- RPATHFLAG=' +b %1$-s'
- fi
rb_cv_dlopen=yes],
- [solaris*], [ if test "$GCC" = yes; then
+ [solaris*], [ if test "$GCC" = yes; then
: ${LDSHARED='$(CC) -shared'}
if test "$rb_cv_prog_gnu_ld" = yes; then
LDFLAGS="$LDFLAGS -Wl,-E"
@@ -2667,6 +3225,10 @@ if test "$with_dln_a_out" != yes; then
fi
if test "$ac_cv_sizeof_voidp" = 8; then
: ${LIBPATHENV=LD_LIBRARY_PATH_64}
+ : ${PRELOADENV=LD_PRELOAD_64}
+ else
+ : ${LIBPATHENV=LD_LIBRARY_PATH_32}
+ : ${PRELOADENV=LD_PRELOAD_32}
fi
rb_cv_dlopen=yes],
[sunos*], [ : ${LDSHARED='$(LD) -assert nodefinitions'}
@@ -2684,7 +3246,7 @@ if test "$with_dln_a_out" != yes; then
[bsdi3*], [ AS_CASE(["$CC"],
[*shlicc*], [ : ${LDSHARED='$(CC) -r'}
rb_cv_dlopen=yes])],
- [linux* | gnu* | k*bsd*-gnu | netbsd* | bsdi* | kopensolaris*-gnu], [
+ [linux* | gnu* | k*bsd*-gnu | netbsd* | bsdi* | kopensolaris*-gnu | haiku*], [
: ${LDSHARED='$(CC) -shared'}
if test "$rb_cv_binary_elf" = yes; then
LDFLAGS="$LDFLAGS -Wl,-export-dynamic"
@@ -2709,20 +3271,9 @@ if test "$with_dln_a_out" != yes; then
fi
rb_cv_dlopen=yes],
[darwin*], [ : ${LDSHARED='$(CC) -dynamic -bundle'}
- RUBY_APPEND_OPTIONS(DLDFLAGS, [ \
- "${linker_flag}-undefined${linker_flag:+,}dynamic_lookup" \
- "${linker_flag}-multiply_defined${linker_flag:+,}suppress" \
- ])
: ${LDFLAGS=""}
: ${LIBPATHENV=DYLD_LIBRARY_PATH}
- # /usr/local/include is always searched for
- # some reason, but /usr/local/lib is not.
- hdr=`find /usr/local/include -name \*.h -type f | sed 's:^/usr/local/include/::;q'`
- if test -n "$hdr" && $CC -E -include "$hdr" -xc - </dev/null 2>/dev/null | fgrep -q "$hdr"; then
- $CC -print-search-dirs | grep -q '^libraries:.*:/usr/local/lib/*' ||
- echo " $LDFLAGS " | grep -q ' -L */usr/local/lib/* ' ||
- LDFLAGS="${LDFLAGS:+$LDFLAGS }-L/usr/local/lib"
- fi
+ : ${PRELOADENV=DYLD_INSERT_LIBRARIES}
rb_cv_dlopen=yes],
[aix*], [ : ${LDSHARED='$(CC)'}
LDSHARED="$LDSHARED ${linker_flag}-G"
@@ -2733,33 +3284,7 @@ if test "$with_dln_a_out" != yes; then
TRY_LINK='$(CC) $(LDFLAGS) -oconftest $(INCFLAGS) -I$(hdrdir) $(CPPFLAGS)'
TRY_LINK="$TRY_LINK"' $(CFLAGS) $(src) $(LIBPATH) $(LOCAL_LIBS) $(LIBS)'
: ${LIBPATHENV=LIBPATH}
- RPATHFLAG=" ${linker_flag}-blibpath:%1\$-s:${prefix}/lib:${LIBPATH:-/usr/lib:/lib}"
rb_cv_dlopen=yes],
- [beos*], [ AS_CASE(["$target_cpu"],
- [powerpc*], [
- : ${LDSHARED='$(LD) -xms'}
- EXTDLDFLAGS='-export $(TARGET_ENTRY)'
- DLDFLAGS="$DLDFLAGS -lbe -lroot glue-noinit.a init_term_dyn.o start_dyn.o"
- LDFLAGS="$LDFLAGS -L/boot/home/config/lib -lbe -lroot"
- ],
- [i586*], [
- : ${LDSHARED='$(LD) -shared'}
- DLDFLAGS="$DLDFLAGS -L/boot/develop/lib/x86 -L/boot/home/config/lib \$(topdir)/_APP_ -lroot"
- LDFLAGS="$LDFLAGS -L/boot/develop/lib/x86 -L/boot/home/config/lib -lroot"
- ])
- : ${LIBPATHENV=LIBRARY_PATH}
- rb_cv_dlopen=yes],
- [haiku*], [ AS_CASE(["$target_cpu"],
- [powerpc*], [
- : ${LDSHARED='$(LD) -xms'}
- EXTDLDFLAGS='-export $(TARGET_ENTRY)'
- DLDFLAGS="$DLDFLAGS -lroot glue-noinit.a init_term_dyn.o start_dyn.o"
- ],
- [i586*], [
- : ${LDSHARED='$(CC) -shared'}
- ])
- : ${LIBPATHENV=LIBRARY_PATH}
- rb_cv_dlopen=yes ],
[nto-qnx*], [ DLDFLAGS="$DLDFLAGS -L/lib -L/usr/lib -L/usr/local/lib"
: ${LDSHARED='$(LD) -Bshareable -x'}
LDFLAGS="$LDFLAGS -L/lib -L/usr/lib -L/usr/local/lib"
@@ -2769,15 +3294,36 @@ if test "$with_dln_a_out" != yes; then
XLDFLAGS="$XLDFLAGS -Wl,--stack,0x00200000,--enable-auto-import"
DLDFLAGS="${DLDFLAGS} -Wl,--enable-auto-image-base,--enable-auto-import"
: ${LIBPATHENV=""}
+ : ${PRELOADENV=""}
rb_cv_dlopen=yes],
[hiuxmpp], [ : ${LDSHARED='$(LD) -r'}],
[atheos*], [ : ${LDSHARED='$(CC) -shared'}
rb_cv_dlopen=yes],
- [os2-emx*], [ LDFLAGS="$LDFLAGS -Zomf"
- ],
[nacl], [ LDSHARED='$(CC) -shared' ],
- [ : ${LDSHARED='$(LD)'}])
+ [ : ${LDSHARED='$(LD)'}])
AC_MSG_RESULT($rb_cv_dlopen)
+
+ if test "$rb_cv_dlopen" = yes; then
+ AS_CASE(["$target_os"],
+ [darwin*], [
+ for flag in \
+ "-undefined dynamic_lookup" \
+ "-multiply_defined suppress" \
+ ; do
+ test "x${linker_flag}" = x || flag="${linker_flag}`echo ${flag} | tr ' ' ,`"
+ RUBY_TRY_LDFLAGS([$flag], [], [flag=])
+ if test "x$flag" != x; then
+ RUBY_APPEND_OPTIONS(DLDFLAGS, [$flag])
+ fi
+ done
+ ])
+ fi
+
+ AS_IF([test "$enable_rpath:${RPATHFLAG}" = yes:], [
+ AS_IF([test "x$rpathflag" != x], [
+ RPATHFLAG=" ${rpathflag}%1\$-s"
+ ])
+ ])
fi
if test "${LDSHAREDXX}" = ""; then
AS_CASE(["${LDSHARED}"],
@@ -2799,6 +3345,7 @@ AC_SUBST(LINK_SO)
AC_SUBST(LIBPATHFLAG)
AC_SUBST(RPATHFLAG)
AC_SUBST(LIBPATHENV, "${LIBPATHENV-LD_LIBRARY_PATH}")
+AC_SUBST(PRELOADENV, "${PRELOADENV-LD_PRELOAD}")
AC_SUBST(TRY_LINK)
if test "x$OPT_DIR" != x; then
@@ -2808,19 +3355,29 @@ if test "x$OPT_DIR" != x; then
for dir in $OPT_DIR; do
echo x ${LIBPATHFLAG} ${RPATHFLAG} |
sed "s/^x *//;s${IFS}"'%1\\$-s'"${IFS}${dir}/lib${IFS}g;s${IFS}%s${IFS}${dir}/lib${IFS}g"
- done | tr '\012' ' '`
- test x"${LDFLAGS}" = x || LDFLAGS="$LDFLAGS "
- LDFLAGS="$LDFLAGS$val"
- test x"${DLDFLAGS}" = x || DLDFLAGS="$DLDFLAGS "
- DLDFLAGS="$DLDFLAGS$val"
+ done | tr '\012' ' ' | sed 's/ *$//'`
+ if test x"$val" != x; then
+ test x"${LDFLAGS}" = x || LDFLAGS="$LDFLAGS "
+ LDFLAGS="$LDFLAGS$val"
+ test x"${DLDFLAGS}" = x || DLDFLAGS="$DLDFLAGS "
+ DLDFLAGS="$DLDFLAGS$val"
+ fi
LDFLAGS_OPTDIR="$val"
fi
+AS_CASE(["$target_os"],
+[freebsd*], [
+ AC_CHECK_LIB([procstat], [procstat_open_sysctl])
+ if test "x$ac_cv_lib_procstat_procstat_open_sysctl" = xyes; then
+ AC_CHECK_FUNCS(procstat_getvmmap)
+ fi
+ ])
AS_CASE(["$target_cpu-$target_os"],
[*-darwin*], [
AC_CHECK_HEADERS([execinfo.h])
if test "x$ac_cv_header_execinfo_h" = xyes; then
AC_CHECK_LIB([execinfo], [backtrace])
+ AC_CHECK_HEADERS([libunwind.h])
fi],
[*-freebsd*|x86_64-netbsd*], [
AC_CHECK_HEADERS([execinfo.h])
@@ -2849,24 +3406,25 @@ void sigsegv(int signum, siginfo_t *info, void *ctx){
if (n > 0) {
/*fprintf(stdout, "backtrace:%d\n",n);*/
} else {
- abort();
+ _exit(EXIT_FAILURE);
}
- _exit(0);
+ _exit(EXIT_SUCCESS);
}
int
-main()
+main(void)
{
+ volatile int *a = NULL;
stack_t ss;
ss.ss_sp = malloc(SIGSTKSZ);
if (ss.ss_sp == NULL) {
fprintf(stderr, "cannot allocate memory for sigaltstack\n");
- abort();
+ return EXIT_FAILURE;
}
ss.ss_size = SIGSTKSZ;
ss.ss_flags = 0;
if (sigaltstack(&ss, NULL) == -1) {
fprintf(stderr, "sigaltstack failed\n");
- abort();
+ return EXIT_FAILURE;
}
struct sigaction sa;
memset(&sa, 0, sizeof(struct sigaction));
@@ -2875,9 +3433,8 @@ main()
sa.sa_flags |= SA_SIGINFO;
sa.sa_flags |= SA_ONSTACK;
sigaction(SIGSEGV, &sa, NULL);
- int *a = NULL;
a[0] = 1;
- return 0;
+ return EXIT_SUCCESS;
}
],
rb_cv_broken_backtrace=no,
@@ -2928,9 +3485,6 @@ else
[darwin*], [
RUBY_APPEND_OPTION(XLDFLAGS, [-Wl,-u,_objc_msgSend])
DLEXT=bundle],
- [os2-emx*], [
- LOAD_RELATIVE=1
- DLEXT=dll],
[cygwin*|mingw*|*djgpp*], [
LOAD_RELATIVE=1
DLEXT=so],
@@ -2938,7 +3492,6 @@ else
DLEXT=so])
fi
if test "$rb_cv_dlopen:$load_relative" = yes:yes; then
- AC_CHECK_FUNCS(dladdr)
if test "$ac_cv_func_dladdr" = yes; then
LOAD_RELATIVE=1
fi
@@ -2979,16 +3532,27 @@ EXTSTATIC=
AC_SUBST(EXTSTATIC)dnl
AC_ARG_WITH(static-linked-ext,
AS_HELP_STRING([--with-static-linked-ext], [link external modules statically]),
- [AS_CASE([$withval],[yes],[STATIC=;EXTSTATIC=static])])
-if test x"$EXTSTATIC" = xstatic; then
+ [AS_CASE([$withval],[yes],[STATIC=;EXTSTATIC=static],[no],[],[EXTSTATIC="$withval"])])
+AS_CASE([",$EXTSTATIC,"], [,static,|*,enc,*], [
ENCOBJS='enc/encinit.$(OBJEXT) enc/libenc.$(LIBEXT) enc/libtrans.$(LIBEXT)'
EXTOBJS='ext/extinit.$(OBJEXT)'
AC_DEFINE_UNQUOTED(EXTSTATIC, 1)
-fi
+ AC_SUBST(ENCSTATIC, static)
+], [
+ ENCOBJS='dmyenc.$(OBJEXT)'
+ EXTOBJS='dmyext.$(OBJEXT)'
+])
AC_SUBST(ENCOBJS)
AC_SUBST(EXTOBJS)
-if test -f "$srcdir/ext/Setup.$target_os"; then
+AC_ARG_WITH(setup,
+ AS_HELP_STRING([--with-setup=SETUP], [use extension libraries setup]),
+ [setup=$withval])
+if test -n "$setup"; then
+ if ! test -f "ext/$setup" -o -f "$srcdir/ext/$setup"; then
+ AC_MSG_ERROR(Setup file $setup not found under ext or $srcdir/ext)
+ fi
+elif test -f "$srcdir/ext/Setup.$target_os"; then
setup="Setup.$target_os"
else
setup=
@@ -3042,6 +3606,7 @@ if test x"$cross_compiling" = xyes; then
RUNRUBY_COMMAND='$(MINIRUBY) -I`cd $(srcdir)/lib; pwd`'
RUNRUBY='$(RUNRUBY_COMMAND)'
XRUBY='$(MINIRUBY)'
+ BOOTSTRAPRUBY='$(BASERUBY)'
TEST_RUNNABLE=no
CROSS_COMPILING=yes
@@ -3065,6 +3630,7 @@ else
RUNRUBY_COMMAND='$(MINIRUBY) $(srcdir)/tool/runruby.rb --extout=$(EXTOUT) $(RUNRUBYOPT)'
RUNRUBY='$(RUNRUBY_COMMAND) --'
XRUBY='$(RUNRUBY)'
+ BOOTSTRAPRUBY='$(MINIRUBY)'
TEST_RUNNABLE=yes
CROSS_COMPILING=no
fi
@@ -3076,6 +3642,7 @@ AC_SUBST(PREP)
AC_SUBST(RUNRUBY_COMMAND)
AC_SUBST(RUNRUBY)
AC_SUBST(XRUBY)
+AC_SUBST(BOOTSTRAPRUBY)
AC_SUBST(EXTOUT, [${EXTOUT=.ext}])
FIRSTMAKEFILE=""
@@ -3086,7 +3653,7 @@ LIBRUBYARG='$(LIBRUBYARG_STATIC)'
SOLIBS=
AS_CASE(["$target_os"],
- [cygwin*|mingw*|beos*|haiku*|darwin*|os2-emx*], [
+ [cygwin*|mingw*|haiku*|darwin*], [
: ${DLDLIBS=""}
],
[
@@ -3154,7 +3721,7 @@ AS_CASE("$enable_shared", [yes], [
[sunos4*], [
LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).so'
],
- [linux* | gnu* | k*bsd*-gnu | atheos* | kopensolaris*-gnu], [
+ [linux* | gnu* | k*bsd*-gnu | atheos* | kopensolaris*-gnu | haiku*], [
LIBRUBY_DLDFLAGS='-Wl,-soname,lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR)'" $LDFLAGS_OPTDIR"
LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).so'
if test "$load_relative" = yes; then
@@ -3206,12 +3773,6 @@ AS_CASE("$enable_shared", [yes], [
LIBRUBYARG_SHARED='-L${libdir} -l${RUBY_SO_NAME}'
SOLIBS='-lm -lc'
],
- [beos*], [
- AS_CASE(["$target_cpu"],
- [powerpc*], [
- LIBRUBY_DLDFLAGS="-f ruby.exp -lnet -lbe -lroot glue-noinit.a init_term_dyn.o start_dyn.o $LDFLAGS_OPTDIR"
- ])
- ],
[darwin*], [
RUBY_SO_NAME="$RUBY_SO_NAME"'.$(MAJOR).$(MINOR).$(TEENY)'
LIBRUBY_LDSHARED='$(CC) -dynamiclib'
@@ -3220,10 +3781,11 @@ AS_CASE("$enable_shared", [yes], [
LIBRUBY_RELATIVE=yes
fi
LIBRUBY_DLDFLAGS="$LIBRUBY_DLDFLAGS "'-install_name '${libprefix}'/$(LIBRUBY_SO)'
- LIBRUBY_DLDFLAGS="$LIBRUBY_DLDFLAGS "'-current_version $(MAJOR).$(MINOR).$(TEENY)'
- LIBRUBY_DLDFLAGS="$LIBRUBY_DLDFLAGS "'-compatibility_version $(ruby_version)'
+ LIBRUBY_DLDFLAGS="$LIBRUBY_DLDFLAGS "'-compatibility_version $(MAJOR).$(MINOR)'
+ LIBRUBY_DLDFLAGS="$LIBRUBY_DLDFLAGS "'-current_version $(RUBY_PROGRAM_VERSION)'
if test "$visibility_option" = ld; then
LIBRUBY_DLDFLAGS="$LIBRUBY_DLDFLAGS "'-Wl,-unexported_symbol,_Init_*'
+ LIBRUBY_DLDFLAGS="$LIBRUBY_DLDFLAGS "'-Wl,-unexported_symbol,_ruby_static_id_*'
LIBRUBY_DLDFLAGS="$LIBRUBY_DLDFLAGS "'-Wl,-unexported_symbol,*_threadptr_*'
fi
LIBRUBY_DLDFLAGS="$LIBRUBY_DLDFLAGS "' $(XLDFLAGS)'
@@ -3241,12 +3803,10 @@ AS_CASE("$enable_shared", [yes], [
LIBRUBYARG_SHARED=
# enable PIE if possible
- pie=
+ AC_ARG_ENABLE(pie,
+ AS_HELP_STRING([--disable-pie], [disable PIE feature]),
+ [pie=$enableval], [pie=])
AS_CASE(["$target_os"],
- [haiku], [
- # gcc supports PIE, but doesn't work correctly in Haiku
- pie=no
- ],
[nacl], [
# -pie implies -shared for NaCl.
pie=no
@@ -3274,8 +3834,13 @@ AS_CASE("$enable_shared", [yes], [
])
if test "$enable_rpath" = yes; then
test -z "$LIBRUBY_RPATHFLAGS" || LIBRUBY_RPATHFLAGS="$LIBRUBY_RPATHFLAGS "
- LIBRUBY_RPATHFLAGS="$LIBRUBY_RPATHFLAGS${linker_flag}-R ${linker_flag}${libprefix}"
- test "x$cross_compiling" = xyes || LIBRUBY_RPATHFLAGS="$LIBRUBY_RPATHFLAGS -L${libprefix}"
+ rpathflag="${RPATHFLAG}"
+ AS_CASE(["${cross_compiling}${load_relative}"], [*yes*], [], [rpathflag="$RPATHFLAG$LIBPATHFLAG"])
+ rpathflag=`IFS="$PATH_SEPARATOR"
+ echo x "$rpathflag" |
+ sed "s/^x *//;s${IFS}"'%1\\$-s'"${IFS}${libprefix}${IFS}g;s${IFS}%s${IFS}${libprefix}${IFS}g"
+ `
+ LIBRUBY_RPATHFLAGS="$LIBRUBY_RPATHFLAGS${rpathflag}"
LIBRUBYARG_SHARED="$LIBRUBY_RPATHFLAGS $LIBRUBYARG_SHARED"
LIBRUBYARG_STATIC="$LIBRUBY_RPATHFLAGS $LIBRUBYARG_STATIC"
fi
@@ -3291,6 +3856,15 @@ if test "$EXEEXT" = .exe; then
AC_SUBST(EXECUTABLE_EXTS)
fi
+AS_CASE("$cross_compiling:${LIBPATHENV}", [yes:* | no:], [], [
+ AC_MSG_CHECKING(whether wrapper for $LIBPATHENV is needed)
+ AS_IF([env ${LIBPATHENV}=/lib /bin/sh -c ': ${'${LIBPATHENV}'?}' 2>/dev/null],
+ [AC_MSG_RESULT(no)],
+ [PREP="$PREP"' ruby-runner$(EXEEXT)'
+ AC_MSG_RESULT(yes)]
+ )
+])
+
AC_ARG_ENABLE(dtrace,
AS_HELP_STRING([--enable-dtrace],
[enable DTrace for tracing inside ruby. enabled by default on systems having dtrace]),
@@ -3306,6 +3880,7 @@ if test "${enable_dtrace}" = "auto"; then
fi
LIBRUBY_A_OBJS='$(OBJS)'
+DTRACE_REBUILD=
if test "${enable_dtrace}" = "yes"; then
if test -z "$DTRACE"; then
AC_MSG_ERROR([dtrace(1) is missing])
@@ -3318,9 +3893,11 @@ if test "${enable_dtrace}" = "yes"; then
AC_MSG_ERROR([--enable-dtrace, however, USDT is not available])
fi
RUBY_DTRACE_POSTPROCESS()
- if test "$rb_cv_prog_dtrace_g" = 'yes'; then
+ if test "$rb_cv_prog_dtrace_g" != 'no'; then
DTRACE_OBJ='probes.$(OBJEXT)'
- DTRACE_GLOMMED_OBJ='ruby-glommed.$(OBJEXT)'
+ fi
+ if test "$rb_cv_prog_dtrace_g" = 'rebuild'; then
+ DTRACE_REBUILD=yes
LIBRUBY_A_OBJS='$(DTRACE_GLOMMED_OBJ)'
fi
AS_CASE("${target_os}", [freebsd*], [
@@ -3334,9 +3911,10 @@ else
fi
AC_SUBST(DTRACE_EXT)
AC_SUBST(DTRACE_OBJ)
-AC_SUBST(DTRACE_GLOMMED_OBJ)
+AC_SUBST(DTRACE_REBUILD)
AC_SUBST(LIBRUBY_A_OBJS)
+RUBY_SETJMP_TYPE
}
{ # build section
@@ -3344,14 +3922,14 @@ dnl build rdoc index if requested
RDOCTARGET=""
CAPITARGET=""
AC_ARG_ENABLE(install-doc,
- AS_HELP_STRING([--disable-install-doc], [do not install neither rdoc indexes nor C API documents during install]),
+ AS_HELP_STRING([--disable-install-doc], [do not install either rdoc indexes or C API documents during install]),
[install_doc=$enableval], [install_doc=yes])
AC_ARG_ENABLE(install-rdoc,
AS_HELP_STRING([--disable-install-rdoc], [do not install rdoc indexes during install]),
[install_rdoc=$enableval], [install_rdoc=yes])
AC_ARG_ENABLE(install-capi,
AS_HELP_STRING([--disable-install-capi], [do not install C API documents during install]),
- [install_capi=$enableval], [install_capi=yes])
+ [install_capi=$enableval], [install_capi=no])
if test "$install_doc" != no; then
if test "$install_rdoc" != no; then
@@ -3406,13 +3984,6 @@ AS_CASE(["$target_os"],
RUBY_APPEND_OPTION(XLDFLAGS, [-framework CoreFoundation])
RUBY_APPEND_OPTION(LIBRUBYARG_STATIC, [-framework CoreFoundation])
],
- [os2-emx], [
- AC_LIBOBJ([os2])
- CFLAGS="$CFLAGS -DOS2"
- LIBRUBY_A=`echo $LIBRUBY_A | sed 's/^lib//'`
- LIBRUBY_SO=`echo $LIBRUBY_SO | sed 's/^lib//'`
- LIBRUBY_ALIASES=`for i in $LIBRUBY_ALIASES; do echo "$i"; done | sed 's/^lib//'`
- ],
[osf*], [
if test "$GCC" != "yes" ; then
# compile something small: taint.c is fine for this.
@@ -3428,10 +3999,6 @@ AS_CASE(["$target_os"],
CFLAGS="$CFLAGS -std"
fi
],
- [beos*], [
- AS_CASE(["$target_cpu"],[powerpc*], [CFLAGS="$CFLAGS -relax_pointers"])
- CPPFLAGS="$CPPFLAGS -I/boot/home/config/include"
- ],
[cygwin*|mingw*], [
RUBY_SO_NAME="${RUBY_SO_NAME}"'$(MAJOR)$(MINOR)$(TEENY)'
LIBRUBY_DLDFLAGS="${DLDFLAGS}"' -Wl,--out-implib=$(LIBRUBY)'
@@ -3481,9 +4048,6 @@ AS_CASE(["$target_os"],
FIRSTMAKEFILE=GNUmakefile:nacl/GNUmakefile.in
])
-AS_CASE(["$with_gmp: $SOLIBS "], [no:* | *' -lgmp '*|*' $(LIBS) '*], [],
- [SOLIBS="-lgmp $SOLIBS"])
-
MINIOBJS="$MINIDLNOBJ"
AS_CASE(["$THREAD_MODEL"],
@@ -3562,44 +4126,12 @@ if test "${universal_binary-no}" = yes ; then
mv -f confdefs1.h confdefs.h
AC_MSG_ERROR([failed])
])])
+ AC_CACHE_CHECK(whether __ARCHITECTURE__ is available, rb_cv_architecture_available,
+ AC_TRY_COMPILE([@%:@include <stdio.h>
+ const char arch[[]] = __ARCHITECTURE__;], [puts(arch);],
+ [rb_cv_architecture_available=yes], [rb_cv_architecture_available=no]))
fi
-AC_CHECK_FUNC(memmem, [
- AC_CACHE_CHECK(for broken memmem, rb_cv_broken_memmem, [
- AC_TRY_RUN([
-#include <string.h>
-
-int
-main()
-{
- char *str = "hogefugafoobar";
- char *rs = "foo";
- char *empty = "";
- char *p;
-
- p = memmem(str, strlen(str), rs, strlen(rs));
- if (p == str+8) {
- p = memmem(str, strlen(str), empty, strlen(empty));
- if (p == str)
- return 0;
- else
- return 1;
- }
- else {
- return 1;
- }
-}
- ],
- rb_cv_broken_memmem=no,
- rb_cv_broken_memmem=yes,
- rb_cv_broken_memmem=yes)
- ])
- if test "$rb_cv_broken_memmem" = no; then
- AC_DEFINE(HAVE_MEMMEM, 1)
- fi
-])
-
-
CPPFLAGS="$CPPFLAGS "'$(DEFS)'
test -z "$CPPFLAGS" || CPPFLAGS="$CPPFLAGS "; CPPFLAGS="$CPPFLAGS"'${cppflags}'
if test -n "${cflags+set}"; then
@@ -3724,7 +4256,7 @@ if test ${RUBY_LIB_VERSION_STYLE+set}; then
elif test -z "${ruby_version}"; then
AC_MSG_ERROR([No ruby version, No place for bundled libraries])
else
- RUBY_LIB_VERSION="\"${ruby_version}\""
+ RUBY_LIB_VERSION="${ruby_version}"
fi
AC_SUBST(RUBY_LIB_VERSION_STYLE)
AC_SUBST(RUBY_LIB_VERSION)
@@ -3777,13 +4309,11 @@ AC_SUBST(vendordir)dnl
AC_SUBST(vendorlibdir)dnl
AC_SUBST(vendorarchdir)dnl
+AC_SUBST(CONFIGURE, "`echo $0 | sed 's|.*/||'`")dnl
AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl
if test "${universal_binary-no}" = yes ; then
arch="universal-${target_os}"
- AC_CACHE_CHECK(whether __ARCHITECTURE__ is available, rb_cv_architecture_available,
- AC_TRY_COMPILE([const char arch[] = __ARCHITECTURE__;], [puts(arch);],
- [rb_cv_architecture_available=yes], [rb_cv_architecture_available=no]))
if test "${rb_cv_architecture_available}" = yes; then
AC_DEFINE_UNQUOTED(RUBY_PLATFORM_CPU, __ARCHITECTURE__)
else
@@ -3802,7 +4332,8 @@ if test "${universal_binary-no}" = yes ; then
AC_DEFINE_UNQUOTED(RUBY_PLATFORM, "universal."RUBY_PLATFORM_CPU"-"RUBY_PLATFORM_OS)
else
arch="${target_cpu}-${target_os}"
- AC_DEFINE_UNQUOTED(RUBY_PLATFORM, "${arch}")
+ AS_CASE(["$arch"], [le32-nacl], [arch="pnacl"])
+ AC_DEFINE_UNQUOTED(RUBY_PLATFORM, "$arch")
fi
unset sitearch
@@ -3860,7 +4391,7 @@ AC_ARG_WITH(mantype,
AS_HELP_STRING([--with-mantype=TYPE], [specify man page type; TYPE is one of man and doc]),
[
AS_CASE(["$withval"],
- [man|doc], [MANTYPE=$withval],
+ [man|man.gz|man.bz2|doc|doc.gz|doc.bz2], [MANTYPE=$withval],
[AC_MSG_ERROR(invalid man type: $withval)])
])
if test -z "$MANTYPE"; then
@@ -3894,7 +4425,10 @@ guard=INCLUDE_RUBY_CONFIG_H
grep -v "^#define PACKAGE_" confdefs.h
echo "#endif /* $guard */"
} | tr -d '\015' |
-${srcdir}/tool/ifchange "${config_h}" -
+(
+ if test "x$CONFIGURE_TTY" = xyes; then color=--color; else color=; fi
+ exec ${srcdir}/tool/ifchange $color "${config_h}" -
+) || AC_MSG_ERROR([failed to create ${config_h}])
tr -d '\015' < largefile.h > confdefs.h
rm largefile.h
@@ -3902,7 +4436,7 @@ BUILTIN_ENCS=["`sed -n -e '/^BUILTIN_ENCS[ ]*=/{' \
-e s/// -e :l -e '/\\\\$/N' -e 's/\\\\\\n/ /' -e 't l' -e p \
-e '}' "${srcdir}/enc/Makefile.in"`"]
BUILTIN_ENCOBJS=
-for e in $BUILTIN_ENCS; do BUILTIN_ENCOBJS="$BUILTIN_ENCOBJS `basename $e .c`"'.$(OBJEXT)'; done
+for e in $BUILTIN_ENCS; do BUILTIN_ENCOBJS="$BUILTIN_ENCOBJS "`echo $e | sed 's/\.c$/.$(OBJEXT)/'`; done
AC_SUBST(BUILTIN_ENCOBJS)
BUILTIN_TRANSES=["`sed -n -e '/^BUILTIN_TRANSES[ ]*=/{' \
@@ -3911,15 +4445,15 @@ BUILTIN_TRANSES=["`sed -n -e '/^BUILTIN_TRANSES[ ]*=/{' \
BUILTIN_TRANSSRCS=
BUILTIN_TRANSOBJS=
for e in $BUILTIN_TRANSES; do
- BUILTIN_TRANSSRCS="$BUILTIN_TRANSSRCS `basename $e .trans`"'.c';
- BUILTIN_TRANSOBJS="$BUILTIN_TRANSOBJS `basename $e .trans`"'.$(OBJEXT)';
+ BUILTIN_TRANSSRCS="$BUILTIN_TRANSSRCS "`echo $e | sed 's/\.trans$/.c/'`
+ BUILTIN_TRANSOBJS="$BUILTIN_TRANSOBJS "`echo $e | sed 's/\.trans$/.$(OBJEXT)/'`
done
AC_SUBST(BUILTIN_TRANSSRCS)
AC_SUBST(BUILTIN_TRANSOBJS)
PACKAGE=$RUBY_BASE_NAME
AC_SUBST(PACKAGE)
-AC_MSG_RESULT($PACKAGE library version = $ruby_version)
+AS_MESSAGE([$PACKAGE library version = $ruby_version])
AS_CASE([" $CPP "], [*" $CC "*], [CPP=`echo " $CPP " | sed "s| $CC |"' $(CC) |;s/^ *//;s/ *$//'`])
@@ -3945,6 +4479,7 @@ AC_CONFIG_FILES(Makefile, [
["git svn"], [VCSUP='$(VCS) rebase $(GITSVNREBASEOPTIONS)'],
[git], [VCSUP='$(VCS) pull $(GITPULLOPTIONS)'],
[VCSUP='$(VCS)'])
+ sed -n 's/^@%:@define \(RUBY_RELEASE_DATE\) "\(.*\)"/\1 = \2/p' "$srcdir/version.h"
sed '/^MISSING/s/\$U\././g;/^VCS *=/s#@VCS@#'"$VCS"'#;/^VCSUP *=/s#@VCSUP@#'"$VCSUP"'#' Makefile
echo; test x"$EXEEXT" = x || echo 'miniruby: miniruby$(EXEEXT)'
if test "$gnumake" != yes; then
@@ -3970,12 +4505,17 @@ AC_CONFIG_FILES(Makefile, [
[EXEEXT='$EXEEXT' gnumake='$gnumake'])
AC_ARG_WITH([ruby-pc],
- AC_HELP_STRING([pc file basename]),
+ AC_HELP_STRING([--with-ruby-pc=FILENAME], [pc file basename]),
[ruby_pc="$withval"],
[ruby_pc="${RUBY_BASE_NAME}-${MAJOR}.${MINOR}.pc"])
AC_SUBST(ruby_pc)
AC_SUBST(exec, [exec])
+AC_ARG_WITH(destdir,
+ AS_HELP_STRING([--with-destdir=DESTDIR], [specify default directory to install]),
+ [DESTDIR="$withval"])
+AC_SUBST(DESTDIR)
+
AC_CONFIG_FILES($ruby_pc:template/ruby.pc.in,
[
if sed ['s/\$(\([A-Za-z_][A-Za-z0-9_]*\))/${\1}/g;s/@[A-Za-z_][A-Za-z0-9_]*@//'] $ruby_pc > ruby.tmp.pc &&
diff --git a/constant.h b/constant.h
index 3dc9b8d4ef..23d17ac24c 100644
--- a/constant.h
+++ b/constant.h
@@ -12,19 +12,32 @@
#define CONSTANT_H
typedef enum {
+ CONST_DEPRECATED = 0x100,
+
+ CONST_VISIBILITY_MASK = 0xff,
CONST_PUBLIC = 0x00,
- CONST_PRIVATE = 0x01
+ CONST_PRIVATE,
+ CONST_VISIBILITY_MAX
} rb_const_flag_t;
+#define RB_CONST_PRIVATE_P(ce) \
+ (((ce)->flag & CONST_VISIBILITY_MASK) == CONST_PRIVATE)
+#define RB_CONST_PUBLIC_P(ce) \
+ (((ce)->flag & CONST_VISIBILITY_MASK) == CONST_PUBLIC)
+
+#define RB_CONST_DEPRECATED_P(ce) \
+ ((ce)->flag & CONST_DEPRECATED)
+
typedef struct rb_const_entry_struct {
rb_const_flag_t flag;
+ int line;
const VALUE value; /* should be mark */
const VALUE file; /* should be mark */
- int line;
} rb_const_entry_t;
-VALUE rb_mod_private_constant(int argc, VALUE *argv, VALUE obj);
-VALUE rb_mod_public_constant(int argc, VALUE *argv, VALUE obj);
+VALUE rb_mod_private_constant(int argc, const VALUE *argv, VALUE obj);
+VALUE rb_mod_public_constant(int argc, const VALUE *argv, VALUE obj);
+VALUE rb_mod_deprecate_constant(int argc, const VALUE *argv, VALUE obj);
void rb_free_const_table(st_table *tbl);
VALUE rb_public_const_get(VALUE klass, ID id);
VALUE rb_public_const_get_at(VALUE klass, ID id);
@@ -32,5 +45,6 @@ VALUE rb_public_const_get_from(VALUE klass, ID id);
int rb_public_const_defined(VALUE klass, ID id);
int rb_public_const_defined_at(VALUE klass, ID id);
int rb_public_const_defined_from(VALUE klass, ID id);
+rb_const_entry_t *rb_const_lookup(VALUE klass, ID id);
#endif /* CONSTANT_H */
diff --git a/cont.c b/cont.c
index fa9e91ee64..b2e48c6202 100644
--- a/cont.c
+++ b/cont.c
@@ -9,7 +9,6 @@
**********************************************************************/
-#include "ruby/ruby.h"
#include "internal.h"
#include "vm_core.h"
#include "gc.h"
@@ -89,24 +88,26 @@ enum context_type {
typedef struct rb_context_struct {
enum context_type type;
- VALUE self;
int argc;
+ VALUE self;
VALUE value;
VALUE *vm_stack;
#ifdef CAPTURE_JUST_VALID_VM_STACK
size_t vm_stack_slen; /* length of stack (head of th->stack) */
size_t vm_stack_clen; /* length of control frames (tail of th->stack) */
#endif
- VALUE *machine_stack;
- VALUE *machine_stack_src;
+ struct {
+ VALUE *stack;
+ VALUE *stack_src;
+ size_t stack_size;
#ifdef __ia64
- VALUE *machine_register_stack;
- VALUE *machine_register_stack_src;
- int machine_register_stack_size;
+ VALUE *register_stack;
+ VALUE *register_stack_src;
+ int register_stack_size;
#endif
- rb_thread_t saved_thread;
+ } machine;
+ rb_thread_t saved_thread; /* selected properties of GET_THREAD() (see cont_save_thread) */
rb_jmpbuf_t jmpbuf;
- size_t machine_stack_size;
rb_ensure_entry_t *ensure_array;
rb_ensure_list_t *ensure_list;
} rb_context_t;
@@ -128,26 +129,30 @@ static machine_stack_cache_t machine_stack_cache[MAX_MACHINE_STACK_CACHE];
static machine_stack_cache_t terminated_machine_stack;
#endif
-typedef struct rb_fiber_struct {
+struct rb_fiber_struct {
rb_context_t cont;
- VALUE prev;
+ struct rb_fiber_struct *prev;
enum fiber_status status;
- struct rb_fiber_struct *prev_fiber;
- struct rb_fiber_struct *next_fiber;
/* If a fiber invokes "transfer",
* then this fiber can't "resume" any more after that.
* You shouldn't mix "transfer" and "resume".
*/
- int transfered;
+ int transferred;
#if FIBER_USE_NATIVE
#ifdef _WIN32
void *fib_handle;
#else
ucontext_t context;
+ /* Because context.uc_stack.ss_sp and context.uc_stack.ss_size
+ * are not necessarily valid after makecontext() or swapcontext(),
+ * they are saved in these variables for later use.
+ */
+ void *ss_sp;
+ size_t ss_size;
#endif
#endif
-} rb_fiber_t;
+};
static const rb_data_type_t cont_data_type, fiber_data_type;
static VALUE rb_cContinuation;
@@ -162,7 +167,7 @@ static VALUE rb_eFiberError;
if (!(ptr)) rb_raise(rb_eFiberError, "uninitialized fiber"); \
} while (0)
-NOINLINE(static VALUE cont_capture(volatile int *stat));
+NOINLINE(static VALUE cont_capture(volatile int *volatile stat));
#define THREAD_MUST_BE_RUNNING(th) do { \
if (!(th)->tag) rb_raise(rb_eThreadError, "not running thread"); \
@@ -183,32 +188,32 @@ cont_mark(void *ptr)
rb_gc_mark_locations(cont->vm_stack,
cont->vm_stack + cont->vm_stack_slen + cont->vm_stack_clen);
#else
- rb_gc_mark_localtion(cont->vm_stack,
+ rb_gc_mark_locations(cont->vm_stack,
cont->vm_stack, cont->saved_thread.stack_size);
#endif
}
- if (cont->machine_stack) {
+ if (cont->machine.stack) {
if (cont->type == CONTINUATION_CONTEXT) {
/* cont */
- rb_gc_mark_locations(cont->machine_stack,
- cont->machine_stack + cont->machine_stack_size);
+ rb_gc_mark_locations(cont->machine.stack,
+ cont->machine.stack + cont->machine.stack_size);
}
else {
/* fiber */
rb_thread_t *th;
rb_fiber_t *fib = (rb_fiber_t*)cont;
GetThreadPtr(cont->saved_thread.self, th);
- if ((th->fiber != cont->self) && fib->status == RUNNING) {
- rb_gc_mark_locations(cont->machine_stack,
- cont->machine_stack + cont->machine_stack_size);
+ if ((th->fiber != fib) && fib->status == RUNNING) {
+ rb_gc_mark_locations(cont->machine.stack,
+ cont->machine.stack + cont->machine.stack_size);
}
}
}
#ifdef __ia64
- if (cont->machine_register_stack) {
- rb_gc_mark_locations(cont->machine_register_stack,
- cont->machine_register_stack + cont->machine_register_stack_size);
+ if (cont->machine.register_stack) {
+ rb_gc_mark_locations(cont->machine.register_stack,
+ cont->machine.register_stack + cont->machine.register_stack_size);
}
#endif
}
@@ -221,31 +226,31 @@ cont_free(void *ptr)
RUBY_FREE_ENTER("cont");
if (ptr) {
rb_context_t *cont = ptr;
- RUBY_FREE_UNLESS_NULL(cont->saved_thread.stack); fflush(stdout);
+ RUBY_FREE_UNLESS_NULL(cont->saved_thread.stack);
#if FIBER_USE_NATIVE
if (cont->type == CONTINUATION_CONTEXT) {
/* cont */
ruby_xfree(cont->ensure_array);
- RUBY_FREE_UNLESS_NULL(cont->machine_stack);
+ RUBY_FREE_UNLESS_NULL(cont->machine.stack);
}
else {
/* fiber */
+ rb_fiber_t *fib = (rb_fiber_t*)cont;
+ const rb_thread_t *const th = GET_THREAD();
#ifdef _WIN32
- if (GET_THREAD()->fiber != cont->self && cont->type != ROOT_FIBER_CONTEXT) {
+ if (th && th->fiber != fib && cont->type != ROOT_FIBER_CONTEXT) {
/* don't delete root fiber handle */
- rb_fiber_t *fib = (rb_fiber_t*)cont;
if (fib->fib_handle) {
DeleteFiber(fib->fib_handle);
}
}
#else /* not WIN32 */
- if (GET_THREAD()->fiber != cont->self) {
- rb_fiber_t *fib = (rb_fiber_t*)cont;
- if (fib->context.uc_stack.ss_sp) {
+ if (th && th->fiber != fib) {
+ if (fib->ss_sp) {
if (cont->type == ROOT_FIBER_CONTEXT) {
rb_bug("Illegal root fiber parameter");
}
- munmap((void*)fib->context.uc_stack.ss_sp, fib->context.uc_stack.ss_size);
+ munmap((void*)fib->ss_sp, fib->ss_size);
}
}
else {
@@ -257,10 +262,10 @@ cont_free(void *ptr)
}
#else /* not FIBER_USE_NATIVE */
ruby_xfree(cont->ensure_array);
- RUBY_FREE_UNLESS_NULL(cont->machine_stack);
+ RUBY_FREE_UNLESS_NULL(cont->machine.stack);
#endif
#ifdef __ia64
- RUBY_FREE_UNLESS_NULL(cont->machine_register_stack);
+ RUBY_FREE_UNLESS_NULL(cont->machine.register_stack);
#endif
RUBY_FREE_UNLESS_NULL(cont->vm_stack);
@@ -275,63 +280,48 @@ cont_memsize(const void *ptr)
{
const rb_context_t *cont = ptr;
size_t size = 0;
- if (cont) {
- size = sizeof(*cont);
- if (cont->vm_stack) {
+
+ size = sizeof(*cont);
+ if (cont->vm_stack) {
#ifdef CAPTURE_JUST_VALID_VM_STACK
- size_t n = (cont->vm_stack_slen + cont->vm_stack_clen);
+ size_t n = (cont->vm_stack_slen + cont->vm_stack_clen);
#else
- size_t n = cont->saved_thread.stack_size;
+ size_t n = cont->saved_thread.stack_size;
#endif
- size += n * sizeof(*cont->vm_stack);
- }
+ size += n * sizeof(*cont->vm_stack);
+ }
- if (cont->machine_stack) {
- size += cont->machine_stack_size * sizeof(*cont->machine_stack);
- }
+ if (cont->machine.stack) {
+ size += cont->machine.stack_size * sizeof(*cont->machine.stack);
+ }
#ifdef __ia64
- if (cont->machine_register_stack) {
- size += cont->machine_register_stack_size * sizeof(*cont->machine_register_stack);
- }
-#endif
+ if (cont->machine.register_stack) {
+ size += cont->machine.register_stack_size * sizeof(*cont->machine.register_stack);
}
+#endif
return size;
}
+void
+rb_fiber_mark_self(rb_fiber_t *fib)
+{
+ if (fib)
+ rb_gc_mark(fib->cont.self);
+}
+
static void
fiber_mark(void *ptr)
{
RUBY_MARK_ENTER("cont");
if (ptr) {
rb_fiber_t *fib = ptr;
- rb_gc_mark(fib->prev);
+ rb_fiber_mark_self(fib->prev);
cont_mark(&fib->cont);
}
RUBY_MARK_LEAVE("cont");
}
static void
-fiber_link_join(rb_fiber_t *fib)
-{
- VALUE current_fibval = rb_fiber_current();
- rb_fiber_t *current_fib;
- GetFiberPtr(current_fibval, current_fib);
-
- /* join fiber link */
- fib->next_fiber = current_fib->next_fiber;
- fib->prev_fiber = current_fib;
- current_fib->next_fiber->prev_fiber = fib;
- current_fib->next_fiber = fib;
-}
-
-static void
-fiber_link_remove(rb_fiber_t *fib)
-{
- fib->prev_fiber->next_fiber = fib->next_fiber;
- fib->next_fiber->prev_fiber = fib->prev_fiber;
-}
-
-static void
fiber_free(void *ptr)
{
RUBY_FREE_ENTER("fiber");
@@ -341,7 +331,6 @@ fiber_free(void *ptr)
fib->cont.saved_thread.local_storage) {
st_free_table(fib->cont.saved_thread.local_storage);
}
- fiber_link_remove(fib);
cont_free(&fib->cont);
}
@@ -353,14 +342,13 @@ fiber_memsize(const void *ptr)
{
const rb_fiber_t *fib = ptr;
size_t size = 0;
- if (ptr) {
- size = sizeof(*fib);
- if (fib->cont.type != ROOT_FIBER_CONTEXT &&
- fib->cont.saved_thread.local_storage != NULL) {
- size += st_memsize(fib->cont.saved_thread.local_storage);
- }
- size += cont_memsize(&fib->cont);
+
+ size = sizeof(*fib);
+ if (fib->cont.type != ROOT_FIBER_CONTEXT &&
+ fib->cont.saved_thread.local_storage != NULL) {
+ size += st_memsize(fib->cont.saved_thread.local_storage);
}
+ size += cont_memsize(&fib->cont);
return size;
}
@@ -380,63 +368,82 @@ cont_save_machine_stack(rb_thread_t *th, rb_context_t *cont)
{
size_t size;
- SET_MACHINE_STACK_END(&th->machine_stack_end);
+ SET_MACHINE_STACK_END(&th->machine.stack_end);
#ifdef __ia64
- th->machine_register_stack_end = rb_ia64_bsp();
+ th->machine.register_stack_end = rb_ia64_bsp();
#endif
- if (th->machine_stack_start > th->machine_stack_end) {
- size = cont->machine_stack_size = th->machine_stack_start - th->machine_stack_end;
- cont->machine_stack_src = th->machine_stack_end;
+ if (th->machine.stack_start > th->machine.stack_end) {
+ size = cont->machine.stack_size = th->machine.stack_start - th->machine.stack_end;
+ cont->machine.stack_src = th->machine.stack_end;
}
else {
- size = cont->machine_stack_size = th->machine_stack_end - th->machine_stack_start;
- cont->machine_stack_src = th->machine_stack_start;
+ size = cont->machine.stack_size = th->machine.stack_end - th->machine.stack_start;
+ cont->machine.stack_src = th->machine.stack_start;
}
- if (cont->machine_stack) {
- REALLOC_N(cont->machine_stack, VALUE, size);
+ if (cont->machine.stack) {
+ REALLOC_N(cont->machine.stack, VALUE, size);
}
else {
- cont->machine_stack = ALLOC_N(VALUE, size);
+ cont->machine.stack = ALLOC_N(VALUE, size);
}
FLUSH_REGISTER_WINDOWS;
- MEMCPY(cont->machine_stack, cont->machine_stack_src, VALUE, size);
+ MEMCPY(cont->machine.stack, cont->machine.stack_src, VALUE, size);
#ifdef __ia64
rb_ia64_flushrs();
- size = cont->machine_register_stack_size = th->machine_register_stack_end - th->machine_register_stack_start;
- cont->machine_register_stack_src = th->machine_register_stack_start;
- if (cont->machine_register_stack) {
- REALLOC_N(cont->machine_register_stack, VALUE, size);
+ size = cont->machine.register_stack_size = th->machine.register_stack_end - th->machine.register_stack_start;
+ cont->machine.register_stack_src = th->machine.register_stack_start;
+ if (cont->machine.register_stack) {
+ REALLOC_N(cont->machine.register_stack, VALUE, size);
}
else {
- cont->machine_register_stack = ALLOC_N(VALUE, size);
+ cont->machine.register_stack = ALLOC_N(VALUE, size);
}
- MEMCPY(cont->machine_register_stack, cont->machine_register_stack_src, VALUE, size);
+ MEMCPY(cont->machine.register_stack, cont->machine.register_stack_src, VALUE, size);
#endif
}
static const rb_data_type_t cont_data_type = {
"continuation",
{cont_mark, cont_free, cont_memsize,},
- NULL, NULL, RUBY_TYPED_FREE_IMMEDIATELY
+ 0, 0, RUBY_TYPED_FREE_IMMEDIATELY
};
-static void
+static inline void
cont_save_thread(rb_context_t *cont, rb_thread_t *th)
{
+ rb_thread_t *sth = &cont->saved_thread;
+
/* save thread context */
- cont->saved_thread = *th;
- /* saved_thread->machine_stack_(start|end) should be NULL */
+ sth->stack = th->stack;
+ sth->stack_size = th->stack_size;
+ sth->local_storage = th->local_storage;
+ sth->cfp = th->cfp;
+ sth->safe_level = th->safe_level;
+ sth->raised_flag = th->raised_flag;
+ sth->state = th->state;
+ sth->status = th->status;
+ sth->tag = th->tag;
+ sth->protect_tag = th->protect_tag;
+ sth->errinfo = th->errinfo;
+ sth->first_proc = th->first_proc;
+ sth->root_lep = th->root_lep;
+ sth->root_svar = th->root_svar;
+ sth->ensure_list = th->ensure_list;
+
+ sth->trace_arg = th->trace_arg;
+
+ /* saved_thread->machine.stack_(start|end) should be NULL */
/* because it may happen GC afterward */
- cont->saved_thread.machine_stack_start = 0;
- cont->saved_thread.machine_stack_end = 0;
+ sth->machine.stack_start = 0;
+ sth->machine.stack_end = 0;
#ifdef __ia64
- cont->saved_thread.machine_register_stack_start = 0;
- cont->saved_thread.machine_register_stack_end = 0;
+ sth->machine.register_stack_start = 0;
+ sth->machine.register_stack_end = 0;
#endif
}
@@ -445,7 +452,12 @@ cont_init(rb_context_t *cont, rb_thread_t *th)
{
/* save thread context */
cont_save_thread(cont, th);
+ cont->saved_thread.self = th->self;
+ cont->saved_thread.machine.stack_maxsize = th->machine.stack_maxsize;
+ cont->saved_thread.fiber = th->fiber;
cont->saved_thread.local_storage = 0;
+ cont->saved_thread.local_storage_recursive_hash = Qnil;
+ cont->saved_thread.local_storage_recursive_hash_for_trace = Qnil;
}
static rb_context_t *
@@ -463,20 +475,19 @@ cont_new(VALUE klass)
}
static VALUE
-cont_capture(volatile int *stat)
+cont_capture(volatile int *volatile stat)
{
- rb_context_t *cont;
- rb_thread_t *th = GET_THREAD(), *sth;
+ rb_context_t *volatile cont;
+ rb_thread_t *th = GET_THREAD();
volatile VALUE contval;
THREAD_MUST_BE_RUNNING(th);
rb_vm_stack_to_heap(th);
cont = cont_new(rb_cContinuation);
contval = cont->self;
- sth = &cont->saved_thread;
#ifdef CAPTURE_JUST_VALID_VM_STACK
- cont->vm_stack_slen = th->cfp->sp + th->mark_stack_len - th->stack;
+ cont->vm_stack_slen = th->cfp->sp - th->stack;
cont->vm_stack_clen = th->stack + th->stack_size - (VALUE*)th->cfp;
cont->vm_stack = ALLOC_N(VALUE, cont->vm_stack_slen + cont->vm_stack_clen);
MEMCPY(cont->vm_stack, th->stack, VALUE, cont->vm_stack_slen);
@@ -485,7 +496,7 @@ cont_capture(volatile int *stat)
cont->vm_stack = ALLOC_N(VALUE, th->stack_size);
MEMCPY(cont->vm_stack, th->stack, VALUE, th->stack_size);
#endif
- sth->stack = 0;
+ cont->saved_thread.stack = 0;
cont_save_machine_stack(th, cont);
@@ -506,8 +517,9 @@ cont_capture(volatile int *stat)
}
if (ruby_setjmp(cont->jmpbuf)) {
- volatile VALUE value;
+ VALUE value;
+ VAR_INITIALIZED(cont);
value = cont->value;
if (cont->argc == -1) rb_exc_raise(value);
cont->value = Qnil;
@@ -520,7 +532,7 @@ cont_capture(volatile int *stat)
}
}
-static void
+static inline void
cont_restore_thread(rb_context_t *cont)
{
rb_thread_t *th = GET_THREAD(), *sth = &cont->saved_thread;
@@ -528,16 +540,14 @@ cont_restore_thread(rb_context_t *cont)
/* restore thread context */
if (cont->type == CONTINUATION_CONTEXT) {
/* continuation */
- VALUE fib;
+ rb_fiber_t *fib;
th->fiber = sth->fiber;
fib = th->fiber ? th->fiber : th->root_fiber;
if (fib) {
- rb_fiber_t *fcont;
- GetFiberPtr(fib, fcont);
- th->stack_size = fcont->cont.saved_thread.stack_size;
- th->stack = fcont->cont.saved_thread.stack;
+ th->stack_size = fib->cont.saved_thread.stack_size;
+ th->stack = fib->cont.saved_thread.stack;
}
#ifdef CAPTURE_JUST_VALID_VM_STACK
MEMCPY(th->stack, cont->vm_stack, VALUE, cont->vm_stack_slen);
@@ -552,7 +562,9 @@ cont_restore_thread(rb_context_t *cont)
th->stack = sth->stack;
th->stack_size = sth->stack_size;
th->local_storage = sth->local_storage;
- th->fiber = cont->self;
+ th->local_storage_recursive_hash = sth->local_storage_recursive_hash;
+ th->local_storage_recursive_hash_for_trace = sth->local_storage_recursive_hash_for_trace;
+ th->fiber = (rb_fiber_t*)cont;
}
th->cfp = sth->cfp;
@@ -579,7 +591,7 @@ fiber_set_stack_location(void)
VALUE *ptr;
SET_MACHINE_STACK_END(&ptr);
- th->machine_stack_start = (void*)(((VALUE)ptr & RB_PAGE_MASK) + STACK_UPPER((void *)&ptr, 0, RB_PAGE_SIZE));
+ th->machine.stack_start = (void*)(((VALUE)ptr & RB_PAGE_MASK) + STACK_UPPER((void *)&ptr, 0, RB_PAGE_SIZE));
}
static VOID CALLBACK
@@ -645,6 +657,10 @@ fiber_initialize_machine_stack_context(rb_fiber_t *fib, size_t size)
rb_thread_t *sth = &fib->cont.saved_thread;
#ifdef _WIN32
+# if defined(_MSC_VER) && _MSC_VER <= 1200
+# define CreateFiberEx(cs, stacksize, flags, entry, param) \
+ CreateFiber((stacksize), (entry), (param))
+# endif
fib->fib_handle = CreateFiberEx(size - 1, size, 0, fiber_entry, NULL);
if (!fib->fib_handle) {
/* try to release unnecessary fibers & retry to create */
@@ -654,7 +670,7 @@ fiber_initialize_machine_stack_context(rb_fiber_t *fib, size_t size)
rb_raise(rb_eFiberError, "can't create fiber");
}
}
- sth->machine_stack_maxsize = size;
+ sth->machine.stack_maxsize = size;
#else /* not WIN32 */
ucontext_t *context = &fib->context;
char *ptr;
@@ -665,12 +681,14 @@ fiber_initialize_machine_stack_context(rb_fiber_t *fib, size_t size)
context->uc_link = NULL;
context->uc_stack.ss_sp = ptr;
context->uc_stack.ss_size = size;
+ fib->ss_sp = ptr;
+ fib->ss_size = size;
makecontext(context, rb_fiber_start, 0);
- sth->machine_stack_start = (VALUE*)(ptr + STACK_DIR_UPPER(0, size));
- sth->machine_stack_maxsize = size - RB_PAGE_SIZE;
+ sth->machine.stack_start = (VALUE*)(ptr + STACK_DIR_UPPER(0, size));
+ sth->machine.stack_maxsize = size - RB_PAGE_SIZE;
#endif
#ifdef __ia64
- sth->machine_register_stack_maxsize = sth->machine_stack_maxsize;
+ sth->machine.register_stack_maxsize = sth->machine.stack_maxsize;
#endif
}
@@ -687,31 +705,31 @@ fiber_setcontext(rb_fiber_t *newfib, rb_fiber_t *oldfib)
/* restore thread context */
cont_restore_thread(&newfib->cont);
- th->machine_stack_maxsize = sth->machine_stack_maxsize;
- if (sth->machine_stack_end && (newfib != oldfib)) {
- rb_bug("fiber_setcontext: sth->machine_stack_end has non zero value");
+ th->machine.stack_maxsize = sth->machine.stack_maxsize;
+ if (sth->machine.stack_end && (newfib != oldfib)) {
+ rb_bug("fiber_setcontext: sth->machine.stack_end has non zero value");
}
/* save oldfib's machine stack */
if (oldfib->status != TERMINATED) {
STACK_GROW_DIR_DETECTION;
- SET_MACHINE_STACK_END(&th->machine_stack_end);
+ SET_MACHINE_STACK_END(&th->machine.stack_end);
if (STACK_DIR_UPPER(0, 1)) {
- oldfib->cont.machine_stack_size = th->machine_stack_start - th->machine_stack_end;
- oldfib->cont.machine_stack = th->machine_stack_end;
+ oldfib->cont.machine.stack_size = th->machine.stack_start - th->machine.stack_end;
+ oldfib->cont.machine.stack = th->machine.stack_end;
}
else {
- oldfib->cont.machine_stack_size = th->machine_stack_end - th->machine_stack_start;
- oldfib->cont.machine_stack = th->machine_stack_start;
+ oldfib->cont.machine.stack_size = th->machine.stack_end - th->machine.stack_start;
+ oldfib->cont.machine.stack = th->machine.stack_start;
}
}
/* exchange machine_stack_start between oldfib and newfib */
- oldfib->cont.saved_thread.machine_stack_start = th->machine_stack_start;
- th->machine_stack_start = sth->machine_stack_start;
- /* oldfib->machine_stack_end should be NULL */
- oldfib->cont.saved_thread.machine_stack_end = 0;
+ oldfib->cont.saved_thread.machine.stack_start = th->machine.stack_start;
+ th->machine.stack_start = sth->machine.stack_start;
+ /* oldfib->machine.stack_end should be NULL */
+ oldfib->cont.saved_thread.machine.stack_end = 0;
#ifndef _WIN32
- if (!newfib->context.uc_stack.ss_sp && th->root_fiber != newfib->cont.self) {
+ if (!newfib->context.uc_stack.ss_sp && th->root_fiber != newfib) {
rb_bug("non_root_fiber->context.uc_stac.ss_sp should not be NULL");
}
#endif
@@ -742,16 +760,16 @@ cont_restore_1(rb_context_t *cont)
((_JUMP_BUFFER*)(&buf))->Frame;
}
#endif
- if (cont->machine_stack_src) {
+ if (cont->machine.stack_src) {
FLUSH_REGISTER_WINDOWS;
- MEMCPY(cont->machine_stack_src, cont->machine_stack,
- VALUE, cont->machine_stack_size);
+ MEMCPY(cont->machine.stack_src, cont->machine.stack,
+ VALUE, cont->machine.stack_size);
}
#ifdef __ia64
- if (cont->machine_register_stack_src) {
- MEMCPY(cont->machine_register_stack_src, cont->machine_register_stack,
- VALUE, cont->machine_register_stack_size);
+ if (cont->machine.register_stack_src) {
+ MEMCPY(cont->machine.register_stack_src, cont->machine.register_stack,
+ VALUE, cont->machine.register_stack_size);
}
#endif
@@ -786,7 +804,7 @@ register_stack_extend(rb_context_t *cont, VALUE *vp, VALUE *curr_bsp)
E(k) = E(l) = E(m) = E(n) = E(o) =
E(p) = E(q) = E(r) = E(s) = E(t) = 0;
}
- if (curr_bsp < cont->machine_register_stack_src+cont->machine_register_stack_size) {
+ if (curr_bsp < cont->machine.register_stack_src+cont->machine.register_stack_size) {
register_stack_extend(cont, vp, (VALUE*)rb_ia64_bsp());
}
cont_restore_0(cont, vp);
@@ -798,7 +816,7 @@ register_stack_extend(rb_context_t *cont, VALUE *vp, VALUE *curr_bsp)
static void
cont_restore_0(rb_context_t *cont, VALUE *addr_in_prev_frame)
{
- if (cont->machine_stack_src) {
+ if (cont->machine.stack_src) {
#ifdef HAVE_ALLOCA
#define STACK_PAD_SIZE 1
#else
@@ -811,7 +829,7 @@ cont_restore_0(rb_context_t *cont, VALUE *addr_in_prev_frame)
/* Stack grows downward */
#endif
#if STACK_GROW_DIRECTION <= 0
- volatile VALUE *const end = cont->machine_stack_src;
+ volatile VALUE *const end = cont->machine.stack_src;
if (&space[0] > end) {
# ifdef HAVE_ALLOCA
volatile VALUE *sp = ALLOCA_N(VALUE, &space[0] - end);
@@ -827,7 +845,7 @@ cont_restore_0(rb_context_t *cont, VALUE *addr_in_prev_frame)
/* Stack grows upward */
#endif
#if STACK_GROW_DIRECTION >= 0
- volatile VALUE *const end = cont->machine_stack_src + cont->machine_stack_size;
+ volatile VALUE *const end = cont->machine.stack_src + cont->machine.stack_size;
if (&space[STACK_PAD_SIZE] < end) {
# ifdef HAVE_ALLOCA
volatile VALUE *sp = ALLOCA_N(VALUE, end - &space[STACK_PAD_SIZE]);
@@ -873,6 +891,24 @@ cont_restore_0(rb_context_t *cont, VALUE *addr_in_prev_frame)
* Ron
* Max
*
+ * Also you can call callcc in other methods:
+ *
+ * require "continuation"
+ *
+ * def g
+ * arr = [ "Freddie", "Herbie", "Ron", "Max", "Ringo" ]
+ * cc = callcc { |cc| cc }
+ * puts arr.shift
+ * return cc, arr.size
+ * end
+ *
+ * def f
+ * c, size = g
+ * c.call(c) if size > 1
+ * end
+ *
+ * f
+ *
* This (somewhat contrived) example allows the inner loop to abandon
* processing early:
*
@@ -927,7 +963,7 @@ rb_callcc(VALUE self)
}
static VALUE
-make_passing_arg(int argc, VALUE *argv)
+make_passing_arg(int argc, const VALUE *argv)
{
switch (argc) {
case 0:
@@ -1043,9 +1079,6 @@ rb_cont_call(int argc, VALUE *argv, VALUE contval)
rb_raise(rb_eRuntimeError, "continuation called across stack rewinding barrier");
}
if (cont->saved_thread.fiber) {
- rb_fiber_t *fcont;
- GetFiberPtr(cont->saved_thread.fiber, fcont);
-
if (th->fiber != cont->saved_thread.fiber) {
rb_raise(rb_eRuntimeError, "continuation called across fiber");
}
@@ -1079,7 +1112,7 @@ rb_cont_call(int argc, VALUE *argv, VALUE contval)
* comes with a small 4KB stack. This enables the fiber to be paused from deeply
* nested function calls within the fiber block.
*
- * When a fiber is created it will not run automatically. Rather it must be
+ * When a fiber is created it will not run automatically. Rather it must
* be explicitly asked to run using the <code>Fiber#resume</code> method.
* The code running inside the fiber can give up control by calling
* <code>Fiber.yield</code> in which case it yields control back to caller
@@ -1131,7 +1164,7 @@ rb_cont_call(int argc, VALUE *argv, VALUE contval)
static const rb_data_type_t fiber_data_type = {
"fiber",
{fiber_mark, fiber_free, fiber_memsize,},
- NULL, NULL, RUBY_TYPED_FREE_IMMEDIATELY
+ 0, 0, RUBY_TYPED_FREE_IMMEDIATELY
};
static VALUE
@@ -1151,12 +1184,11 @@ fiber_t_alloc(VALUE fibval)
}
THREAD_MUST_BE_RUNNING(th);
- fib = ALLOC(rb_fiber_t);
- memset(fib, 0, sizeof(rb_fiber_t));
+ fib = ZALLOC(rb_fiber_t);
fib->cont.self = fibval;
fib->cont.type = FIBER_CONTEXT;
cont_init(&fib->cont, th);
- fib->prev = Qnil;
+ fib->prev = NULL;
fib->status = CREATED;
DATA_PTR(fibval) = fib;
@@ -1170,6 +1202,7 @@ fiber_init(VALUE fibval, VALUE proc)
rb_fiber_t *fib = fiber_t_alloc(fibval);
rb_context_t *cont = &fib->cont;
rb_thread_t *th = &cont->saved_thread;
+ rb_thread_t *cth = GET_THREAD();
/* initialize cont */
cont->vm_stack = 0;
@@ -1177,34 +1210,33 @@ fiber_init(VALUE fibval, VALUE proc)
th->stack = 0;
th->stack_size = 0;
- fiber_link_join(fib);
-
- th->stack_size = th->vm->default_params.fiber_vm_stack_size / sizeof(VALUE);
+ th->stack_size = cth->vm->default_params.fiber_vm_stack_size / sizeof(VALUE);
th->stack = ALLOC_N(VALUE, th->stack_size);
th->cfp = (void *)(th->stack + th->stack_size);
th->cfp--;
th->cfp->pc = 0;
- th->cfp->sp = th->stack + 1;
+ th->cfp->sp = th->stack + 2;
#if VM_DEBUG_BP_CHECK
th->cfp->bp_check = 0;
#endif
- th->cfp->ep = th->stack;
- *th->cfp->ep = VM_ENVVAL_BLOCK_PTR(0);
+ th->cfp->ep = th->stack + 1;
+ th->cfp->ep[ 0] = VM_ENVVAL_BLOCK_PTR(0);
+ th->cfp->ep[-1] = 0;
th->cfp->self = Qnil;
- th->cfp->klass = Qnil;
- th->cfp->flag = 0;
+ th->cfp->flag = VM_FRAME_MAGIC_DUMMY | VM_FRAME_FLAG_FINISH;
th->cfp->iseq = 0;
th->cfp->proc = 0;
th->cfp->block_iseq = 0;
- th->cfp->me = 0;
th->tag = 0;
th->local_storage = st_init_numtable();
+ th->local_storage_recursive_hash = Qnil;
+ th->local_storage_recursive_hash_for_trace = Qnil;
th->first_proc = proc;
#if !FIBER_USE_NATIVE
- MEMCPY(&cont->jmpbuf, &th->root_jmpbuf, rb_jmpbuf_t, 1);
+ MEMCPY(&cont->jmpbuf, &cth->root_jmpbuf, rb_jmpbuf_t, 1);
#endif
return fibval;
@@ -1223,61 +1255,19 @@ rb_fiber_new(VALUE (*func)(ANYARGS), VALUE obj)
return fiber_init(fiber_alloc(rb_cFiber), rb_proc_new(func, obj));
}
-static VALUE
-return_fiber(void)
-{
- rb_fiber_t *fib;
- VALUE curr = rb_fiber_current();
- VALUE prev;
- GetFiberPtr(curr, fib);
-
- prev = fib->prev;
- if (NIL_P(prev)) {
- const VALUE root_fiber = GET_THREAD()->root_fiber;
-
- if (root_fiber == curr) {
- rb_raise(rb_eFiberError, "can't yield from root fiber");
- }
- return root_fiber;
- }
- else {
- fib->prev = Qnil;
- return prev;
- }
-}
-
-VALUE rb_fiber_transfer(VALUE fib, int argc, VALUE *argv);
-
-static void
-rb_fiber_terminate(rb_fiber_t *fib)
-{
- VALUE value = fib->cont.value;
- fib->status = TERMINATED;
-#if FIBER_USE_NATIVE && !defined(_WIN32)
- /* Ruby must not switch to other thread until storing terminated_machine_stack */
- terminated_machine_stack.ptr = fib->context.uc_stack.ss_sp;
- terminated_machine_stack.size = fib->context.uc_stack.ss_size / sizeof(VALUE);
- fib->context.uc_stack.ss_sp = NULL;
- fib->cont.machine_stack = NULL;
- fib->cont.machine_stack_size = 0;
-#endif
- rb_fiber_transfer(return_fiber(), 1, &value);
-}
+static void rb_fiber_terminate(rb_fiber_t *fib);
void
rb_fiber_start(void)
{
rb_thread_t *th = GET_THREAD();
- rb_fiber_t *fib;
- rb_context_t *cont;
+ rb_fiber_t *fib = th->fiber;
rb_proc_t *proc;
int state;
- GetFiberPtr(th->fiber, fib);
- cont = &fib->cont;
-
TH_PUSH_TAG(th);
if ((state = EXEC_TAG()) == 0) {
+ rb_context_t *cont = &VAR_FROM_MEMORY(fib)->cont;
int argc;
const VALUE *argv, args = cont->value;
GetProcPtr(cont->saved_thread.first_proc, proc);
@@ -1285,9 +1275,10 @@ rb_fiber_start(void)
cont->value = Qnil;
th->errinfo = Qnil;
th->root_lep = rb_vm_ep_local_ep(proc->block.ep);
- th->root_svar = Qnil;
-
+ th->root_svar = Qfalse;
fib->status = RUNNING;
+
+ EXEC_EVENT_HOOK(th, RUBY_EVENT_FIBER_SWITCH, th->self, 0, 0, Qnil);
cont->value = rb_vm_invoke_proc(th, proc, argc, argv, 0);
}
TH_POP_TAG();
@@ -1321,90 +1312,117 @@ root_fiber_alloc(rb_thread_t *th)
#endif
#endif
fib->status = RUNNING;
- fib->prev_fiber = fib->next_fiber = fib;
return fib;
}
-VALUE
-rb_fiber_current(void)
+static inline rb_fiber_t*
+fiber_current(void)
{
rb_thread_t *th = GET_THREAD();
if (th->fiber == 0) {
/* save root */
rb_fiber_t *fib = root_fiber_alloc(th);
- th->root_fiber = th->fiber = fib->cont.self;
+ th->root_fiber = th->fiber = fib;
}
return th->fiber;
}
-static VALUE
-fiber_store(rb_fiber_t *next_fib)
+static inline rb_fiber_t*
+return_fiber(void)
+{
+ rb_fiber_t *fib = fiber_current();
+ rb_fiber_t *prev = fib->prev;
+
+ if (!prev) {
+ rb_fiber_t *root_fiber = GET_THREAD()->root_fiber;
+
+ if (root_fiber == fib) {
+ rb_raise(rb_eFiberError, "can't yield from root fiber");
+ }
+ return root_fiber;
+ }
+ else {
+ fib->prev = NULL;
+ return prev;
+ }
+}
+
+VALUE
+rb_fiber_current(void)
+{
+ return fiber_current()->cont.self;
+}
+
+static inline VALUE
+fiber_store(rb_fiber_t *next_fib, rb_thread_t *th)
{
- rb_thread_t *th = GET_THREAD();
rb_fiber_t *fib;
if (th->fiber) {
- GetFiberPtr(th->fiber, fib);
+ fib = th->fiber;
cont_save_thread(&fib->cont, th);
}
else {
/* create current fiber */
fib = root_fiber_alloc(th);
- th->root_fiber = th->fiber = fib->cont.self;
+ th->root_fiber = th->fiber = fib;
}
-#if !FIBER_USE_NATIVE
- cont_save_machine_stack(th, &fib->cont);
-#endif
-
- if (FIBER_USE_NATIVE || ruby_setjmp(fib->cont.jmpbuf)) {
#if FIBER_USE_NATIVE
- fiber_setcontext(next_fib, fib);
+ fiber_setcontext(next_fib, fib);
+ /* restored */
#ifndef _WIN32
- if (terminated_machine_stack.ptr) {
- if (machine_stack_cache_index < MAX_MACHINE_STACK_CACHE) {
- machine_stack_cache[machine_stack_cache_index].ptr = terminated_machine_stack.ptr;
- machine_stack_cache[machine_stack_cache_index].size = terminated_machine_stack.size;
- machine_stack_cache_index++;
+ if (terminated_machine_stack.ptr) {
+ if (machine_stack_cache_index < MAX_MACHINE_STACK_CACHE) {
+ machine_stack_cache[machine_stack_cache_index].ptr = terminated_machine_stack.ptr;
+ machine_stack_cache[machine_stack_cache_index].size = terminated_machine_stack.size;
+ machine_stack_cache_index++;
+ }
+ else {
+ if (terminated_machine_stack.ptr != fib->cont.machine.stack) {
+ munmap((void*)terminated_machine_stack.ptr, terminated_machine_stack.size * sizeof(VALUE));
}
else {
- if (terminated_machine_stack.ptr != fib->cont.machine_stack) {
- munmap((void*)terminated_machine_stack.ptr, terminated_machine_stack.size * sizeof(VALUE));
- }
- else {
- rb_bug("terminated fiber resumed");
- }
+ rb_bug("terminated fiber resumed");
}
- terminated_machine_stack.ptr = NULL;
- terminated_machine_stack.size = 0;
}
-#endif
-#endif
+ terminated_machine_stack.ptr = NULL;
+ terminated_machine_stack.size = 0;
+ }
+#endif /* not _WIN32 */
+ fib = th->fiber;
+ if (fib->cont.argc == -1) rb_exc_raise(fib->cont.value);
+ return fib->cont.value;
+
+#else /* FIBER_USE_NATIVE */
+ cont_save_machine_stack(th, &fib->cont);
+ if (ruby_setjmp(fib->cont.jmpbuf)) {
/* restored */
- GetFiberPtr(th->fiber, fib);
+ fib = th->fiber;
if (fib->cont.argc == -1) rb_exc_raise(fib->cont.value);
+ if (next_fib->cont.value == Qundef) {
+ cont_restore_0(&next_fib->cont, &next_fib->cont.value);
+ rb_bug("rb_fiber_resume: unreachable");
+ }
return fib->cont.value;
}
-#if !FIBER_USE_NATIVE
else {
- return Qundef;
+ VALUE undef = Qundef;
+ cont_restore_0(&next_fib->cont, &undef);
+ rb_bug("rb_fiber_resume: unreachable");
}
-#endif
+#endif /* FIBER_USE_NATIVE */
}
static inline VALUE
-fiber_switch(VALUE fibval, int argc, VALUE *argv, int is_resume)
+fiber_switch(rb_fiber_t *fib, int argc, const VALUE *argv, int is_resume)
{
VALUE value;
- rb_fiber_t *fib;
- rb_context_t *cont;
+ rb_context_t *cont = &fib->cont;
rb_thread_t *th = GET_THREAD();
- GetFiberPtr(fibval, fib);
- cont = &fib->cont;
-
- if (th->fiber == fibval) {
+ if (th->fiber == fib) {
/* ignore fiber context switch
* because destination fiber is same as current fiber
*/
@@ -1419,34 +1437,25 @@ fiber_switch(VALUE fibval, int argc, VALUE *argv, int is_resume)
}
else if (fib->status == TERMINATED) {
value = rb_exc_new2(rb_eFiberError, "dead fiber called");
- if (th->fiber != fibval) {
- GetFiberPtr(th->fiber, fib);
- if (fib->status != TERMINATED) rb_exc_raise(value);
- fibval = th->root_fiber;
- }
- else {
- fibval = fib->prev;
- if (NIL_P(fibval)) fibval = th->root_fiber;
- }
- GetFiberPtr(fibval, fib);
- cont = &fib->cont;
+
+ if (th->fiber->status != TERMINATED) rb_exc_raise(value);
+
+ /* th->fiber is also dead => switch to root fiber */
+ /* (this means we're being called from rb_fiber_terminate, */
+ /* and the terminated fiber's return_fiber() is already dead) */
+ cont = &th->root_fiber->cont;
cont->argc = -1;
cont->value = value;
#if FIBER_USE_NATIVE
- {
- VALUE oldfibval;
- rb_fiber_t *oldfib;
- oldfibval = rb_fiber_current();
- GetFiberPtr(oldfibval, oldfib);
- fiber_setcontext(fib, oldfib);
- }
+ fiber_setcontext(th->root_fiber, th->fiber);
#else
cont_restore_0(cont, &value);
#endif
+ /* unreachable */
}
if (is_resume) {
- fib->prev = rb_fiber_current();
+ fib->prev = fiber_current();
}
else {
/* restore `tracing' context. see [Feature #4347] */
@@ -1456,56 +1465,69 @@ fiber_switch(VALUE fibval, int argc, VALUE *argv, int is_resume)
cont->argc = argc;
cont->value = make_passing_arg(argc, argv);
- value = fiber_store(fib);
-#if !FIBER_USE_NATIVE
- if (value == Qundef) {
- cont_restore_0(cont, &value);
- rb_bug("rb_fiber_resume: unreachable");
- }
-#endif
+ value = fiber_store(fib, th);
RUBY_VM_CHECK_INTS(th);
+ EXEC_EVENT_HOOK(th, RUBY_EVENT_FIBER_SWITCH, th->self, 0, 0, Qnil);
+
return value;
}
VALUE
-rb_fiber_transfer(VALUE fib, int argc, VALUE *argv)
+rb_fiber_transfer(VALUE fibval, int argc, const VALUE *argv)
{
+ rb_fiber_t *fib;
+ GetFiberPtr(fibval, fib);
return fiber_switch(fib, argc, argv, 0);
}
+static void
+rb_fiber_terminate(rb_fiber_t *fib)
+{
+ VALUE value = fib->cont.value;
+ fib->status = TERMINATED;
+#if FIBER_USE_NATIVE && !defined(_WIN32)
+ /* Ruby must not switch to other thread until storing terminated_machine_stack */
+ terminated_machine_stack.ptr = fib->ss_sp;
+ terminated_machine_stack.size = fib->ss_size / sizeof(VALUE);
+ fib->ss_sp = NULL;
+ fib->context.uc_stack.ss_sp = NULL;
+ fib->cont.machine.stack = NULL;
+ fib->cont.machine.stack_size = 0;
+#endif
+ fiber_switch(return_fiber(), 1, &value, 0);
+}
+
VALUE
-rb_fiber_resume(VALUE fibval, int argc, VALUE *argv)
+rb_fiber_resume(VALUE fibval, int argc, const VALUE *argv)
{
rb_fiber_t *fib;
GetFiberPtr(fibval, fib);
- if (fib->prev != Qnil || fib->cont.type == ROOT_FIBER_CONTEXT) {
+ if (fib->prev != 0 || fib->cont.type == ROOT_FIBER_CONTEXT) {
rb_raise(rb_eFiberError, "double resume");
}
- if (fib->transfered != 0) {
+ if (fib->transferred != 0) {
rb_raise(rb_eFiberError, "cannot resume transferred Fiber");
}
- return fiber_switch(fibval, argc, argv, 1);
+ return fiber_switch(fib, argc, argv, 1);
}
VALUE
-rb_fiber_yield(int argc, VALUE *argv)
+rb_fiber_yield(int argc, const VALUE *argv)
{
- return rb_fiber_transfer(return_fiber(), argc, argv);
+ return fiber_switch(return_fiber(), argc, argv, 0);
}
void
rb_fiber_reset_root_local_storage(VALUE thval)
{
rb_thread_t *th;
- rb_fiber_t *fib;
GetThreadPtr(thval, th);
if (th->root_fiber && th->root_fiber != th->fiber) {
- GetFiberPtr(th->root_fiber, fib);
- th->local_storage = fib->cont.saved_thread.local_storage;
+ th->local_storage = th->root_fiber->cont.saved_thread.local_storage;
}
}
@@ -1585,7 +1607,7 @@ rb_fiber_m_resume(int argc, VALUE *argv, VALUE fib)
* fiber2.resume
* fiber3.resume
*
- * <em>produces</em>
+ * <em>produces</em>
*
* In fiber 2
* In fiber 1
@@ -1597,8 +1619,8 @@ rb_fiber_m_transfer(int argc, VALUE *argv, VALUE fibval)
{
rb_fiber_t *fib;
GetFiberPtr(fibval, fib);
- fib->transfered = 1;
- return rb_fiber_transfer(fibval, argc, argv);
+ fib->transferred = 1;
+ return fiber_switch(fib, argc, argv, 0);
}
/*
@@ -1659,7 +1681,7 @@ Init_Cont(void)
#else /* not WIN32 */
pagesize = sysconf(_SC_PAGESIZE);
#endif
- SET_MACHINE_STACK_END(&th->machine_stack_end);
+ SET_MACHINE_STACK_END(&th->machine.stack_end);
#endif
rb_cFiber = rb_define_class("Fiber", rb_cObject);
diff --git a/coverage/README b/coverage/README
new file mode 100644
index 0000000000..7e4ff59e2a
--- /dev/null
+++ b/coverage/README
@@ -0,0 +1,17 @@
+Usage
+
+The make task `update-coverage' retrieves simplecov for coverage report.
+
+COVERAGE=1 make test-all TESTS=test/cgi
+
+it generate test coverage to coverage directory.
+
+Limitation
+
+ * test_coverage.rb and test_process.rb broke test suit with SimpleCov
+ * some tests failed randomly.
+
+TODO
+
+ * more reduce bundled simplecov(additional configuration, formatter, etc)
+ * measure rubyspec coverage
diff --git a/cygwin/GNUmakefile.in b/cygwin/GNUmakefile.in
index 5bd414d786..edf02242ee 100644
--- a/cygwin/GNUmakefile.in
+++ b/cygwin/GNUmakefile.in
@@ -33,7 +33,7 @@ WPROGRAM = $(RUBYW_INSTALL_NAME)$(EXEEXT)
-include uncommon.mk
SOLIBS := $(DLL_BASE_NAME).res.@OBJEXT@ $(SOLIBS)
-EXTOBJS += $(if $(filter-out $(RUBYW_INSTALL_NAME),$(@:$(EXEEXT)=)),$(RUBY_INSTALL_NAME),$(@:$(EXEEXT)=)).res.$(OBJEXT)
+override EXTOBJS += $(if $(filter-out $(RUBYW_INSTALL_NAME),$(@:$(EXEEXT)=)),$(RUBY_INSTALL_NAME),$(@:$(EXEEXT)=)).res.$(OBJEXT)
RCFILES = $(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(DLL_BASE_NAME).rc
RUBYDEF = $(DLL_BASE_NAME).def
@@ -67,11 +67,11 @@ $(WPROGRAM): $(RUBYW_INSTALL_NAME).res.@OBJEXT@
$(ECHO) linking $@
$(Q) $(PURIFY) $(CC) -mwindows -e $(SYMBOL_PREFIX)mainCRTStartup $(LDFLAGS) $(XLDFLAGS) \
$(MAINOBJ) $(EXTOBJS) $(LIBRUBYARG) $(LIBS) -o $@
-$(STUBPROGRAM): $(RUBY_INSTALL_NAME).res.@OBJEXT@ stub.@OBJEXT@
+$(STUBPROGRAM): $(RUBY_INSTALL_NAME).res.@OBJEXT@ win32/stub.@OBJEXT@
@rm -f $@
$(ECHO) linking $@
$(Q) $(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) \
- stub.@OBJEXT@ $(EXTOBJS) $(LIBRUBYARG) $(LIBS) -o $@
+ win32/stub.@OBJEXT@ $(EXTOBJS) $(LIBRUBYARG) $(LIBS) -o $@
$(RUBY_EXP): $(LIBRUBY_A)
$(ECHO) creating $@
@@ -86,7 +86,15 @@ GNUmakefile: $(srcdir)/cygwin/GNUmakefile.in
ifeq (@target_os@,mingw32)
$(OBJS) $(MAINOBJ): win32.h
-dir.$(OBJEXT) win32.$(OBJEXT): win32/dir.h
+dir.$(OBJEXT) win32/win32.$(OBJEXT): win32/dir.h
+file.$(OBJEXT) win32/win32.$(OBJEXT): win32/file.h
+
+MSYS2_ARG_CONV_EXCL_PARAM = --exclude=;--name=
+
+yes-test-ruby: export MSYS2_ARG_CONV_EXCL=$(MSYS2_ARG_CONV_EXCL_PARAM)
+yes-test-all: export MSYS2_ARG_CONV_EXCL=$(MSYS2_ARG_CONV_EXCL_PARAM)
+yes-test-almost: export MSYS2_ARG_CONV_EXCL=$(MSYS2_ARG_CONV_EXCL_PARAM)
+
endif
$(LIBRUBY_SO): $(RUBYDEF)
diff --git a/debug.c b/debug.c
index 2f1e03cc3a..a600259818 100644
--- a/debug.c
+++ b/debug.c
@@ -25,41 +25,11 @@ const union {
enum node_type node_type;
enum ruby_method_ids method_ids;
enum ruby_id_types id_types;
+ enum ruby_fl_type fl_types;
+ enum ruby_encoding_consts encoding_consts;
+ enum ruby_coderange_type enc_coderange_types;
+ enum ruby_econv_flag_type econv_flag_types;
enum {
- RUBY_ENCODING_INLINE_MAX = ENCODING_INLINE_MAX,
- RUBY_ENCODING_SHIFT = ENCODING_SHIFT,
- RUBY_ENC_CODERANGE_MASK = ENC_CODERANGE_MASK,
- RUBY_ENC_CODERANGE_UNKNOWN = ENC_CODERANGE_UNKNOWN,
- RUBY_ENC_CODERANGE_7BIT = ENC_CODERANGE_7BIT,
- RUBY_ENC_CODERANGE_VALID = ENC_CODERANGE_VALID,
- RUBY_ENC_CODERANGE_BROKEN = ENC_CODERANGE_BROKEN,
- RUBY_FL_WB_PROTECTED = FL_WB_PROTECTED,
- RUBY_FL_PROMOTED = FL_PROMOTED,
- RUBY_FL_FINALIZE = FL_FINALIZE,
- RUBY_FL_TAINT = FL_TAINT,
- RUBY_FL_EXIVAR = FL_EXIVAR,
- RUBY_FL_FREEZE = FL_FREEZE,
- RUBY_FL_SINGLETON = FL_SINGLETON,
- RUBY_FL_USER0 = FL_USER0,
- RUBY_FL_USER1 = FL_USER1,
- RUBY_FL_USER2 = FL_USER2,
- RUBY_FL_USER3 = FL_USER3,
- RUBY_FL_USER4 = FL_USER4,
- RUBY_FL_USER5 = FL_USER5,
- RUBY_FL_USER6 = FL_USER6,
- RUBY_FL_USER7 = FL_USER7,
- RUBY_FL_USER8 = FL_USER8,
- RUBY_FL_USER9 = FL_USER9,
- RUBY_FL_USER10 = FL_USER10,
- RUBY_FL_USER11 = FL_USER11,
- RUBY_FL_USER12 = FL_USER12,
- RUBY_FL_USER13 = FL_USER13,
- RUBY_FL_USER14 = FL_USER14,
- RUBY_FL_USER15 = FL_USER15,
- RUBY_FL_USER16 = FL_USER16,
- RUBY_FL_USER17 = FL_USER17,
- RUBY_FL_USER18 = FL_USER18,
- RUBY_FL_USHIFT = FL_USHIFT,
RUBY_NODE_TYPESHIFT = NODE_TYPESHIFT,
RUBY_NODE_TYPEMASK = NODE_TYPEMASK,
RUBY_NODE_LSHIFT = NODE_LSHIFT,
@@ -67,9 +37,7 @@ const union {
} various;
} ruby_dummy_gdb_enums;
-const VALUE RUBY_FL_USER19 = FL_USER19;
const SIGNED_VALUE RUBY_NODE_LMASK = NODE_LMASK;
-const VALUE RUBY_ENCODING_MASK = ENCODING_MASK;
int
ruby_debug_print_indent(int level, int debug_level, int indent_level)
@@ -139,18 +107,20 @@ ruby_debug_breakpoint(void)
static void
set_debug_option(const char *str, int len, void *arg)
{
-#define SET_WHEN(name, var) do { \
+#if defined _WIN32 && RUBY_MSVCRT_VERSION >= 80
+ extern int ruby_w32_rtc_error;
+#endif
+#define SET_WHEN(name, var, val) do { \
if (len == sizeof(name) - 1 && \
strncmp(str, (name), len) == 0) { \
- extern int var; \
- var = 1; \
+ (var) = (val); \
return; \
} \
} while (0)
- SET_WHEN("gc_stress", *ruby_initial_gc_stress_ptr);
- SET_WHEN("core", ruby_enable_coredump);
-#if defined _WIN32 && defined _MSC_VER && _MSC_VER >= 1400
- SET_WHEN("rtc_error", ruby_w32_rtc_error);
+ SET_WHEN("gc_stress", *ruby_initial_gc_stress_ptr, Qtrue);
+ SET_WHEN("core", ruby_enable_coredump, 1);
+#if defined _WIN32 && RUBY_MSVCRT_VERSION >= 80
+ SET_WHEN("rtc_error", ruby_w32_rtc_error, 1);
#endif
fprintf(stderr, "unexpected debug option: %.*s\n", len, str);
}
diff --git a/defs/default_gems b/defs/default_gems
deleted file mode 100644
index e73e383b26..0000000000
--- a/defs/default_gems
+++ /dev/null
@@ -1,5 +0,0 @@
-# gem base directory versioning file [executable files under bin]
-rake lib/rake lib/rake/version.rb [rake]
-rdoc lib/rdoc lib/rdoc.rb [rdoc ri]
-minitest lib/minitest lib/minitest/unit.rb
-json ext/json ext/json/lib/json/version.rb
diff --git a/defs/gmake.mk b/defs/gmake.mk
index 0acb88ef57..439ca9b6f0 100644
--- a/defs/gmake.mk
+++ b/defs/gmake.mk
@@ -1,20 +1,56 @@
# -*- makefile-gmake -*-
+gnumake = yes
+
+CHECK_TARGETS := exam love check%
TEST_TARGETS := $(filter check test check% test% btest%,$(MAKECMDGOALS))
TEST_TARGETS += $(subst check,test-all,$(patsubst check-%,test-%,$(TEST_TARGETS)))
TEST_TARGETS := $(patsubst test-%,yes-test-%,$(patsubst btest-%,yes-btest-%,$(TEST_TARGETS)))
TEST_DEPENDS := $(if $(TEST_TARGETS),$(filter all main exts,$(MAKECMDGOALS)))
-TEST_DEPENDS += $(TEST_DEPENDS) $(if $(filter check%,$(MAKECMDGOALS)),main)
+TEST_DEPENDS += $(if $(filter $(CHECK_TARGETS),$(MAKECMDGOALS)),main)
+TEST_DEPENDS += $(if $(filter main,$(TEST_DEPENDS)),$(if $(filter all,$(INSTALLDOC)),docs))
+
+ifneq ($(filter -O0 -Od,$(optflags)),)
+override XCFLAGS := $(filter-out -D_FORTIFY_SOURCE=%,$(XCFLAGS))
+endif
+
+ifeq ($(if $(filter all main exts enc trans libencs libenc libtrans \
+ prog program ruby ruby$(EXEEXT) \
+ wprogram rubyw rubyw$(EXEEXT) \
+ miniruby$(EXEEXT) mini,\
+ $(MAKECMDGOALS)),,$(MAKECMDGOALS)),)
+-include $(SHOWFLAGS)
+endif
+
+ifneq ($(filter universal-%,$(arch)),)
+define archcmd
+%.$(1).S: %.c
+ @$$(ECHO) translating $$< with $(2)
+ $$(Q) $$(CC) $$(CFLAGS_NO_ARCH) $(2) $$(XCFLAGS) $$(CPPFLAGS) $$(COUTFLAG)$$@ -S $$<
+
+%.S: %.$(1).S
+
+%.$(1).i: %.c
+ @$$(ECHO) preprocessing $$< with $(2)
+ $$(Q) $$(CPP) $$(warnflags) $(2) $$(XCFLAGS) $$(CPPFLAGS) $$(COUTFLAG)$$@ -E $$< > $$@
-ifneq ($(filter check% test,$(MAKECMDGOALS)),)
+%.i: %.$(1).i
+endef
+
+$(foreach arch,$(filter -arch=%,$(subst -arch ,-arch=,$(ARCH_FLAG))),\
+ $(eval $(call archcmd,$(patsubst -arch=%,%,$(value arch)),$(patsubst -arch=%,-arch %,$(value arch)))))
+endif
+
+ifneq ($(filter $(CHECK_TARGETS) test,$(MAKECMDGOALS)),)
yes-test-knownbug: $(TEST_DEPENDS) yes-btest-ruby
yes-btest-ruby: $(TEST_DEPENDS) yes-test-sample
yes-test-sample: $(TEST_DEPENDS)
endif
-ifneq ($(filter check%,$(MAKECMDGOALS)) $(filter test-all,$(TEST_TARGETS)),)
-yes-test-all yes-test-ruby: $(filter-out %test-all %test-ruby check%,$(TEST_TARGETS))
+ifneq ($(filter $(CHECK_TARGETS),$(MAKECMDGOALS)) $(filter test-all,$(TEST_TARGETS)),)
+yes-test-testframework yes-test-almost yes-test-ruby: $(filter-out %test-all %test-ruby check%,$(TEST_TARGETS))
endif
-ifneq ($(filter check%,$(MAKECMDGOALS))$(if $(filter test-all,$(MAKECMDGOALS)),$(filter test-knownbug,$(MAKECMDGOALS))),)
-yes-test-all yes-test-ruby: yes-test-knownbug
+ifneq ($(filter $(CHECK_TARGETS),$(MAKECMDGOALS))$(if $(filter test-all,$(MAKECMDGOALS)),$(filter test-knownbug,$(MAKECMDGOALS))),)
+yes-test-testframework yes-test-almost yes-test-ruby: yes-test-knownbug
+yes-test-almost: yes-test-testframework
endif
$(TEST_TARGETS): $(TEST_DEPENDS)
@@ -25,5 +61,18 @@ $(word 1,$(install-targets)): $(word 0,$(install-targets))
endif
ifneq ($(filter reinstall,$(MAKECMDGOALS)),)
-install: uninstall
+install-prereq: uninstall
+uninstall sudo-precheck: all $(if $(filter all,$(INSTALLDOC)),docs)
+endif
+
+ifneq ($(filter exam,$(MAKECMDGOALS)),)
+test-rubyspec: check
+yes-test-all no-test-all: test
+endif
+
+ifneq ($(filter love,$(MAKECMDGOALS)),)
+showflags: up
+sudo-precheck: test
+install-prereq: sudo-precheck
+yes-test-all no-test-all: install
endif
diff --git a/defs/id.def b/defs/id.def
index 53ed3775ad..1ff0d9aa3d 100644
--- a/defs/id.def
+++ b/defs/id.def
@@ -26,6 +26,22 @@ firstline, predefined = __LINE__+1, %[\
initialize_copy
initialize_clone
initialize_dup
+ to_int
+ to_ary
+ to_str
+ to_sym
+ to_hash
+ to_proc
+ to_io
+ to_a
+ to_s
+ to_i
+ bt
+ bt_locations
+ call
+ mesg
+ exception
+
_ UScore
"/*NULL*/" NULL
empty?
@@ -44,6 +60,44 @@ firstline, predefined = __LINE__+1, %[\
core#hash_merge_ary
core#hash_merge_ptr
core#hash_merge_kwd
+
+ - debug#created_info
+]
+
+# VM ID OP Parser Token
+token_ops = %[\
+ Dot2 .. DOT2
+ Dot3 ... DOT3
+ UPlus +@ UPLUS
+ UMinus -@ UMINUS
+ Pow ** POW
+ DSTAR **
+ Cmp <=> CMP
+ PLUS +
+ MINUS -
+ MULT *
+ DIV /
+ MOD %
+ LTLT << LSHFT
+ GTGT >> RSHFT
+ LT <
+ LE <= LEQ
+ GT >
+ GE >= GEQ
+ Eq == EQ
+ Eqq === EQQ
+ Neq != NEQ
+ Not !
+ Backquote `
+ EqTilde =~ MATCH
+ NeqTilde !~ NMATCH
+ AREF []
+ ASET []=
+ COLON2 ::
+ COLON3 ::
+ ANDOP &&
+ OROP ||
+ ANDDOT &.
]
class KeywordError < RuntimeError
@@ -59,6 +113,8 @@ instance_ids = []
global_ids = []
const_ids = []
class_ids = []
+attrset_ids = []
+token_op_ids = []
names = {}
predefined.split(/^/).each_with_index do |line, num|
next if /^#/ =~ line
@@ -75,6 +131,10 @@ predefined.split(/^/).each_with_index do |line, num|
token.sub!(/\A@/, "_I_")
token.gsub!(/\W+/, "")
end
+ if name == '-'
+ preserved_ids << token
+ next
+ end
if prev = names[name]
KeywordError.raise("#{name} is already registered at line #{prev+firstline}", firstline+num)
end
@@ -88,18 +148,27 @@ predefined.split(/^/).each_with_index do |line, num|
when /\A\$(?:\d+|(?!\d)\w+)\z/; global_ids
when /\A@@(?!\d)\w+\z/; class_ids
when /\A@(?!\d)\w+\z/; instance_ids
- when /\A((?!\d)\w+)=\z/
- KeywordError.raise("use ID2ATTRSET(#{$1}) instead of ATTRSET #{name}", firstline+num)
+ when /\A((?!\d)\w+)=\z/; attrset_ids
else preserved_ids
end << token
predefined_ids[token] = name
end
+token_ops.split(/^/).each do |line|
+ next if /^#/ =~ line
+ line.sub!(/\s+#.*/, '')
+ id, op, token = line.split
+ next unless id and op
+ token ||= (id unless /\A\W\z/ =~ op)
+ token_op_ids << [id, op, token]
+end
{
"LOCAL" => local_ids,
"INSTANCE" => instance_ids,
"GLOBAL" => global_ids,
"CONST" => const_ids,
"CLASS" => class_ids,
+ "ATTRSET" => attrset_ids,
:preserved => preserved_ids,
:predefined => predefined_ids,
+ :token_op => token_op_ids,
}
diff --git a/defs/keywords b/defs/keywords
index 1b5719aa85..e0d931cd1f 100644
--- a/defs/keywords
+++ b/defs/keywords
@@ -1,5 +1,5 @@
%{
-struct kwtable {const char *name; int id[2]; enum lex_state_e state;};
+struct kwtable {int name, id[2], state;};
const struct kwtable *rb_reserved_word(const char *, unsigned int);
#ifndef RIPPER
static const struct kwtable *reserved_word(const char *, unsigned int);
@@ -13,7 +13,7 @@ __LINE__, {keyword__LINE__, keyword__LINE__}, EXPR_END
__FILE__, {keyword__FILE__, keyword__FILE__}, EXPR_END
BEGIN, {keyword_BEGIN, keyword_BEGIN}, EXPR_END
END, {keyword_END, keyword_END}, EXPR_END
-alias, {keyword_alias, keyword_alias}, EXPR_FNAME
+alias, {keyword_alias, keyword_alias}, EXPR_FNAME|EXPR_FITEM
and, {keyword_and, keyword_and}, EXPR_VALUE
begin, {keyword_begin, keyword_begin}, EXPR_BEG
break, {keyword_break, keyword_break}, EXPR_MID
@@ -43,7 +43,7 @@ self, {keyword_self, keyword_self}, EXPR_END
super, {keyword_super, keyword_super}, EXPR_ARG
then, {keyword_then, keyword_then}, EXPR_BEG
true, {keyword_true, keyword_true}, EXPR_END
-undef, {keyword_undef, keyword_undef}, EXPR_FNAME
+undef, {keyword_undef, keyword_undef}, EXPR_FNAME|EXPR_FITEM
unless, {keyword_unless, modifier_unless}, EXPR_VALUE
until, {keyword_until, modifier_until}, EXPR_VALUE
when, {keyword_when, keyword_when}, EXPR_VALUE
diff --git a/defs/known_errors.def b/defs/known_errors.def
index 3cebe90a8e..b9c490d3a2 100644
--- a/defs/known_errors.def
+++ b/defs/known_errors.def
@@ -143,3 +143,6 @@ EPROGMISMATCH
EPROGUNAVAIL
ERPCMISMATCH
EIPSEC
+EHWPOISON
+ECAPMODE
+ENOTCAPABLE
diff --git a/defs/lex.c.src b/defs/lex.c.src
index 1b5719aa85..e0d931cd1f 100644
--- a/defs/lex.c.src
+++ b/defs/lex.c.src
@@ -1,5 +1,5 @@
%{
-struct kwtable {const char *name; int id[2]; enum lex_state_e state;};
+struct kwtable {int name, id[2], state;};
const struct kwtable *rb_reserved_word(const char *, unsigned int);
#ifndef RIPPER
static const struct kwtable *reserved_word(const char *, unsigned int);
@@ -13,7 +13,7 @@ __LINE__, {keyword__LINE__, keyword__LINE__}, EXPR_END
__FILE__, {keyword__FILE__, keyword__FILE__}, EXPR_END
BEGIN, {keyword_BEGIN, keyword_BEGIN}, EXPR_END
END, {keyword_END, keyword_END}, EXPR_END
-alias, {keyword_alias, keyword_alias}, EXPR_FNAME
+alias, {keyword_alias, keyword_alias}, EXPR_FNAME|EXPR_FITEM
and, {keyword_and, keyword_and}, EXPR_VALUE
begin, {keyword_begin, keyword_begin}, EXPR_BEG
break, {keyword_break, keyword_break}, EXPR_MID
@@ -43,7 +43,7 @@ self, {keyword_self, keyword_self}, EXPR_END
super, {keyword_super, keyword_super}, EXPR_ARG
then, {keyword_then, keyword_then}, EXPR_BEG
true, {keyword_true, keyword_true}, EXPR_END
-undef, {keyword_undef, keyword_undef}, EXPR_FNAME
+undef, {keyword_undef, keyword_undef}, EXPR_FNAME|EXPR_FITEM
unless, {keyword_unless, modifier_unless}, EXPR_VALUE
until, {keyword_until, modifier_until}, EXPR_VALUE
when, {keyword_when, keyword_when}, EXPR_VALUE
diff --git a/defs/opt_operand.def b/defs/opt_operand.def
index ab7103a421..887e3da49a 100644
--- a/defs/opt_operand.def
+++ b/defs/opt_operand.def
@@ -1,5 +1,5 @@
#
-# configration file for operand union optimization
+# configuration file for operand union optimization
#
# format:
# [insn name] op1, op2 ...
diff --git a/dir.c b/dir.c
index 8492ce78d0..7376d5df1c 100644
--- a/dir.c
+++ b/dir.c
@@ -11,9 +11,8 @@
**********************************************************************/
-#include "ruby/ruby.h"
-#include "ruby/encoding.h"
#include "internal.h"
+#include "encindex.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -73,24 +72,63 @@ char *strchr(char*,char);
#define rmdir(p) rb_w32_urmdir(p)
#undef opendir
#define opendir(p) rb_w32_uopendir(p)
+#define IS_WIN32 1
+#else
+#define IS_WIN32 0
+#endif
+
+#ifdef HAVE_SYS_ATTR_H
+#include <sys/attr.h>
+#endif
+
+#ifdef HAVE_GETATTRLIST
+# define USE_NAME_ON_FS 1
+# define RUP32(size) ((size)+3/4)
+# define SIZEUP32(type) RUP32(sizeof(type))
+#elif defined _WIN32
+# define USE_NAME_ON_FS 1
+#elif defined DOSISH
+# define USE_NAME_ON_FS 2 /* by fnmatch */
+#else
+# define USE_NAME_ON_FS 0
#endif
#ifdef __APPLE__
-# define HAVE_HFS 1
+# define NORMALIZE_UTF8PATH 1
#else
-# define HAVE_HFS 0
+# define NORMALIZE_UTF8PATH 0
#endif
-#if HAVE_HFS
+
+#if NORMALIZE_UTF8PATH
#include <sys/param.h>
#include <sys/mount.h>
+#include <sys/vnode.h>
+# if defined HAVE_FGETATTRLIST || !defined HAVE_GETATTRLIST
+# define need_normalization(dirp, path) need_normalization(dirp)
+# else
+# define need_normalization(dirp, path) need_normalization(path)
+# endif
static inline int
-is_hfs(DIR *dirp)
-{
- struct statfs buf;
- if (fstatfs(dirfd(dirp), &buf) == 0) {
- return buf.f_type == 17; /* HFS on darwin */
+need_normalization(DIR *dirp, const char *path)
+{
+# if defined HAVE_FGETATTRLIST || defined HAVE_GETATTRLIST
+ u_int32_t attrbuf[SIZEUP32(fsobj_tag_t)];
+ struct attrlist al = {ATTR_BIT_MAP_COUNT, 0, ATTR_CMN_OBJTAG,};
+# if defined HAVE_FGETATTRLIST
+ int ret = fgetattrlist(dirfd(dirp), &al, attrbuf, sizeof(attrbuf), 0);
+# else
+ int ret = getattrlist(path, &al, attrbuf, sizeof(attrbuf), 0);
+# endif
+ if (!ret) {
+ const fsobj_tag_t *tag = (void *)(attrbuf+1);
+ switch (*tag) {
+ case VT_HFS:
+ case VT_CIFS:
+ return TRUE;
+ }
}
+# endif
return FALSE;
}
@@ -105,10 +143,30 @@ has_nonascii(const char *ptr, size_t len)
return 0;
}
-# define IF_HAVE_HFS(something) something
+# define IF_NORMALIZE_UTF8PATH(something) something
+#else
+# define IF_NORMALIZE_UTF8PATH(something) /* nothing */
+#endif
+
+#ifndef IFTODT
+# define IFTODT(m) (((m) & S_IFMT) / ((~S_IFMT & S_IFMT-1) + 1))
+#endif
+
+typedef enum {
+#ifdef DT_UNKNOWN
+ path_exist = DT_UNKNOWN,
+ path_directory = DT_DIR,
+ path_regular = DT_REG,
+ path_symlink = DT_LNK,
#else
-# define IF_HAVE_HFS(something) /* nothing */
+ path_exist,
+ path_directory = IFTODT(S_IFDIR),
+ path_regular = IFTODT(S_IFREG),
+ path_symlink = IFTODT(S_IFLNK),
#endif
+ path_noent = -1,
+ path_unknown = -2
+} rb_pathtype_t;
#define FNM_NOESCAPE 0x01
#define FNM_PATHNAME 0x02
@@ -120,6 +178,11 @@ has_nonascii(const char *ptr, size_t len)
#else
#define FNM_SYSCASE 0
#endif
+#if _WIN32
+#define FNM_SHORTNAME 0x20
+#else
+#define FNM_SHORTNAME 0
+#endif
#define FNM_NOMATCH 1
#define FNM_ERROR 2
@@ -196,7 +259,7 @@ bracket(
return ok == not ? NULL : (char *)p + 1;
}
-/* If FNM_PATHNAME is set, only path element will be matched. (upto '/' or '\0')
+/* If FNM_PATHNAME is set, only path element will be matched. (up to '/' or '\0')
Otherwise, entire string will be matched.
End marker itself won't be compared.
And if function succeeds, *pcur reaches end marker.
@@ -375,13 +438,13 @@ dir_free(void *ptr)
static size_t
dir_memsize(const void *ptr)
{
- return ptr ? sizeof(struct dir_data) : 0;
+ return sizeof(struct dir_data);
}
static const rb_data_type_t dir_data_type = {
"dir",
{dir_mark, dir_free, dir_memsize,},
- NULL, NULL, RUBY_TYPED_FREE_IMMEDIATELY
+ 0, 0, RUBY_TYPED_FREE_IMMEDIATELY
};
static VALUE dir_close(VALUE);
@@ -425,9 +488,10 @@ dir_initialize(int argc, VALUE *argv, VALUE dir)
rb_encoding *fsenc;
VALUE dirname, opt, orig;
static ID keyword_ids[1];
+ const char *path;
if (!keyword_ids[0]) {
- keyword_ids[0] = rb_intern("encoding");
+ keyword_ids[0] = rb_id_encoding();
}
fsenc = rb_filesystem_encoding();
@@ -452,13 +516,23 @@ dir_initialize(int argc, VALUE *argv, VALUE dir)
dp->dir = NULL;
dp->path = Qnil;
dp->enc = fsenc;
- dp->dir = opendir(RSTRING_PTR(dirname));
+ path = RSTRING_PTR(dirname);
+ dp->dir = opendir(path);
if (dp->dir == NULL) {
- if (errno == EMFILE || errno == ENFILE) {
- rb_gc();
- dp->dir = opendir(RSTRING_PTR(dirname));
+ if (rb_gc_for_fd(errno)) {
+ dp->dir = opendir(path);
+ }
+#ifdef HAVE_GETATTRLIST
+ else if (errno == EIO) {
+ u_int32_t attrbuf[1];
+ struct attrlist al = {ATTR_BIT_MAP_COUNT, 0};
+ if (getattrlist(path, &al, attrbuf, sizeof(attrbuf), FSOPT_NOFOLLOW) == 0) {
+ dp->dir = opendir(path);
+ }
}
+#endif
if (dp->dir == NULL) {
+ RB_GC_GUARD(dirname);
rb_sys_fail_path(orig);
}
}
@@ -504,11 +578,16 @@ dir_closed(void)
}
static struct dir_data *
-dir_check(VALUE dir)
+dir_get(VALUE dir)
{
- struct dir_data *dirp;
rb_check_frozen(dir);
- dirp = rb_check_typeddata(dir, &dir_data_type);
+ return rb_check_typeddata(dir, &dir_data_type);
+}
+
+static struct dir_data *
+dir_check(VALUE dir)
+{
+ struct dir_data *dirp = dir_get(dir);
if (!dirp->dir) dir_closed();
return dirp;
}
@@ -536,9 +615,53 @@ dir_inspect(VALUE dir)
rb_str_cat2(str, ">");
return str;
}
- return rb_funcall(dir, rb_intern("to_s"), 0, 0);
+ return rb_funcallv(dir, rb_intern("to_s"), 0, 0);
}
+/* Workaround for Solaris 10 that does not have dirfd.
+ Note: Solaris 11 (POSIX.1-2008 compliant) has dirfd(3C).
+ */
+#if defined(__sun) && !defined(HAVE_DIRFD)
+# if defined(HAVE_DIR_D_FD)
+# define dirfd(x) ((x)->d_fd)
+# define HAVE_DIRFD 1
+# elif defined(HAVE_DIR_DD_FD)
+# define dirfd(x) ((x)->dd_fd)
+# define HAVE_DIRFD 1
+# endif
+#endif
+
+#ifdef HAVE_DIRFD
+/*
+ * call-seq:
+ * dir.fileno -> integer
+ *
+ * Returns the file descriptor used in <em>dir</em>.
+ *
+ * d = Dir.new("..")
+ * d.fileno #=> 8
+ *
+ * This method uses dirfd() function defined by POSIX 2008.
+ * NotImplementedError is raised on other platforms, such as Windows,
+ * which doesn't provide the function.
+ *
+ */
+static VALUE
+dir_fileno(VALUE dir)
+{
+ struct dir_data *dirp;
+ int fd;
+
+ GetDIR(dir, dirp);
+ fd = dirfd(dirp->dir);
+ if (fd == -1)
+ rb_sys_fail("dirfd");
+ return INT2NUM(fd);
+}
+#else
+#define dir_fileno rb_f_notimplement
+#endif
+
/*
* call-seq:
* dir.path -> string or nil
@@ -560,6 +683,18 @@ dir_path(VALUE dir)
}
#if defined _WIN32
+static int
+fundamental_encoding_p(rb_encoding *enc)
+{
+ switch (rb_enc_to_index(enc)) {
+ case ENCINDEX_ASCII:
+ case ENCINDEX_US_ASCII:
+ case ENCINDEX_UTF_8:
+ return TRUE;
+ default:
+ return FALSE;
+ }
+}
# define READDIR(dir, enc) rb_w32_readdir((dir), (enc))
#else
# define READDIR(dir, enc) readdir((dir))
@@ -619,18 +754,18 @@ dir_each(VALUE dir)
{
struct dir_data *dirp;
struct dirent *dp;
- IF_HAVE_HFS(int hfs_p);
+ IF_NORMALIZE_UTF8PATH(int norm_p);
RETURN_ENUMERATOR(dir, 0, 0);
GetDIR(dir, dirp);
rewinddir(dirp->dir);
- IF_HAVE_HFS(hfs_p = is_hfs(dirp->dir));
+ IF_NORMALIZE_UTF8PATH(norm_p = need_normalization(dirp->dir, RSTRING_PTR(dirp->path)));
while ((dp = READDIR(dirp->dir, dirp->enc)) != NULL) {
const char *name = dp->d_name;
size_t namlen = NAMLEN(dp);
VALUE path;
-#if HAVE_HFS
- if (hfs_p && has_nonascii(name, namlen) &&
+#if NORMALIZE_UTF8PATH
+ if (norm_p && has_nonascii(name, namlen) &&
!NIL_P(path = rb_str_normalize_ospath(name, namlen))) {
path = rb_external_str_with_enc(path, dirp->enc);
}
@@ -750,8 +885,8 @@ dir_rewind(VALUE dir)
* call-seq:
* dir.close -> nil
*
- * Closes the directory stream. Any further attempts to access
- * <em>dir</em> will raise an <code>IOError</code>.
+ * Closes the directory stream.
+ * Calling this method on closed Dir object is ignored since Ruby 2.3.
*
* d = Dir.new("testdir")
* d.close #=> nil
@@ -761,7 +896,8 @@ dir_close(VALUE dir)
{
struct dir_data *dirp;
- GetDIR(dir, dirp);
+ dirp = dir_get(dir);
+ if (!dirp->dir) return Qnil;
closedir(dirp->dir);
dirp->dir = NULL;
@@ -850,7 +986,6 @@ dir_s_chdir(int argc, VALUE *argv, VALUE obj)
{
VALUE path = Qnil;
- rb_secure(2);
if (rb_scan_args(argc, argv, "01", &path) == 1) {
FilePathValue(path);
path = rb_str_encode_ospath(path);
@@ -887,10 +1022,17 @@ rb_dir_getwd(void)
{
char *path;
VALUE cwd;
+ int fsenc = rb_enc_to_index(rb_filesystem_encoding());
+ if (fsenc == ENCINDEX_US_ASCII) fsenc = ENCINDEX_ASCII;
path = my_getcwd();
+#ifdef __APPLE__
+ cwd = rb_str_normalize_ospath(path, strlen(path));
+ OBJ_TAINT(cwd);
+#else
cwd = rb_tainted_str_new2(path);
- rb_enc_associate(cwd, rb_filesystem_encoding());
+#endif
+ rb_enc_associate_index(cwd, fsenc);
xfree(path);
return cwd;
@@ -906,6 +1048,7 @@ rb_dir_getwd(void)
*
* Dir.chdir("/tmp") #=> 0
* Dir.getwd #=> "/tmp"
+ * Dir.pwd #=> "/tmp"
*/
static VALUE
dir_s_getwd(VALUE dir)
@@ -913,15 +1056,14 @@ dir_s_getwd(VALUE dir)
return rb_dir_getwd();
}
-static void
-check_dirname(volatile VALUE *dir)
+static VALUE
+check_dirname(VALUE dir)
{
- VALUE d = *dir;
+ VALUE d = dir;
char *path, *pend;
long len;
rb_encoding *enc;
- rb_secure(2);
FilePathValue(d);
enc = rb_enc_get(d);
RSTRING_GETMEM(d, path, len);
@@ -929,8 +1071,9 @@ check_dirname(volatile VALUE *dir)
pend = rb_enc_path_end(rb_enc_path_skip_prefix(path, pend, enc), pend, enc);
if (pend - path < len) {
d = rb_str_subseq(d, 0, pend - path);
+ StringValueCStr(d);
}
- *dir = rb_str_encode_ospath(d);
+ return rb_str_encode_ospath(d);
}
#if defined(HAVE_CHROOT)
@@ -946,7 +1089,7 @@ check_dirname(volatile VALUE *dir)
static VALUE
dir_s_chroot(VALUE dir, VALUE path)
{
- check_dirname(&path);
+ path = check_dirname(path);
if (chroot(RSTRING_PTR(path)) == -1)
rb_sys_fail_path(path);
@@ -984,7 +1127,7 @@ dir_s_mkdir(int argc, VALUE *argv, VALUE obj)
mode = 0777;
}
- check_dirname(&path);
+ path = check_dirname(path);
if (mkdir(RSTRING_PTR(path), mode) == -1)
rb_sys_fail_path(path);
@@ -1003,26 +1146,56 @@ dir_s_mkdir(int argc, VALUE *argv, VALUE obj)
static VALUE
dir_s_rmdir(VALUE obj, VALUE dir)
{
- check_dirname(&dir);
+ dir = check_dirname(dir);
if (rmdir(RSTRING_PTR(dir)) < 0)
rb_sys_fail_path(dir);
return INT2FIX(0);
}
+struct warning_args {
+#ifdef RUBY_FUNCTION_NAME_STRING
+ const char *func;
+#endif
+ const char *mesg;
+ rb_encoding *enc;
+};
+
+#ifndef RUBY_FUNCTION_NAME_STRING
+#define sys_enc_warning_in(func, mesg, enc) sys_enc_warning(mesg, enc)
+#endif
+
static VALUE
sys_warning_1(VALUE mesg)
{
- rb_sys_warning("%s:%s", strerror(errno), (const char *)mesg);
+ const struct warning_args *arg = (struct warning_args *)mesg;
+#ifdef RUBY_FUNCTION_NAME_STRING
+ rb_sys_enc_warning(arg->enc, "%s: %s", arg->func, arg->mesg);
+#else
+ rb_sys_enc_warning(arg->enc, "%s", arg->mesg);
+#endif
return Qnil;
}
+static void
+sys_enc_warning_in(const char *func, const char *mesg, rb_encoding *enc)
+{
+ struct warning_args arg;
+#ifdef RUBY_FUNCTION_NAME_STRING
+ arg.func = func;
+#endif
+ arg.mesg = mesg;
+ arg.enc = enc;
+ rb_protect(sys_warning_1, (VALUE)&arg, 0);
+}
+
#define GLOB_VERBOSE (1U << (sizeof(int) * CHAR_BIT - 1))
-#define sys_warning(val) \
- (void)((flags & GLOB_VERBOSE) && rb_protect(sys_warning_1, (VALUE)(val), 0))
+#define sys_warning(val, enc) \
+ ((flags & GLOB_VERBOSE) ? sys_enc_warning_in(RUBY_FUNCTION_NAME_STRING, (val), (enc)) :(void)0)
#define GLOB_ALLOC(type) ((type *)malloc(sizeof(type)))
#define GLOB_ALLOC_N(type, n) ((type *)malloc(sizeof(type) * (n)))
+#define GLOB_REALLOC(ptr, size) realloc((ptr), (size))
#define GLOB_FREE(ptr) free(ptr)
#define GLOB_JUMP_TAG(status) (((status) == -1) ? rb_memerror() : rb_jump_tag(status))
@@ -1034,29 +1207,30 @@ sys_warning_1(VALUE mesg)
#ifdef _WIN32
#define STAT(p, s) rb_w32_ustati64((p), (s))
+#undef lstat
+#define lstat(p, s) rb_w32_ulstati64((p), (s))
#else
#define STAT(p, s) stat((p), (s))
#endif
/* System call with warning */
static int
-do_stat(const char *path, struct stat *pst, int flags)
-
+do_stat(const char *path, struct stat *pst, int flags, rb_encoding *enc)
{
int ret = STAT(path, pst);
if (ret < 0 && !to_be_ignored(errno))
- sys_warning(path);
+ sys_warning(path, enc);
return ret;
}
#if defined HAVE_LSTAT || defined lstat
static int
-do_lstat(const char *path, struct stat *pst, int flags)
+do_lstat(const char *path, struct stat *pst, int flags, rb_encoding *enc)
{
int ret = lstat(path, pst);
if (ret < 0 && !to_be_ignored(errno))
- sys_warning(path);
+ sys_warning(path, enc);
return ret;
}
@@ -1069,10 +1243,8 @@ do_opendir(const char *path, int flags, rb_encoding *enc)
{
DIR *dirp;
#ifdef _WIN32
- volatile VALUE tmp;
- if (enc != rb_usascii_encoding() &&
- enc != rb_ascii8bit_encoding() &&
- enc != rb_utf8_encoding()) {
+ VALUE tmp = 0;
+ if (!fundamental_encoding_p(enc)) {
tmp = rb_enc_str_new(path, strlen(path), enc);
tmp = rb_str_encode_ospath(tmp);
path = RSTRING_PTR(tmp);
@@ -1080,17 +1252,23 @@ do_opendir(const char *path, int flags, rb_encoding *enc)
#endif
dirp = opendir(path);
if (dirp == NULL && !to_be_ignored(errno))
- sys_warning(path);
+ sys_warning(path, enc);
+#ifdef _WIN32
+ if (tmp) rb_str_resize(tmp, 0); /* GC guard */
+#endif
return dirp;
}
+/* Globing pattern */
+enum glob_pattern_type { PLAIN, ALPHA, MAGICAL, RECURSIVE, MATCH_ALL, MATCH_DIR };
+
/* Return nonzero if S has any special globbing chars in it. */
-static int
+static enum glob_pattern_type
has_magic(const char *p, const char *pend, int flags, rb_encoding *enc)
{
const int escape = !(flags & FNM_NOESCAPE);
- const int nocase = flags & FNM_CASEFOLD;
+ int hasalpha = 0;
register char c;
@@ -1099,22 +1277,32 @@ has_magic(const char *p, const char *pend, int flags, rb_encoding *enc)
case '*':
case '?':
case '[':
- return 1;
+ return MAGICAL;
case '\\':
- if (escape && !(c = *p++))
- return 0;
- continue;
+ if (escape && p++ >= pend)
+ continue;
+ break;
+#ifdef _WIN32
+ case '.':
+ break;
+
+ case '~':
+ hasalpha = 1;
+ break;
+#endif
default:
- if (!FNM_SYSCASE && ISALPHA(c) && nocase)
- return 1;
+ if (IS_WIN32 || ISALPHA(c)) {
+ hasalpha = 1;
+ }
+ break;
}
p = Next(p-1, pend, enc);
}
- return 0;
+ return hasalpha ? ALPHA : PLAIN;
}
/* Find separator in globbing pattern. */
@@ -1178,9 +1366,6 @@ remove_backslashes(char *p, register const char *pend, rb_encoding *enc)
return p;
}
-/* Globing pattern */
-enum glob_pattern_type { PLAIN, MAGICAL, RECURSIVE, MATCH_ALL, MATCH_DIR };
-
struct glob_pattern {
char *str;
enum glob_pattern_type type;
@@ -1199,7 +1384,7 @@ glob_make_pattern(const char *p, const char *e, int flags, rb_encoding *enc)
while (p < e && *p) {
tmp = GLOB_ALLOC(struct glob_pattern);
if (!tmp) goto error;
- if (p[0] == '*' && p[1] == '*' && p[2] == '/') {
+ if (p + 2 < e && p[0] == '*' && p[1] == '*' && p[2] == '/') {
/* fold continuous RECURSIVEs (needed in glob_helper) */
do { p += 3; while (*p == '/') p++; } while (p[0] == '*' && p[1] == '*' && p[2] == '/');
tmp->type = RECURSIVE;
@@ -1209,12 +1394,13 @@ glob_make_pattern(const char *p, const char *e, int flags, rb_encoding *enc)
}
else {
const char *m = find_dirsep(p, e, flags, enc);
- int magic = has_magic(p, m, flags, enc);
+ const enum glob_pattern_type magic = has_magic(p, m, flags, enc);
+ const enum glob_pattern_type non_magic = (USE_NAME_ON_FS || FNM_SYSCASE) ? PLAIN : ALPHA;
char *buf;
- if (!magic && !recursive && *m) {
+ if (!(FNM_SYSCASE || magic > non_magic) && !recursive && *m) {
const char *m2;
- while (!has_magic(m+1, m2 = find_dirsep(m+1, e, flags, enc), flags, enc) &&
+ while (has_magic(m+1, m2 = find_dirsep(m+1, e, flags, enc), flags, enc) <= non_magic &&
*m2) {
m = m2;
}
@@ -1226,7 +1412,7 @@ glob_make_pattern(const char *p, const char *e, int flags, rb_encoding *enc)
}
memcpy(buf, p, m-p);
buf[m-p] = '\0';
- tmp->type = magic ? MAGICAL : PLAIN;
+ tmp->type = magic > MAGICAL ? MAGICAL : magic > non_magic ? magic : PLAIN;
tmp->str = buf;
if (*m) {
dirsep = 1;
@@ -1283,7 +1469,165 @@ join_path(const char *path, long len, int dirsep, const char *name, size_t namle
return buf;
}
-enum answer {UNKNOWN = -1, NO, YES};
+#ifdef HAVE_GETATTRLIST
+# if defined HAVE_FGETATTRLIST
+# define is_case_sensitive(dirp, path) is_case_sensitive(dirp)
+# else
+# define is_case_sensitive(dirp, path) is_case_sensitive(path)
+# endif
+static int
+is_case_sensitive(DIR *dirp, const char *path)
+{
+ struct {
+ u_int32_t length;
+ vol_capabilities_attr_t cap[1];
+ } __attribute__((aligned(4), packed)) attrbuf[1];
+ struct attrlist al = {ATTR_BIT_MAP_COUNT, 0, 0, ATTR_VOL_INFO|ATTR_VOL_CAPABILITIES};
+ const vol_capabilities_attr_t *const cap = attrbuf[0].cap;
+ const int idx = VOL_CAPABILITIES_FORMAT;
+ const uint32_t mask = VOL_CAP_FMT_CASE_SENSITIVE;
+
+# if defined HAVE_FGETATTRLIST
+ if (fgetattrlist(dirfd(dirp), &al, attrbuf, sizeof(attrbuf), FSOPT_NOFOLLOW))
+ return -1;
+# else
+ if (getattrlist(path, &al, attrbuf, sizeof(attrbuf), FSOPT_NOFOLLOW))
+ return -1;
+# endif
+ if (!(cap->valid[idx] & mask))
+ return -1;
+ return (cap->capabilities[idx] & mask) != 0;
+}
+
+static char *
+replace_real_basename(char *path, long base, rb_encoding *enc, int norm_p, int flags, rb_pathtype_t *type)
+{
+ struct {
+ u_int32_t length;
+ attrreference_t ref[1];
+ fsobj_type_t objtype;
+ char path[MAXPATHLEN * 3];
+ } __attribute__((aligned(4), packed)) attrbuf[1];
+ struct attrlist al = {ATTR_BIT_MAP_COUNT, 0, ATTR_CMN_NAME|ATTR_CMN_OBJTYPE};
+ const attrreference_t *const ar = attrbuf[0].ref;
+ const char *name;
+ long len;
+ char *tmp;
+ IF_NORMALIZE_UTF8PATH(VALUE utf8str = Qnil);
+
+ *type = path_noent;
+ if (getattrlist(path, &al, attrbuf, sizeof(attrbuf), FSOPT_NOFOLLOW)) {
+ if (!to_be_ignored(errno))
+ sys_warning(path, enc);
+ return path;
+ }
+
+ switch (attrbuf[0].objtype) {
+ case VREG: *type = path_regular; break;
+ case VDIR: *type = path_directory; break;
+ case VLNK: *type = path_symlink; break;
+ default: *type = path_exist; break;
+ }
+ name = (char *)ar + ar->attr_dataoffset;
+ len = (long)ar->attr_length - 1;
+ if (name + len > (char *)attrbuf + sizeof(attrbuf))
+ return path;
+
+# if NORMALIZE_UTF8PATH
+ if (norm_p && has_nonascii(name, len)) {
+ if (!NIL_P(utf8str = rb_str_normalize_ospath(name, len))) {
+ RSTRING_GETMEM(utf8str, name, len);
+ }
+ }
+# endif
+
+ tmp = GLOB_REALLOC(path, base + len + 1);
+ if (tmp) {
+ path = tmp;
+ memcpy(path + base, name, len);
+ path[base + len] = '\0';
+ }
+ IF_NORMALIZE_UTF8PATH(if (!NIL_P(utf8str)) rb_str_resize(utf8str, 0));
+ return path;
+}
+#elif defined _WIN32
+VALUE rb_w32_conv_from_wchar(const WCHAR *wstr, rb_encoding *enc);
+int rb_w32_reparse_symlink_p(const WCHAR *path);
+
+static char *
+replace_real_basename(char *path, long base, rb_encoding *enc, int norm_p, int flags, rb_pathtype_t *type)
+{
+ char *plainname = path;
+ volatile VALUE tmp = 0;
+ WIN32_FIND_DATAW fd;
+ WIN32_FILE_ATTRIBUTE_DATA fa;
+ WCHAR *wplain;
+ HANDLE h = INVALID_HANDLE_VALUE;
+ long wlen;
+ int e = 0;
+ if (!fundamental_encoding_p(enc)) {
+ tmp = rb_enc_str_new_cstr(plainname, enc);
+ tmp = rb_str_encode_ospath(tmp);
+ plainname = RSTRING_PTR(tmp);
+ }
+ wplain = rb_w32_mbstr_to_wstr(CP_UTF8, plainname, -1, &wlen);
+ if (tmp) rb_str_resize(tmp, 0);
+ if (!wplain) return path;
+ if (GetFileAttributesExW(wplain, GetFileExInfoStandard, &fa)) {
+ h = FindFirstFileW(wplain, &fd);
+ e = rb_w32_map_errno(GetLastError());
+ }
+ if (fa.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) {
+ if (!rb_w32_reparse_symlink_p(wplain))
+ fa.dwFileAttributes &= ~FILE_ATTRIBUTE_REPARSE_POINT;
+ }
+ free(wplain);
+ if (h == INVALID_HANDLE_VALUE) {
+ *type = path_noent;
+ if (e && !to_be_ignored(e)) {
+ errno = e;
+ sys_warning(path, enc);
+ }
+ return path;
+ }
+ FindClose(h);
+ *type =
+ (fa.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) ? path_symlink :
+ (fa.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? path_directory :
+ path_regular;
+ if (tmp) {
+ char *buf;
+ tmp = rb_w32_conv_from_wchar(fd.cFileName, enc);
+ wlen = RSTRING_LEN(tmp);
+ buf = GLOB_REALLOC(path, base + wlen + 1);
+ if (buf) {
+ path = buf;
+ memcpy(path + base, RSTRING_PTR(tmp), wlen);
+ path[base + wlen] = 0;
+ }
+ rb_str_resize(tmp, 0);
+ }
+ else {
+ char *utf8filename;
+ wlen = WideCharToMultiByte(CP_UTF8, 0, fd.cFileName, -1, NULL, 0, NULL, NULL);
+ utf8filename = GLOB_REALLOC(0, wlen);
+ if (utf8filename) {
+ char *buf;
+ WideCharToMultiByte(CP_UTF8, 0, fd.cFileName, -1, utf8filename, wlen, NULL, NULL);
+ buf = GLOB_REALLOC(path, base + wlen + 1);
+ if (buf) {
+ path = buf;
+ memcpy(path + base, utf8filename, wlen);
+ path[base + wlen] = 0;
+ }
+ GLOB_FREE(utf8filename);
+ }
+ }
+ return path;
+}
+#elif USE_NAME_ON_FS == 1
+# error not implemented
+#endif
#ifndef S_ISDIR
# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
@@ -1304,23 +1648,35 @@ struct glob_args {
rb_encoding *enc;
};
+#define glob_call_func(func, path, arg, enc) (*(func))((path), (arg), (void *)(enc))
+
static VALUE
glob_func_caller(VALUE val)
{
struct glob_args *args = (struct glob_args *)val;
- (*args->func)(args->path, args->value, args->enc);
+ glob_call_func(args->func, args->path, args->value, args->enc);
return Qnil;
}
-#define glob_call_func(func, path, arg, enc) (*(func))((path), (arg), (enc))
+static inline int
+dirent_match(const char *pat, rb_encoding *enc, const char *name, const struct dirent *dp, int flags)
+{
+ if (fnmatch(pat, enc, name, flags) == 0) return 1;
+#ifdef _WIN32
+ if (dp->d_altname && (flags & FNM_SHORTNAME)) {
+ if (fnmatch(pat, enc, dp->d_altname, flags) == 0) return 1;
+ }
+#endif
+ return 0;
+}
static int
glob_helper(
const char *path,
+ long pathlen,
int dirsep, /* '/' should be placed before appending child entry's name to 'path'. */
- enum answer exist, /* Does 'path' indicate an existing entry? */
- enum answer isdir, /* Does 'path' indicate a directory or a symlink to a directory? */
+ rb_pathtype_t pathtype, /* type of 'path' */
struct glob_pattern **beg,
struct glob_pattern **end,
int flags,
@@ -1333,7 +1689,6 @@ glob_helper(
struct glob_pattern **cur, **new_beg, **new_end;
int plain = 0, magical = 0, recursive = 0, match_all = 0, match_dir = 0;
int escape = !(flags & FNM_NOESCAPE);
- long pathlen;
for (cur = beg; cur < end; ++cur) {
struct glob_pattern *p = *cur;
@@ -1345,8 +1700,15 @@ glob_helper(
case PLAIN:
plain = 1;
break;
- case MAGICAL:
+ case ALPHA:
+#if USE_NAME_ON_FS == 1
+ plain = 1;
+#else
magical = 1;
+#endif
+ break;
+ case MAGICAL:
+ magical = 2;
break;
case MATCH_ALL:
match_all = 1;
@@ -1359,33 +1721,28 @@ glob_helper(
}
}
- pathlen = strlen(path);
if (*path) {
- if (match_all && exist == UNKNOWN) {
- if (do_lstat(path, &st, flags) == 0) {
- exist = YES;
- isdir = S_ISDIR(st.st_mode) ? YES : S_ISLNK(st.st_mode) ? UNKNOWN : NO;
+ if (match_all && pathtype == path_unknown) {
+ if (do_lstat(path, &st, flags, enc) == 0) {
+ pathtype = IFTODT(st.st_mode);
}
else {
- exist = NO;
- isdir = NO;
+ pathtype = path_noent;
}
}
- if (match_dir && isdir == UNKNOWN) {
- if (do_stat(path, &st, flags) == 0) {
- exist = YES;
- isdir = S_ISDIR(st.st_mode) ? YES : NO;
+ if (match_dir && pathtype == path_unknown) {
+ if (do_stat(path, &st, flags, enc) == 0) {
+ pathtype = IFTODT(st.st_mode);
}
else {
- exist = NO;
- isdir = NO;
+ pathtype = path_noent;
}
}
- if (match_all && exist == YES) {
+ if (match_all && pathtype > path_noent) {
status = glob_call_func(func, path, arg, enc);
if (status) return status;
}
- if (match_dir && isdir == YES) {
+ if (match_dir && pathtype == path_directory) {
char *tmp = join_path(path, pathlen, dirsep, "", 0);
if (!tmp) return -1;
status = glob_call_func(func, tmp, arg, enc);
@@ -1394,23 +1751,53 @@ glob_helper(
}
}
- if (exist == NO || isdir == NO) return 0;
+ if (pathtype == path_noent) return 0;
if (magical || recursive) {
struct dirent *dp;
DIR *dirp;
- IF_HAVE_HFS(int hfs_p);
+# if USE_NAME_ON_FS == 2
+ char *plainname = 0;
+# endif
+ IF_NORMALIZE_UTF8PATH(int norm_p);
+# if USE_NAME_ON_FS == 2
+ if (cur + 1 == end && (*cur)->type <= ALPHA) {
+ plainname = join_path(path, pathlen, dirsep, (*cur)->str, strlen((*cur)->str));
+ if (!plainname) return -1;
+ dirp = do_opendir(plainname, flags, enc);
+ GLOB_FREE(plainname);
+ }
+ else
+# endif
dirp = do_opendir(*path ? path : ".", flags, enc);
- if (dirp == NULL) return 0;
- IF_HAVE_HFS(hfs_p = is_hfs(dirp));
+ if (dirp == NULL) {
+# if FNM_SYSCASE || NORMALIZE_UTF8PATH
+ if ((magical < 2) && !recursive && (errno == EACCES)) {
+ /* no read permission, fallback */
+ goto literally;
+ }
+# endif
+ return 0;
+ }
+ IF_NORMALIZE_UTF8PATH(norm_p = need_normalization(dirp, *path ? path : "."));
+# if NORMALIZE_UTF8PATH
+ if (!(norm_p || magical || recursive)) {
+ closedir(dirp);
+ goto literally;
+ }
+# endif
+# ifdef HAVE_GETATTRLIST
+ if (is_case_sensitive(dirp, path) == 0)
+ flags |= FNM_CASEFOLD;
+# endif
while ((dp = READDIR(dirp, enc)) != NULL) {
char *buf;
- enum answer new_isdir = UNKNOWN;
+ rb_pathtype_t new_pathtype = path_unknown;
const char *name;
size_t namlen;
int dotfile = 0;
- IF_HAVE_HFS(VALUE utf8str = Qnil);
+ IF_NORMALIZE_UTF8PATH(VALUE utf8str = Qnil);
if (recursive && dp->d_name[0] == '.') {
++dotfile;
@@ -1427,30 +1814,33 @@ glob_helper(
name = dp->d_name;
namlen = NAMLEN(dp);
-# if HAVE_HFS
- if (hfs_p && has_nonascii(name, namlen)) {
+# if NORMALIZE_UTF8PATH
+ if (norm_p && has_nonascii(name, namlen)) {
if (!NIL_P(utf8str = rb_str_normalize_ospath(name, namlen))) {
RSTRING_GETMEM(utf8str, name, namlen);
}
}
# endif
buf = join_path(path, pathlen, dirsep, name, namlen);
- IF_HAVE_HFS(if (!NIL_P(utf8str)) rb_str_resize(utf8str, 0));
+ IF_NORMALIZE_UTF8PATH(if (!NIL_P(utf8str)) rb_str_resize(utf8str, 0));
if (!buf) {
status = -1;
break;
}
name = buf + pathlen + (dirsep != 0);
if (recursive && dotfile < ((flags & FNM_DOTMATCH) ? 2 : 1)) {
- /* RECURSIVE never match dot files unless FNM_DOTMATCH is set */
-#ifndef _WIN32
- if (do_lstat(buf, &st, flags) == 0)
- new_isdir = S_ISDIR(st.st_mode) ? YES : S_ISLNK(st.st_mode) ? UNKNOWN : NO;
+#ifdef DT_UNKNOWN
+ if ((new_pathtype = dp->d_type) != (rb_pathtype_t)DT_UNKNOWN)
+ /* Got it. We need nothing more. */
+ ;
else
- new_isdir = NO;
-#else
- new_isdir = dp->d_isdir ? (!dp->d_isrep ? YES : UNKNOWN) : NO;
+ /* fall back to call lstat(2) */
#endif
+ /* RECURSIVE never match dot files unless FNM_DOTMATCH is set */
+ if (do_lstat(buf, &st, flags, enc) == 0)
+ new_pathtype = IFTODT(st.st_mode);
+ else
+ new_pathtype = path_noent;
}
new_beg = new_end = GLOB_ALLOC_N(struct glob_pattern *, (end - beg) * 2);
@@ -1463,17 +1853,30 @@ glob_helper(
for (cur = beg; cur < end; ++cur) {
struct glob_pattern *p = *cur;
if (p->type == RECURSIVE) {
- if (new_isdir == YES) /* not symlink but real directory */
+ if (new_pathtype == path_directory || /* not symlink but real directory */
+ new_pathtype == path_exist)
*new_end++ = p; /* append recursive pattern */
p = p->next; /* 0 times recursion */
}
- if (p->type == PLAIN || p->type == MAGICAL) {
- if (fnmatch(p->str, enc, name, flags) == 0)
+ switch (p->type) {
+ case ALPHA:
+# if USE_NAME_ON_FS == 2
+ if (plainname) {
+ *new_end++ = p->next;
+ break;
+ }
+# endif
+ case PLAIN:
+ case MAGICAL:
+ if (dirent_match(p->str, enc, name, dp, flags))
*new_end++ = p->next;
+ default:
+ break;
}
}
- status = glob_helper(buf, 1, YES, new_isdir, new_beg, new_end,
+ status = glob_helper(buf, name - buf + namlen, 1,
+ new_pathtype, new_beg, new_end,
flags, func, arg, enc);
GLOB_FREE(buf);
GLOB_FREE(new_beg);
@@ -1485,13 +1888,17 @@ glob_helper(
else if (plain) {
struct glob_pattern **copy_beg, **copy_end, **cur2;
+# if FNM_SYSCASE || NORMALIZE_UTF8PATH
+ literally:
+# endif
copy_beg = copy_end = GLOB_ALLOC_N(struct glob_pattern *, end - beg);
if (!copy_beg) return -1;
for (cur = beg; cur < end; ++cur)
- *copy_end++ = (*cur)->type == PLAIN ? *cur : 0;
+ *copy_end++ = (*cur)->type <= ALPHA ? *cur : 0;
for (cur = copy_beg; cur < copy_end; ++cur) {
if (*cur) {
+ rb_pathtype_t new_pathtype = path_unknown;
char *buf;
char *name;
size_t len = strlen((*cur)->str) + 1;
@@ -1525,8 +1932,16 @@ glob_helper(
status = -1;
break;
}
- status = glob_helper(buf, 1, UNKNOWN, UNKNOWN, new_beg,
- new_end, flags, func, arg, enc);
+#if USE_NAME_ON_FS == 1
+ if ((*cur)->type == ALPHA) {
+ long base = pathlen + (dirsep != 0);
+ buf = replace_real_basename(buf, base, enc, IF_NORMALIZE_UTF8PATH(1)+0,
+ flags, &new_pathtype);
+ }
+#endif
+ status = glob_helper(buf, pathlen + strlen(buf + pathlen), 1,
+ new_pathtype, new_beg, new_end,
+ flags, func, arg, enc);
GLOB_FREE(buf);
GLOB_FREE(new_beg);
if (status) break;
@@ -1554,7 +1969,7 @@ ruby_glob0(const char *path, int flags, ruby_glob_func *func, VALUE arg, rb_enco
root = rb_enc_path_skip_prefix(root, root + strlen(root), enc);
#endif
- if (root && *root == '/') root++;
+ if (*root == '/') root++;
n = root - start;
buf = GLOB_ALLOC_N(char, n + 1);
@@ -1567,7 +1982,8 @@ ruby_glob0(const char *path, int flags, ruby_glob_func *func, VALUE arg, rb_enco
GLOB_FREE(buf);
return -1;
}
- status = glob_helper(buf, 0, UNKNOWN, UNKNOWN, &list, &list + 1, flags, func, arg, enc);
+ status = glob_helper(buf, n, 0, path_unknown, &list, &list + 1,
+ flags, func, arg, enc);
glob_free_pattern(list);
GLOB_FREE(buf);
@@ -1621,7 +2037,15 @@ rb_glob(const char *path, void (*func)(const char *, VALUE, void *), VALUE arg)
static void
push_pattern(const char *path, VALUE ary, void *enc)
{
- rb_ary_push(ary, rb_external_str_new_with_enc(path, strlen(path), enc));
+#if defined _WIN32 || defined __APPLE__
+ VALUE name = rb_utf8_str_new_cstr(path);
+ rb_encoding *eenc = rb_default_internal_encoding();
+ OBJ_TAINT(name);
+ name = rb_str_conv_enc(name, NULL, eenc ? eenc : enc);
+#else
+ VALUE name = rb_external_str_new_with_enc(path, strlen(path), enc);
+#endif
+ rb_ary_push(ary, name);
}
static int
@@ -1639,7 +2063,7 @@ ruby_brace_expand(const char *str, int flags, ruby_glob_func *func, VALUE arg,
if (*p == '{' && nest++ == 0) {
lbrace = p;
}
- if (*p == '}' && --nest <= 0) {
+ if (*p == '}' && lbrace && --nest == 0) {
rbrace = p;
break;
}
@@ -1677,7 +2101,7 @@ ruby_brace_expand(const char *str, int flags, ruby_glob_func *func, VALUE arg,
GLOB_FREE(buf);
}
else if (!lbrace && !rbrace) {
- status = (*func)(s, arg, enc);
+ status = glob_call_func(func, s, arg, enc);
}
return status;
@@ -1697,12 +2121,12 @@ glob_brace(const char *path, VALUE val, void *enc)
return ruby_glob0(path, arg->flags, arg->func, arg->value, enc);
}
-static int
-ruby_brace_glob0(const char *str, int flags, ruby_glob_func *func, VALUE arg,
- rb_encoding* enc)
+int
+ruby_brace_glob_with_enc(const char *str, int flags, ruby_glob_func *func, VALUE arg, rb_encoding *enc)
{
struct brace_args args;
+ flags &= ~GLOB_VERBOSE;
args.func = func;
args.value = arg;
args.flags = flags;
@@ -1712,30 +2136,47 @@ ruby_brace_glob0(const char *str, int flags, ruby_glob_func *func, VALUE arg,
int
ruby_brace_glob(const char *str, int flags, ruby_glob_func *func, VALUE arg)
{
- return ruby_brace_glob0(str, flags & ~GLOB_VERBOSE, func, arg,
- rb_ascii8bit_encoding());
+ return ruby_brace_glob_with_enc(str, flags, func, arg, rb_ascii8bit_encoding());
}
-int
-ruby_brace_glob_with_enc(const char *str, int flags, ruby_glob_func *func, VALUE arg, rb_encoding *enc)
+struct push_glob_args {
+ struct glob_args glob;
+ int flags;
+};
+
+static int
+push_caller(const char *path, VALUE val, void *enc)
{
- return ruby_brace_glob0(str, flags & ~GLOB_VERBOSE, func, arg, enc);
+ struct push_glob_args *arg = (struct push_glob_args *)val;
+
+ return ruby_glob0(path, arg->flags, rb_glob_caller, (VALUE)&arg->glob, enc);
}
static int
push_glob(VALUE ary, VALUE str, int flags)
{
- struct glob_args args;
+ struct push_glob_args args;
rb_encoding *enc = rb_enc_get(str);
- if (enc == rb_usascii_encoding()) enc = rb_filesystem_encoding();
- args.func = push_pattern;
- args.value = ary;
- args.enc = enc;
+#if defined _WIN32 || defined __APPLE__
+ str = rb_str_encode_ospath(str);
+#endif
+ if (rb_enc_to_index(enc) == ENCINDEX_US_ASCII)
+ enc = rb_filesystem_encoding();
+ if (rb_enc_to_index(enc) == ENCINDEX_US_ASCII)
+ enc = rb_ascii8bit_encoding();
+ flags |= GLOB_VERBOSE;
+ args.glob.func = push_pattern;
+ args.glob.value = ary;
+ args.glob.enc = enc;
+ args.flags = flags;
+#if defined _WIN32 || defined __APPLE__
+ enc = rb_utf8_encoding();
+#endif
RB_GC_GUARD(str);
- return ruby_brace_glob0(RSTRING_PTR(str), flags | GLOB_VERBOSE,
- rb_glob_caller, (VALUE)&args, enc);
+ return ruby_brace_expand(RSTRING_PTR(str), flags,
+ push_caller, (VALUE)&args, enc);
}
static VALUE
@@ -1784,11 +2225,9 @@ dir_globs(long argc, const VALUE *argv, int flags)
/*
* call-seq:
- * Dir[ array ] -> array
* Dir[ string [, string ...] ] -> array
*
* Equivalent to calling
- * <code>Dir.glob(</code><i>array,</i><code>0)</code> and
* <code>Dir.glob([</code><i>string,...</i><code>],0)</code>.
*
*/
@@ -1892,8 +2331,9 @@ dir_s_glob(int argc, VALUE *argv, VALUE obj)
ary = rb_push_glob(str, flags);
}
else {
- volatile VALUE v = ary;
+ VALUE v = ary;
ary = dir_globs(RARRAY_LEN(v), RARRAY_CONST_PTR(v), flags);
+ RB_GC_GUARD(v);
}
if (rb_block_given_p()) {
@@ -2156,18 +2596,23 @@ dir_s_home(int argc, VALUE *argv, VALUE obj)
/*
* call-seq:
* Dir.exist?(file_name) -> true or false
- * Dir.exists?(file_name) -> true or false
*
* Returns <code>true</code> if the named file is a directory,
* <code>false</code> otherwise.
*
*/
VALUE
-rb_file_directory_p()
+rb_file_directory_p(void)
{
}
#endif
+/*
+ * call-seq:
+ * Dir.exists?(file_name) -> true or false
+ *
+ * Deprecated method. Don't use.
+ */
static VALUE
rb_dir_exists_p(VALUE obj, VALUE fname)
{
@@ -2199,6 +2644,7 @@ Init_Dir(void)
rb_define_singleton_method(rb_cDir, "entries", dir_entries, -1);
rb_define_method(rb_cDir,"initialize", dir_initialize, -1);
+ rb_define_method(rb_cDir,"fileno", dir_fileno, 0);
rb_define_method(rb_cDir,"path", dir_path, 0);
rb_define_method(rb_cDir,"to_path", dir_path, 0);
rb_define_method(rb_cDir,"inspect", dir_inspect, 0);
@@ -2261,5 +2707,18 @@ Init_Dir(void)
* Allows file globbing through "{a,b}" in File.fnmatch patterns.
*/
rb_file_const("FNM_EXTGLOB", INT2FIX(FNM_EXTGLOB));
+
+ /* Document-const: File::Constants::FNM_SYSCASE
+ *
+ * System default case insensitiveness, equals to FNM_CASEFOLD or
+ * 0.
+ */
rb_file_const("FNM_SYSCASE", INT2FIX(FNM_SYSCASE));
+
+ /* Document-const: File::Constants::FNM_SHORTNAME
+ *
+ * Makes patterns to match short names if existing. Valid only
+ * on Microsoft Windows.
+ */
+ rb_file_const("FNM_SHORTNAME", INT2FIX(FNM_SHORTNAME));
}
diff --git a/dln.c b/dln.c
index e6b20d54e3..0f918af090 100644
--- a/dln.c
+++ b/dln.c
@@ -47,6 +47,7 @@ void *xcalloc();
void *xrealloc();
#endif
+#undef free
#define free(x) xfree(x)
#include <stdio.h>
@@ -84,10 +85,6 @@ char *getenv();
# endif
#endif
-#if defined(__BEOS__) || defined(__HAIKU__)
-# include <image.h>
-#endif
-
#ifndef dln_loaderror
static void
dln_loaderror(const char *format, ...)
@@ -105,13 +102,12 @@ dln_loaderror(const char *format, ...)
# define USE_DLN_DLOPEN
#endif
-#ifndef FUNCNAME_PATTERN
-# if defined(__hp9000s300) || ((defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)) && !defined(__ELF__)) || defined(__BORLANDC__) || defined(NeXT) || defined(__WATCOMC__) || defined(MACOSX_DYLD)
-# define FUNCNAME_PREFIX "_Init_"
-# else
-# define FUNCNAME_PREFIX "Init_"
-# endif
+#if defined(__hp9000s300) || ((defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)) && !defined(__ELF__)) || defined(NeXT) || defined(MACOSX_DYLD)
+# define EXTERNAL_PREFIX "_"
+#else
+# define EXTERNAL_PREFIX ""
#endif
+#define FUNCNAME_PREFIX EXTERNAL_PREFIX"Init_"
#if defined __CYGWIN__ || defined DOSISH
#define isdirsep(x) ((x) == '/' || (x) == '\\')
@@ -1117,12 +1113,12 @@ dln_sym(const char *name)
#endif
#endif
-#if defined _WIN32 && !defined __CYGWIN__
+#ifdef _WIN32
#include <windows.h>
#include <imagehlp.h>
#endif
-#if defined _WIN32 && !defined __CYGWIN__
+#ifdef _WIN32
static const char *
dln_strerror(char *message, size_t size)
{
@@ -1178,25 +1174,26 @@ dln_strerror(void)
static void
aix_loaderror(const char *pathname)
{
- char *message[1024], errbuf[1024];
- int i;
-#define ERRBUF_APPEND(s) strncat(errbuf, (s), sizeof(errbuf)-strlen(errbuf)-1)
- snprintf(errbuf, sizeof(errbuf), "load failed - %s. ", pathname);
-
- if (loadquery(L_GETMESSAGES, &message[0], sizeof(message)) != -1) {
- ERRBUF_APPEND("Please issue below command for detailed reasons:\n\t");
- ERRBUF_APPEND("/usr/sbin/execerror ruby ");
- for (i=0; message[i]; i++) {
- ERRBUF_APPEND("\"");
- ERRBUF_APPEND(message[i]);
- ERRBUF_APPEND("\" ");
+ char *message[1024], errbuf[1024];
+ int i;
+#define ERRBUF_APPEND(s) strlcat(errbuf, (s), sizeof(errbuf))
+ snprintf(errbuf, sizeof(errbuf), "load failed - %s. ", pathname);
+
+ if (loadquery(L_GETMESSAGES, &message[0], sizeof(message)) != -1) {
+ ERRBUF_APPEND("Please issue below command for detailed reasons:\n\t");
+ ERRBUF_APPEND("/usr/sbin/execerror ruby ");
+ for (i=0; message[i]; i++) {
+ ERRBUF_APPEND("\"");
+ ERRBUF_APPEND(message[i]);
+ ERRBUF_APPEND("\" ");
+ }
+ ERRBUF_APPEND("\n");
}
- ERRBUF_APPEND("\n");
- } else {
- ERRBUF_APPEND(strerror(errno));
- ERRBUF_APPEND("[loadquery failed]");
- }
- dln_loaderror("%s", errbuf);
+ else {
+ ERRBUF_APPEND(strerror(errno));
+ ERRBUF_APPEND("[loadquery failed]");
+ }
+ dln_loaderror("%s", errbuf);
}
#endif
@@ -1253,22 +1250,27 @@ dln_load(const char *file)
#define DLN_ERROR() (error = dln_strerror(), strcpy(ALLOCA_N(char, strlen(error) + 1), error))
#endif
-#if defined _WIN32 && !defined __CYGWIN__
+#if defined _WIN32
HINSTANCE handle;
- char winfile[MAXPATHLEN];
+ WCHAR *winfile;
char message[1024];
void (*init_fct)();
char *buf;
- if (strlen(file) >= MAXPATHLEN) dln_loaderror("filename too long");
-
/* Load the file as an object one */
init_funcname(&buf, file);
- strlcpy(winfile, file, sizeof(winfile));
+ /* Convert the file path to wide char */
+ winfile = rb_w32_mbstr_to_wstr(CP_UTF8, file, -1, NULL);
+ if (!winfile) {
+ dln_memerror();
+ }
/* Load file */
- if ((handle = LoadLibrary(winfile)) == NULL) {
+ handle = LoadLibraryW(winfile);
+ free(winfile);
+
+ if (!handle) {
error = dln_strerror();
goto failed;
}
@@ -1318,33 +1320,32 @@ dln_load(const char *file)
# define RTLD_GLOBAL 0
#endif
-#ifdef __native_client__
- char* p, *orig;
- if (file[0] == '.' && file[1] == '/') file+=2;
- orig = strdup(file);
- for (p = file; *p; ++p) {
- if (*p == '/') *p = '_';
- }
-#endif
/* Load file */
if ((handle = (void*)dlopen(file, RTLD_LAZY|RTLD_GLOBAL)) == NULL) {
-#ifdef __native_client__
- free(orig);
-#endif
error = dln_strerror();
goto failed;
}
+# if defined RUBY_EXPORT
+ {
+ static const char incompatible[] = "incompatible library version";
+ void *ex = dlsym(handle, EXTERNAL_PREFIX"ruby_xmalloc");
+ if (ex && ex != ruby_xmalloc) {
+
+# if defined __APPLE__ && \
+ defined(MAC_OS_X_VERSION_MIN_REQUIRED) && \
+ (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_11)
+ /* dlclose() segfaults */
+ rb_fatal("%s - %s", incompatible, file);
+# else
+ dlclose(handle);
+ error = incompatible;
+ goto failed;
+# endif
+ }
+ }
+# endif
init_fct = (void(*)())(VALUE)dlsym(handle, buf);
-#ifdef __native_client__
- strcpy(file, orig);
- free(orig);
-#endif
-#if defined __SYMBIAN32__
- if (init_fct == NULL) {
- init_fct = (void(*)())dlsym(handle, "1"); /* Some Symbian versions do not support symbol table in DLL, ordinal numbers only */
- }
-#endif
if (init_fct == NULL) {
error = DLN_ERROR();
dlclose(handle);
@@ -1439,54 +1440,6 @@ dln_load(const char *file)
}
#endif
-#if defined(__BEOS__) || defined(__HAIKU__)
-# define DLN_DEFINED
- {
- status_t err_stat; /* BeOS error status code */
- image_id img_id; /* extension module unique id */
- void (*init_fct)(); /* initialize function for extension module */
-
- /* load extension module */
- img_id = load_add_on(file);
- if (img_id <= 0) {
- dln_loaderror("Failed to load add_on %.200s error_code=%x",
- file, img_id);
- }
-
- /* find symbol for module initialize function. */
- /* The Be Book KernelKit Images section described to use
- B_SYMBOL_TYPE_TEXT for symbol of function, not
- B_SYMBOL_TYPE_CODE. Why ? */
- /* strcat(init_fct_symname, "__Fv"); */ /* parameter nothing. */
- /* "__Fv" dont need! The Be Book Bug ? */
- err_stat = get_image_symbol(img_id, buf,
- B_SYMBOL_TYPE_TEXT, (void **)&init_fct);
-
- if (err_stat != B_NO_ERROR) {
- char real_name[MAXPATHLEN];
-
- strlcpy(real_name, buf, MAXPATHLEN);
- strlcat(real_name, "__Fv", MAXPATHLEN);
- err_stat = get_image_symbol(img_id, real_name,
- B_SYMBOL_TYPE_TEXT, (void **)&init_fct);
- }
-
- if ((B_BAD_IMAGE_ID == err_stat) || (B_BAD_INDEX == err_stat)) {
- unload_add_on(img_id);
- dln_loaderror("Failed to lookup Init function %.200s", file);
- }
- else if (B_NO_ERROR != err_stat) {
- char errmsg[] = "Internal of BeOS version. %.200s (symbol_name = %s)";
- unload_add_on(img_id);
- dln_loaderror(errmsg, strerror(err_stat), buf);
- }
-
- /* call module initialize function. */
- (*init_fct)();
- return (void*)img_id;
- }
-#endif /* __BEOS__ || __HAIKU__ */
-
#ifndef DLN_DEFINED
dln_notimplement();
#endif
diff --git a/dln_find.c b/dln_find.c
index f41ceb051d..b17b0d23e1 100644
--- a/dln_find.c
+++ b/dln_find.c
@@ -78,11 +78,12 @@ dln_find_exe_r(const char *fname, const char *path, char *buf, size_t size
}
if (!path) {
-#if defined(_WIN32)
- path = "/usr/local/bin;/usr/ucb;/usr/bin;/bin;.";
-#else
- path = "/usr/local/bin:/usr/ucb:/usr/bin:/bin:.";
-#endif
+ path =
+ "/usr/local/bin" PATH_SEP
+ "/usr/ucb" PATH_SEP
+ "/usr/bin" PATH_SEP
+ "/bin" PATH_SEP
+ ".";
}
buf = dln_find_1(fname, path, buf, size, 1 DLN_FIND_EXTRA_ARG);
if (envpath) free(envpath);
@@ -275,13 +276,15 @@ dln_find_1(const char *fname, const char *path, char *fbuf, size_t size,
}
goto next;
}
-#endif /* _WIN32 or __EMX__ */
+#endif
- if (stat(fbuf, &st) == 0) {
+#ifndef S_ISREG
+# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
+#endif
+ if (stat(fbuf, &st) == 0 && S_ISREG(st.st_mode)) {
if (exe_flag == 0) return fbuf;
/* looking for executable */
- if (!S_ISDIR(st.st_mode) && eaccess(fbuf, X_OK) == 0)
- return fbuf;
+ if (eaccess(fbuf, X_OK) == 0) return fbuf;
}
next:
/* if not, and no other alternatives, life is bleak */
diff --git a/dmyenc.c b/dmyenc.c
new file mode 100644
index 0000000000..7e006e826c
--- /dev/null
+++ b/dmyenc.c
@@ -0,0 +1,10 @@
+#define require(name) ruby_require_internal(name, (unsigned int)sizeof(name)-1)
+int ruby_require_internal(const char *, int);
+
+void
+Init_enc(void)
+{
+ if (require("enc/encdb.so") == 1) {
+ require("enc/trans/transdb.so");
+ }
+}
diff --git a/dmyext.c b/dmyext.c
index 34ea7a02f4..4d273f7faf 100644
--- a/dmyext.c
+++ b/dmyext.c
@@ -2,8 +2,3 @@ void
Init_ext(void)
{
}
-
-void
-Init_enc(void)
-{
-}
diff --git a/doc/ChangeLog-0.06_to_0.52 b/doc/ChangeLog-0.06_to_0.52
new file mode 100644
index 0000000000..63826081b3
--- /dev/null
+++ b/doc/ChangeLog-0.06_to_0.52
@@ -0,0 +1,1147 @@
+Fri Oct 14 13:22:18 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * version 0.52: ……なんてこったい.
+
+ * eval.c(rb_call): returnの処理が間違っていたので, マシンによって
+ はreturnで関数を終了するだけでなくtoplevelまでつき抜けていた.
+
+ * object.c: Builtinクラスを新設. 組み込み関数をKernelから移した.
+ nilが組み込み関数を理解するとトラブルの元である.
+
+ * dbm.c: Dictと同様にeachが[key,value]を返すように.
+
+ * version 0.51
+
+Thu Oct 13 12:13:48 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * eval.c(SETUP_ARGS): 付加演算子が配列でない時には配列に変換する.
+
+ * parse.y: 括弧なしのメソッド呼び出しでも`*'による付加引数が使える
+ ようにした. ただし, 通常引数が一つもない場合は乗算演算子と区別が
+ つかないので, 必ず括弧が必要.
+
+Wed Oct 12 10:09:07 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * eval.c(rb_call): キャッシュの計算をinline化. キャッシュミスがあ
+ れば関数呼び出しでメソッドを検索する. methods.cはなくなった.
+
+ * eval.c(rb_eval): ローカル変数用の領域をalloca()するように変更.
+ サイズの変更が必要になれば改めてmalloc()するように.
+
+ * parse.y: error recoveryの際にlex_stateを更新しておくように.
+
+Tue Oct 11 17:10:46 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * socket.c(for_fd): ファイル記述子(Fixnum)からソケットインスタンス
+ を得るメソッド. たとえばinetdから起動されたサーバで標準入出力に
+ ソケット操作を行なうために使う. つまりSocket.for_fd($stdin)で標
+ 準入力に対応するソケットオブジェクトが得られる.
+
+ * io.c(to_i): IOクラスのインスタンスを整数に変換するとそのファイル
+ 記述子を返すように.
+
+ * numeric.c(num2int): to_iメソッドを使ってできる限り整数に変換する.
+ 以前はnum2fixだけが全てのオブジェクトに対してto_iメソッドを適用
+ していた.
+
+ * sprintf.c(Fsprintf): 整数表示の際, オブジェクトをできる限り整数
+ に変換するように(to_iメソッドを使う).
+
+Fri Oct 7 14:06:32 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * eval.c(Fcaller): 必要性がよく分からないのでドキュメントから削除.
+ 将来デバッガを作る時に復活させよう.
+
+ * eval.c(rb_call): Cで記述されたメソッド呼び出しでは環境をスタック
+ にセーブしないことによって高速化.
+
+Wed Oct 5 15:00:58 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * ruby.h: 一時env.hに移動してたQselfの定義を復活. ただし今回は関数
+ として実現(env.hでは変数として再定義してある).
+
+ * ruby.h: TRUEでsyntax errorにならないよう#undefを追加.
+
+ * eval.c(rb_eval): thread化に挑戦したが, 失敗(速くならなかった).
+ が, Scopingなどの無駄なコードの削除とメソッド呼び出しの引数セッ
+ トのinline化で若干の高速化を実現した. 副作用として, argc, argv形
+ 式の関数呼び出しの仕様が変化した(argvにselfを含まなくなった).
+
+ * eval.c(rb_call): メソッド呼び出しの高速化.
+
+Tue Oct 4 11:40:53 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * ruby-mode.el: 修飾子に対応した.
+
+ * parse.y: 多重代入にrestをつけた. この機能を使えばoptional引数の
+ 解析が簡単にできる(はず).
+
+ * pack.c(unpack): uuencode形式のdecodeの際に文字列の長さが間違って
+ いた.
+
+Mon Oct 3 15:58:41 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * file.c(type): ファイルタイプを文字列で返すメソッド.
+
+Fri Sep 30 11:36:07 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * object.c: デフォルトの真の値である%TRUEの値を1(Fixnum)からtに変
+ 更した. to_sで文字列に変換した時にも`t'と表示される. 更に踏み込
+ んで`t'を予約語にしてlispのようにしようかとも思ったが, そこまで
+ は決心できなかった. 一文字のローカル変数はかなり使いそうな気がす
+ るので….
+
+ * array.c,dict.c: equalを再定義しているクラスで, hashを正しく定義
+ した.
+
+Wed Sep 28 23:30:28 1994 Yukihiro Matsumoto (matz@dyna)
+
+ * eval.c(Ffail): 今までfailはカーネルクラスのメソッドであったが,
+ 構文に組み込んだ. この変更によって, 1)`fail'は予約語となり, ロー
+ カル変数に用いることができなくなった. 2)`fail'単体で例外を発生す
+ るようになった. 3)failはメソッドではなくなったので再定義される可
+ 能性がなくなった.
+
+ * dic.c, dbm.c(indexes): Arrayのindexesと同様の機能を持つメソッド
+ を追加.
+
+ * array.c(indexes): 引数をインデックスとする要素の配列を返す. 整数
+ の配列を引数とする時には引数の要素をインデックスとする要素の配列
+ を返す.
+
+Mon Sep 19 13:42:31 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * array.c(aset): 部分配列に対する代入で配列以外のオブジェクトが指
+ 定された場合に多重代入と同じルールで配列化するようにした.
+
+ * io.c(print): 引数として与えられた各オブジェクトにprint_onメッセー
+ ジを与えるように. 実行速度は落ちるが柔軟性は増す.
+
+Fri Sep 16 14:59:18 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * glob.c: ワイルドカードの導入. bashに使われているGNUのglobルーチ
+ ンを流用した.
+
+Mon Sep 12 18:36:58 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * parse.y(value_expr): 式がnilの時に対応.
+
+ * class.c: ICLASSのclassが必ずClass/Moduleを指すように.
+
+Tue Sep 6 16:23:28 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * re.c: 正規表現内で「\数字」形式が指定できるように.
+
+ * parse.y:「do expr using var ... end」形式はなくなった. 寂しい気
+ もする. *BACKWARD INCOMPATIBILITY*
+
+Mon Sep 5 10:59:01 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * numeric.c(next): Numericクラスにもnextを提供.
+
+ * string.c(upto): uptoを提供.
+
+ * range.c(each): nextを使ったインタフェースからuptoを使うように変
+ 更した. この方が一つのメソッドで処理をまとめで行なうことができる.
+
+Fri Sep 2 15:25:39 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * dict.c(each): 戻り値を[key, value]のペアに変更. 今までのeachは
+ each_valueとして残る. *BACKWARD INCOMPATIBILITY*
+
+Thu Sep 1 10:49:04 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * 成功した(特別な戻り値を持たない)システムコールは`0'を返すように.
+
+Wed Aug 31 00:26:51 1994 Yukihiro Matsumoto (matz@dyna)
+
+ * string.c: チェックサムを得るメソッド`sum'を作った.
+
+ * class.c(include_class_new): ICLASSのclassをもとのクラスにした.
+ gcの際に元クラスをマークする必要があるのが, フィールドを増やす余
+ 地が無いので, classフィールドを流用した. 私の見積りが間違ってい
+ て, ICLASSのインスタンスにメッセージを送る事があれば, おかしな動
+ 作をするだろう.
+
+ * eval.c(masign): 式(a,b = nil)の値を[nil]からnilに変更した.
+
+Mon Aug 29 11:56:09 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * class.c: rb_define_mfuncを無くして, メタクラスにモジュールをイン
+ クルードするようにした.
+
+ * error.c(yyerror): 同じ行で複数のsyntax errorをリポートしないよう
+ にした.
+
+ * file.c: FileTestモジュールにファイルテストメソッドを分離した.
+
+ * parse.y: 演算子を指定する時のlex_stateを正しく設定した.
+
+Sat Aug 27 01:23:34 1994 Yukihiro Matsumoto (matz@dyna)
+
+ * parse.y: if/whileなどの複合式をprimaryに移動した. これによって例
+ えば「if cond then a else b end.message()」のような式が書けるよ
+ うになった.
+
+Fri Aug 26 10:46:30 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * spec: 整理された文法にしたがって書き直した.
+
+ * parse.y: ここ数日で混乱していた文法を整理した. 括弧を省略したメ
+ ソッド呼び出しができるようになったこと, modifierが付けられるよう
+ になったこと, returnにリストが渡せるようになったことが主な変更点
+ である.
+
+ * process周りが怪しいがとにかくSolaris 2.3で動くように.
+
+ * parse.y: 曖昧性がない場合にはメソッド呼び出しの引数の括弧を省略
+ できるように. 省略できるメソッド呼び出しの条件は, 1)かならず1個
+ 以上の引数を必要とすること, 2)第1引数が`+', `-', `(', `[', `{',
+ `/'など, 式の始まりに置かれた時と途中に現れた時とで解釈が違う記
+ 号で始まらないこと, である.
+
+Thu Aug 25 13:54:58 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * parse.y(cond): 条件式の展開部にbugがあった.
+
+Wed Aug 24 00:01:15 1994 Yukihiro Matsumoto (matz@dyna)
+
+ * parse.y: returnはコンマで区切ったリストも受け取るように. つまり,
+ return a, b, cはreturn [a, b, c]と同じ意味になる.
+
+ * parse.y: yield以外の大域脱出制御式をexprからexpr0に移した. よっ
+ てメソッドの引数に制御式を使えなくなる(これで困る人はいないはず).
+
+ * parse.y: `+'の定数展開の際に演算子の優先順位を忘れていた.
+
+ * eval.c: untilの戻り値はnilになった.
+
+ * parse.y: modifierとしてのif/unless/while/untilを追加.
+
+ * parse.y: 文法からendの後ろにつけるキーワードを削除. ほとんど使わ
+ なかった上に, emacsではruby-modeがあれば対応のチェックが機械的に
+ 出来るため.
+
+Tue Aug 23 18:08:33 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * eval.c: スクリプト実行開始前に例外が発生した時にcore dumpした.
+ 組み込み用にコードを変更した時にenbugしてしまった.
+
+Tue Aug 23 00:07:17 1994 Yukihiro Matsumoto (matz@dyna)
+
+ * eval.c: doの戻り値がいつもnilになっていた.
+
+ * parse.y: loop制御変数の多重代入化にbugがあった.
+
+ * parse.y(expand_op): 文字列も畳み込みの対象に.
+
+Mon Aug 22 10:50:01 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * parse.y(expand_op): `+'に関しては結合則を使って, より多く定数畳
+ み込みを行なうように.
+
+ * ruby.c(proc_options): argcが0の時にも対応.
+
+ * parse.y: forなどの制御変数に多重代入も使えるように.
+
+Sat Aug 20 00:59:40 1994 Yukihiro Matsumoto (matz@dyna)
+
+ * parse.y(call_op): 演算子`~'の取り扱いをルール部へ移動.
+
+Fri Aug 19 11:44:13 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * main.c: rubyをほかのプログラムに組み込めるようにmain()を分割した.
+ それにともない, プログラムの呼び出し構造を修正した.
+
+ * parse.y: 条件式の定義を変更. ifなどの条件式の中でだけ`&&'や`||'
+ および`!'の引数が条件式になるように. この変更により条件式以外の
+ 場所での `&&', `||', `!'演算子の動作が直観に一致する.
+
+ * parse.y: 実引数の`*'の後に続く引数はexprに制限した. 今までは全て
+ の文が有効であったが, ここで定義文があってもしょうがない.
+
+Thu Aug 18 10:21:45 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * re.c: 正規表現ルーチンの初期化部分を削除してしまっていた. これで
+ はemacsの正規表現になってしまう.
+
+ * version.c: copyright表示を追加.
+
+ * version.c: バージョン表示をstderrに.
+
+ * configure.in: gccがない場合testに失敗していた.
+
+Fri Aug 12 14:12:23 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * array.c(astore): 配列の拡大する時にある程度の大きさをまとめて拡
+ 大するように.
+
+ * io.c(Fprint): 配列に対しては一度文字列に変換することなく, 直接内
+ 容を出力するように.
+
+ * string.c(str_new): memmoveからmemcpyへ置き換えた. これでもかなり
+ 速度が違う.
+
+ * ruby.h: データメンバの取り出しで名前を文字列からIDで指定するよう
+ にした. かなりの高速化になる.
+
+ * io.c: $ARGFという変数で引数列からなる仮想ファイルをオブジェクト
+ として扱えるようにした. 今まではトップレベルのgets()などを使って
+ アクセスしていたが, どうもオブジェクト指向的ではなかった.
+
+Thu Aug 11 11:43:15 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * gc.c: mark_location()の間違った呼び出し方の行が残っていた.
+
+ * method.c: プロトタイプ宣言が足りなかった.
+
+Wed Aug 10 15:54:46 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * variable.c: -vオプションが指定されている時は初期化されていない,
+ 大域変数, インスタンス変数, ローカル変数を参照した時点でwarning
+ を出すようにした.
+
+Tue Aug 9 11:50:48 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * bignum.c: 冪乗に関しても多倍長演算を行なうように. 特に浮動小数点
+ 数の範囲を越えた時の処理を的確に行なうように.
+
+ * eval.c: メソッド定義後は構文木から, メソッド定義部分を外す. 無駄
+ な再定義が起こらないようにするためと2重にfree()されないため.
+
+ * array.c(Fary_aref): 引数が1つでFixnumの時, Range checkを行なわな
+ いように修正.
+
+ * eval.c: メソッドの引数の数をコンパイル時に計算して若干の高速化.
+
+Mon Aug 8 13:06:24 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * object.c: nilによる比較連鎖をなくした.
+
+ * parse.y: bit演算子の優先順位を比較演算子よりも強くした. Cとは異
+ なることになるが, 直観には合致する.
+
+ * gc.c: クラスを解放する時, 個々のメソッド毎にキャッシュをクリアす
+ るのではなく, クラス単位でクリアするように.
+
+Thu Aug 4 18:45:09 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * methods.c(method_free): 解放されたメソッドに関してキャッシュをク
+ リアしておく必要があった.
+
+ * gc.c: Dataクラスのデータ部分をfree()し忘れていた.
+
+Wed Aug 3 09:58:14 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * parse.y: def func .. end形式による関数メソッドの定義はなくなった.
+
+ * methods.c: func形式のメソッドをなくした. あっても, あまり意味が
+ ないので.
+
+ * eval.c: $0への代入でps(1)の出力が変化するように.
+
+ * io.c(Fsyscall): syscall()を実現.
+
+Mon Aug 1 13:41:11 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * parse.y: ダブルクォートで囲まれた文字列や正規表現中で"#{変数名}"
+ または"#変数名"という形式で変数の内容を埋め込むことができるよう
+ になった.
+
+ * io.c: 関数メソッドsystem2()はなくなった. 今はバッククォートがあ
+ るからね.
+
+ * parse.y: `cmd`によってコマンドを文字列に展開することができるよう
+ になった.
+
+ * parse.y: __FILE__, __LINE__を追加. それぞれファイル名(文字列),
+ 行番号(整数)を値とする疑似変数.
+
+Fri Jul 29 13:16:07 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * methods.h: メソッドをオブジェクトとして扱うのをやめる. メソッド
+ のメモリ管理にはリファレンスカウントを使うことにした. これでオブ
+ ジェクトの数が減ってほんの少しだけGCが速くなる(かな).
+
+ * purifyによってメモリ関係のバグを検査した(見つかる,見つかる…).
+
+ * gc.c: GCをプログラマが変数をマークする形式から, スタックとレジス
+ タからマークする方法に変更. 移植性が下がるような気もするが, siod
+ やscmでも採用されているから多分大丈夫だろう. Linux on i486でも動
+ 作を確認した.
+
+Wed Jul 27 16:13:13 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * eval.c(Eval): トップレベルでは構造木をfreeしないように. どうせ解
+ 放されるから時間の無駄である.
+
+ * array.c, dict.c: "=="を構造一致に変更.
+
+Fri Jul 22 10:14:09 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * error.c: 組み込みタイプの名前を登録し忘れていた.
+
+Thu Jul 21 14:06:48 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * parse.y(freenode),eval.c(Eval): 解析木を解放し忘れていた.
+
+Mon Jul 18 10:19:15 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * parse.y: 多重代入を処理するルールにバグがあって, 3要素以上の多重
+ 代入に失敗していた.
+
+ * eval.c(rb_eval): 多重代入で, 右辺が配列でない時には`to_a'メソッ
+ ドで配列に変換して代入するようにした. 今までの仕様だと右辺値が第
+ 1要素にそのまま代入されていたが, structなど配列に変換できるもの
+ は変換した方が嬉しい気がする.
+
+ * dbm.c,dict.c(delete_if): メソッド追加.
+
+ * process.c(wait,waitpid): システムコールwaitpidまたはwait4がある
+ 時はそちらを使うように. configureもそれらをチェックするように変更.
+
+ * dbm.c, dict.c(clear): メソッド追加.
+
+Fri Jul 15 10:54:45 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * array.c(Fary_fill,Fary_clear): メソッドを追加.
+
+ * string.c(Fstr_split): $;の値が長さ1の文字列である時, これを正規
+ 表現化しないで, 単なる文字として分割する.
+
+ * string.c(Fstr_aset/Fstr_aref): インデックスが文字列の範囲外だっ
+ た時の動作をArrayを参考に修正した.
+
+ * array.c(astore,Fary_aset): 領域をreallocした後, ゼロでクリアする
+ ように. 今まで配列にゴミが入っていた.
+
+ * array.c: []/[]=でのインデックス関係を整理. 基本的に負のインデッ
+ クスに代入しない限り例外は起きないように変更した. 必要に応じて適
+ 当に解釈して, 必要ならば領域を拡張するように.
+
+Thu Jul 14 11:18:07 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * autoexec.c: 削除. autoload関係の機能は今後検討しよう.
+
+ * dict.c: 辞書クラスの正式名称をDictに変更した. 別名としてHashを用
+ 意した. 今までDictionaryなどと長い名前にしていたが誰も使っていな
+ かったしね. *BACKWARD INCOMPATIBILITY*
+
+ * parse.y: Dictを生成する構文を追加. こちらを{..}にした.
+
+ * parse.y: 配列を生成する構文を[..]に変更した. 過去のRubyスクリプ
+ トとの互換性が保てないが, Dictを生成する構文を導入するに当たり,
+ perl5に合わせて(意識して), 変更する時期は今しかないと考えた.
+ *BACKWARD INCOMPATIBILITY*
+
+ * eval.c(Feval): eval()でメソッドを定義する時, 定義されるクラスを
+ メソッドの所属するクラスにした. 今まではObjectクラスに定義されて
+ いた.
+
+ * parse.y: ローカル引数がない時のeval()で落ちていた.
+
+Tue Jul 12 09:41:28 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * pack.c: uuencode形式のサポート.
+
+ * `-0'を`-R'に. 出力レコードセパレータをコマンドラインから指定する
+ 方法はなくなった. どうも, 仕様がゆれるなあ.
+
+Mon Jul 11 09:51:24 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * ruby.c: `-r'オプションは`-0'オプションになった. 当面は`-r'も有効
+ だが変更される可能性がある. `-R'は当面はそのまま.
+
+ * version.c: version表示に日付を含めた.
+
+ * parse.y: private methodの復活. RubyのprivateメソッドはC++におけ
+ るprotected methodに該当するもので, `@'で始まる名前を持つ.
+
+ * env.h: struct ENVIRONの定義を分離.
+
+ * parse.y: `\$var', `\@var', `%var'も許すように.
+
+ * variable.c(Fdefined): idも引数として受け付けるように.
+
+ * parse.y: if文/unless文にキーワードthenを追加. thenなしというのは,
+ 意外と間違いが多いので. もちろん省略できる.
+
+Sat Jul 9 02:16:04 1994 Yukihiro Matsumoto (matz@dyna)
+
+ * eval.c(rb_eval): class/moduleの評価で新しいスコープを割り当てて
+ いなかった. スコープ割り当て部分をrb_call()からrb_eval()に移した.
+
+ * eval.c(rb_call): realloc()に渡される事のある, ローカル変数用の領
+ 域をalloca()していた. たまに落ちるわけだ.
+
+ * string.c(Fstr_times): 割り当てた領域を越えた部分を変更していた.
+
+Wed Jul 6 15:52:42 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * socket.c: Socket -> BasicSocket, RawSocket -> Socket に改名.
+
+ * string.c(ucfirst,lcfirst): 最初の1文字だけの大文字/小文字変換.
+
+ * numeric.c(chr): 整数の文字列化メソッド.
+
+ * inits.c, dbm.c: DBMが使えない時はクラスそのものを定義しないよう
+ にした. 利用できないクラスはnilとすることを今後のポリシーとしよ
+ う(いままではアクセスした時点でエラーが発生していた). autoexec()
+ のあり方も検討が必要になりそうだ.
+
+ * bignum.c(bigadd): バグ修正.
+
+Thu Jul 7 11:12:18 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * eval.c(Fload,Feval): eval_treeをクリアし忘れていた.
+
+ * _inspect: オブジェクトを可読形式の文字列に変換する(主にデバッグ
+ 出力用).
+
+Wed Jul 6 00:57:18 1994 Yukihiro Matsumoto (matz@dyna)
+
+ * numeric.c, bignum.c: 整数に対する`[]'演算子. nビット目がセットさ
+ れているかどうかを返す.
+
+Tue Jul 5 12:48:39 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * io.c(Feof): 追加. コマンドラインからなる仮想ファイルについても
+ EOFが検出できるように.
+
+ * ruby.c: -l/-r/-R/-Xオプションの追加.
+
+ * ruby.c: -n/-pオプションのloopの付加などをメインルーチンに移動し
+ た. これで, オプションの解析途中で(`-c'オプションのせいで)終了な
+ どといったことはない.
+
+ * io.c(Fgets): 高速化. 凝ったことをしない方が速かった. 虚しい.
+
+Mon Jul 4 15:55:48 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * Socket:getsockname/getpeername - ようやく仕様が安定した.
+
+ * io.c(Fgets): eachでgetsを記述するのではなく, getsでeachを記述す
+ るようにした.
+
+Fri Jul 1 10:35:49 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * $ENV[env] = nil/$ENV.delete(env)で環境変数を削除できるようになっ
+ た. $ENV.deleteは環境変数の以前の値を返す.
+
+ * !~の定義が間違っていた.
+
+ * Dict,DBM:[]= - nilの代入によって要素を削除できるようになった. こ
+ れにともないnilはDictの要素になれなくなった.
+
+ * ソースの整理. 盲腸のような使われていないコードをなくしたり, 変数
+ 名を付け変えたりした.
+
+Fri Jul 1 00:21:29 1994 Yukihiro Matsumoto (matz@dyna)
+
+ * Array:join() - 要素数0の配列に対して空文字列を返す.
+
+ * RawSocket:open(),socketpair() - 文字列で指定できるドメインとタイ
+ プをいくつか追加した.
+
+Thu Jun 30 13:51:29 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * -fオプションをなくした. 昔(loadのなかった頃)の名残なので, 今となっ
+ ては必要ないだろう.
+
+ * -sオプションを追加. perlの-sオプションと同じ動きをする.
+
+ * RawSocketクラスを提供する. Socketに対するシステムコールレベルの
+ アクセスが可能になった.
+
+Thu Jun 30 00:27:19 1994 Yukihiro Matsumoto (matz@dyna)
+
+ * Socket - bug fixes.
+
+ * linuxではsyscall(SYS_select)が正常に動作しない.
+
+ * Socket:addr,peeraddr - 配列としてsockaddrの情報を返す.
+
+Wed Jun 29 00:14:20 1994 Yukihiro Matsumoto (matz@dyna)
+
+ * Socket:setopt,getopt - setsockopt(2), getsockopt(2)へのアクセス
+ を実現.
+
+ * sprintf() - rubyにはunsignedは無いので, %uを取り除いた.
+
+ * sprintf() - %b, %x, %oでは2の補数表現, %B, %X, %Oでは符号付き表
+ 現で出力するように. ここ数日でsprintf()の仕様がゆらいでいたが,
+ これで落ち着きそうだ.
+
+Tue Jun 28 14:42:03 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * Bignum:<<,>> - 2の補数をとる処理を除いた. シフト演算には関係ない
+ 処理だった.
+
+ * Bignum:^ - bug fix. 符合が反対だった.
+
+ * sprintf() - 2進出力子"%b"を追加.
+
+ * sprintf() - %x, %oでFixnumを出力する時, 2の補数表示を行なわない.
+
+ * sprintf() - %x, %oはやはり負の数の時は`-'を出力するように.
+
+Mon Jun 27 14:56:13 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * sprintf() - Bignumについても%d, %oは(2の補数表現に変換して)正の
+ 整数を表示するようにした.
+
+ * Bignumに対する論理演算の定義を修正した. 負の数は2の補数表現であ
+ るとみなし, かつ仮想的に左側に無限に1が連続しているような演算結
+ 果を得る.
+
+ * Fixnum:<<,>> - 符合付シフトに変更.
+
+ * Bignum:>> - 負の整数のシフトに対応した.
+
+ * __END__, ^D, ^Zでスクリプトを終了できる.
+
+ * -xオプションを追加. #! ..rubyなる行まで読み飛ばす.
+
+ * -cオプションを追加. コンパイルのみを行う.
+
+Sat Jun 25 01:37:21 1994 Yukihiro Matsumoto (matz@dyna)
+
+ * Fixnum:<< - 必要に応じてBignumに拡張して左シフトするように. よっ
+ て, シフト幅が32を越えるとCやPerlとは違った値を返す.
+
+Fri Jun 24 10:01:28 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * ioctl()/fcntl() - システムコールを呼び出す前にバッファの大きさを
+ 調節するようにした.
+
+ * String:toupper/tolower - 文字列を置き換えたコピーを作るのではな
+ く, 元の文字列の内容を変更するようにした.
+
+ * inplace editを実現した. perlと同じように`-i'オプションで指定する.
+ もっとも, こちらはMS-DOSのこととか考えてないけど.
+
+ * デフォルトの出力先を追加した. 今までは$stdoutに代入するしか方法
+ はなかった.
+
+Fri Jun 17 10:55:08 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * 環境変数にアクセスする方法としてgetenv()/setenv()以外に$ENVを用
+ 意した. $ENVは文字列-文字列の辞書であるかのように動作するEnvDict
+ オブジェクトが代入されている(eachはassocを与える).
+
+ * nilに代入するとcore dumpした. コンパイル時のチェックを強化.
+
+ * Struct: struct_new()の引数をGCプロテクトする必要がある. せめてス
+ タック領域だけでもスキャンできるようにしなければいけないんだろう
+ か? でも, 移植性がなあ.
+
+Fri Jun 17 01:01:46 1994 Yukihiro Matsumoto (matz@dyna)
+
+ * Time::asctime() - 日付のフォーマットで日が落ちていた.
+
+ * Stat: StatはEtcなどと同様にStructで実現したので, Statクラスは無
+ くなった.
+
+Thu Jun 16 10:32:23 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * bignum.c: いくつかのバグを修正した. Fixnumを渡すべきところで普通
+ のintを渡していた. 失敗.
+
+ * big2str() - 1桁ずつbaseで割る代わりに, 4桁ずつ割算を行なうように
+ した. これで多倍長割算の回数が1/4になる. さらに整数->数(文字)へ
+ の変換をテーブルを用いるようにした.
+
+ * rb_ivar_get_1() - すでに何らかのインスタンス変数を持つオブジェク
+ トでは, 未定義のインスタンス変数の値が不定値になっていた.
+
+ * yylex() - インスタンス変数の認識に失敗していた. attr()は正しく動
+ 作していたので, 混用すると動作しなかった. 全部違っていたから動い
+ ていたのね.
+
+ * Object:attr() - すでにアクセスメソッドが定義されている時にはデフォ
+ ルトのアクセスメソッドを定義しないようにした. もっともアクセスメ
+ ソッドと同名のメソッドの区別はRubyには存在しないけど, それは仕方
+ がないよね.
+
+ * pack.c: エンディアンをautoconfで判定するようにしたので, v/Vが使
+ えるようになった. またntoh?()/hton?()も自前で用意した.
+
+ * Stat: st_rdevをアクセスするメソッドを追加. さらにシステムがstat
+ 構造体にst_blksize, st_blockを持っているかをautoconfでチェックす
+ るようにした.
+
+ * ドキュメントを少し整備した.
+
+ * INT2FIX()のうち, 31bit幅が保証できないものは, int2inum()に置き換
+ えた.
+
+Wed Jun 15 10:18:27 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * sprintf() - bignumの出力の時, 出力幅を正しく計算するようにした.
+
+ * str2inum() - baseが0の時, baseを自動判定するように(0xで始まる時
+ 16 進, 0で始まる時8進).
+
+Tue Jun 14 16:08:42 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * gc.c: Bignum型を追加するのを忘れていた. 組み込み型を追加した時に
+ は必ずmark()とsweep()にその型に関する処理を追加する必要がある.
+
+ * bignum: 割算も動いたような気がする. アルゴリズムを理解していない
+ ので, 自信がない.
+
+Mon Jun 13 14:36:55 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * まだサポートしていないメソッドなどがあるが, 曲がりなりにもBignum
+ が使えるようになる. これでioctlも使える.
+
+Fri Jun 10 17:26:42 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * Comparable: 基礎となるメソッドを`=='と`>'から`<=>'に変更した. 今
+ 後Comparableのサブクラスは`<=>'だけを再定義する必要がある.
+
+Wed Jun 8 13:12:18 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * Need_Fixnum()をほとんどなくして, NUM2INT()で直接intに変換するこ
+ とにした. これで31bitに丸めて桁落ちをおこす問題がなくなる.
+
+Tue Jun 7 09:45:31 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * ruby.h: マクロFIXABLE(n)を追加. ついでにFIXNUM周りの定義を変更し
+ て, 移植性を高めた(つもり).
+
+ * C++の予約語であるnewを削除した. しかし, もうひとつの予約語である
+ classに関しては, 置き換える単語が思いつかないこともあってそのま
+ まになっている.
+
+ * 31bitを越えそうなINT2FIX()を関数呼び出しに変えた. 将来bignumが導
+ 入された時には自動的にbignumを返すようにする.
+
+ * readline() - 引数の`-'は標準入力を意味するようになった.
+
+ * ruby.h: 右シフトが論理シフトか算術シフトかは処理系依存のようなの
+ で, ruby.hでcppを使ってチェックするようにした. これでうまくいく
+ と思うのだが, 手元に符合付intを論理シフトする処理系がないので確
+ 認できない. NEWS-OSのCCは確か右シフトはいつも論理シフトだったよ
+ うな気がするんだけど….
+
+Mon Jun 6 10:10:22 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * FIX2INT()の定義を変更した. どうして昔はうまく動かなかったんだろ
+ うか? もしかして, 右シフトの符号拡張は処理系依存?
+
+ * FIX2INT()とFIX2UINT()を使い分けるようにした. もっともfixnumは31
+ ビットしかないので, 本質的な解決にはならないのだが(ioctlが組み込
+ みたかった).
+
+ * printを関数的メソッドから通常メソッドに変更. 引数が与えられない
+ 時にはレシーバをプリントするようにした. これでprintをメッセージ
+ 形式でも実行できるようになった. 例:
+
+ ruby -e 'readlines().sort.print'
+
+ 上のスクリプトは, 引数として与えられた(あるいは標準入力から読み
+ 込まれた)文字列を各行毎にソートして表示する.
+
+ * eval.c: argc,argvパターンで引数を受けるメソッドに引数が一つも与
+ えられない時, argvがnilになっていた(argv[0]にアクセスすると落ち
+ てしまう).
+
+ * _exit()を追加. こちらは例外処理など行なわない.
+
+ * dbmクラス: クラス名称をDBM(大文字)に統一した.
+
+Sat Jun 4 00:51:04 1994 Yukihiro Matsumoto (matz@dyna)
+
+ * ループ変数にも属性や配列要素を指定できるようにした.
+
+Fri Jun 3 09:49:48 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * 多重代入において, 属性代入, 配列要素への代入も行なえるようにした.
+
+ * Need_Fixnum(): nilを0に変換するように.
+
+ * Enumerable:min, max, index, includes - 追加. min, maxは要素が
+ `<=>'メソッドを持つことを仮定している.
+
+ * Dict/Dbm:length - 要素数を返すメソッド.
+
+ * Dbmクラスにto_aメソッドを追加.
+
+ * Sunにおけるsortの誤動作の件, 昨日の修正でfixされた. しかし, それ
+ でなぜ動かなかったのかは明らかではないが…. 比較関数がどんな値を
+ 返しても指定した領域外をアクセスするのはバグではないか.
+
+ * ファイルの全内容を読んで, 各行を配列として返すメソッドはpythonを
+ 参考にして`readlines'という名前にした. それにともないgetsに対し
+ てreadlineという別名を用意した.
+
+Fri Jun 3 00:08:38 1994 Yukihiro Matsumoto (matz@dyna)
+
+ * Array:sort - 判別関数の戻り値はFixnumではなく, Intであるべきだっ
+ た. 間違い. Sunで動作がおかしかったのはこのせいかも知れない.
+
+Thu Jun 2 11:48:37 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * IO:read_all() - ストリームの最後まで入力して, 各行を要素とする配
+ 列を返すメソッドを追加. また関数メソッド read_all()も追加した.
+ これは引数のファイルから読み込んで各行を要素とする配列を返す. 意
+ 味的には
+
+ def read_all()
+ ary = {}
+ while gets()
+ ary.push($_)
+ end
+ end
+
+ とほぼ等価である.
+
+ * String:atoiメソッドを削除. to_aメソッドからaが配列であるとの連想
+ を呼んで, 混乱を招かないため. 代わりにto_iメソッドを使うこと.
+
+ * 配列への変換メソッドto_aを導入した. 通常のオブジェクトは自分自身
+ を唯一の要素とする長さ1の配列を返す. 配列は自分自身を, 辞書はキー
+ と値のペアの配列を返す. Enumeratedをincludeしたクラスは, eachが
+ 返す各要素を含む配列を返す.
+
+ * file.c: 不定個の引数を受けとるメソッド(chmod,chown,utimes)を書き
+ 換えて, 整理した. それに伴い, 最初に全ての引数の型チェックを行な
+ うようにした. 型チェックに失敗すると処理を行なわずに例外を発生さ
+ せる.
+
+ * configure.in: 不必要なテストを行なわないように修正した.
+
+Tue May 31 10:41:08 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * String:pack(): 2進数の文字列変換(B,b)で0と1が逆だった.
+
+ * Math.c: 実数系のメソッドに引数として整数が渡された時に自動的に変
+ 換するようにした.
+
+ * toupper(), tolower(): 文字列の判定ミスで変換されていなかった.
+
+ * getopt_long()の仕様によって, スクリプトへの引数がインタプリタの
+ 引数だと解釈されていた. 引数パターン文字列の先頭に`+'を追加.
+
+ * config.hを削除した. DEFINEはMakefileで与えられる.
+
+ * sprintf(): "%d"に文字列が与えられた時にはアドレスではなく内容を
+ 整数に変換するようにした. ついでに浮動小数点数も変換するように変
+ 更した.
+
+ * regexp.c: rubyの拡張正規表現(\d, \D, \s, \S)の処理で割り当てた領
+ 域を越えてバッファに書き込んでいた. 処理前にバッファをきちんと拡
+ 張するようにした. これで昨日問題にしていたメモリの問題は解決でき
+ たと思う.
+
+ * yylex(): ダブルクォート文字列中でダブルクォートを表現するため
+ のバックスラッシュ表現ができなかった.
+
+Mon May 30 10:07:42 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * 演算子`!'の右辺も条件式であるとした. これによって, この演算子を
+ 再定義する人は混乱するかも知れないが, 大多数のこの演算子を使う人
+ は混乱を避けることができると思う.
+
+ * autoconfを使って, 自動的にMakefile, config.hを生成するようにした.
+ これで, 多くのマシンでは`configure'を実行した後, `make'一発でコ
+ ンパイルできると思う.
+
+ * clone: サブクラスに対して用いられた場合, 元のオブジェクトと同じ
+ クラスのインスタンスを返すように(以前はビルトインクラスの場合を
+ 考えてなかった).
+
+ * ビルトインクラスのサブクラスも作れるように, リテラルのあるクラス
+ にもnewメソッドを追加した.
+
+ * malloc()で落ちる. purifyが必要かも知れない.
+
+ * re.c: rb_global_variable()の呼びだし形式の間違い. 変数へのポイン
+ タを渡さなければいけない.
+
+ * parse.y: ローカル変数の扱いに引数の評価順に依存する移植性のない
+ 部分があった.
+
+ * attr(): 属性設定のバグを直した. いつ内部仕様が変わったんだろう…?
+
+Sat May 28 23:08:18 1994 Yukihiro Matsumoto (matz@dyna)
+
+ * 正規表現キャッシュの文字列一致判定をポインタ一致から内容一致に変
+ 更した. そういえば文字列リテラルは一回毎に新しくオブジェクトが生
+ 成されるのだった.
+
+Fri May 27 11:42:00 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * trから文字削除(delete), 文字圧縮(squeeze)を分離した. それにとも
+ ないtrのオプション引数はなくなった.
+
+Thu May 26 10:32:55 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * スクリプト読み込みルーチンを書き直して, 通常ファイル以外のファイ
+ ル名や空文字列がスクリプトとして与えられた場合に対応した. また,
+ 標準入力からスクリプトを読み込む時に, 一時ファイルが/tmpに残らな
+ いようにした.
+
+ * Fixnum:id2name - IDから文字列に戻す関数. String:internの逆.
+
+ * Array: 配列の範囲外の要素をアクセスした時に例外を発生させずに,
+ nilを返すようにした. 配列は自動的に拡張される.
+
+ * string:stripを追加.
+
+ * -nオプションが-eオプションを複数指定した時も動作するように.
+
+ * parse.yで<sys/types.h>もインクルードするようにした.
+
+ * fname周りの細かいbugを修正.
+
+Wed May 26 11:45:10 1994 Yukihiro Matsumoto (matz@dyna)
+
+ * 定数をキャッシュするようにした. 繰り返しが多い場合には有効のはず
+ だが, 一度しかアクセスしない場合は遅くなるなあ.
+
+Wed May 25 00:42:24 1994 Yukihiro Matsumoto (matz@dyna)
+
+ * 多重代入文(foo, bar = 1, 2)の採用.
+
+ * 条件式部に文字列あるいは正規表現リテラルをおくと`=~'演算子によっ
+ て`$_'と比較される. 更に`...'の両辺では整数リテラルが`$.'と比較
+ される.
+
+Mon May 23 23:27:03 1994 Yukihiro Matsumoto (matz@dyna)
+
+ * &式 形式はなくなった. 代わりにkernel:apply(id, args..)を導入.
+
+ * def op () ..形式の導入. opは再定義可能な演算子.
+
+ * constantの代入時チェック. 既に初期化されている定数に代入した場合
+ は例外が発生する.
+
+ * 多重代入文.
+
+Thu May 19 22:57:07 1994 Yukihiro Matsumoto (matz@dyna)
+
+ * 複合文でもvoid valueのチェックを行うようにした.
+
+ * untilの動作の修正(do..until型だった).
+
+Wed May 18 01:06:25 1994 Yukihiro Matsumoto (matz@dyna)
+
+ * 移植に関する若干の問題を修正.
+
+ * 別名の構文を「def a b」にした.
+
+ * until/unless: 演算子から制御文へ. 例外を捕捉する機能はそのまま.
+
+ * 選択可能な機能をconfig.hからdefines.hに移動.
+
+Fri May 13 23:20:21 1994 Yukihiro Matsumoto (matz@dyna)
+
+ * -yオプションを新設. -dオプションからコンパイラのデバッグ部分を分
+ 離した.
+
+Tue Apr 25 20:17:33 1994 Yukihiro Matsumoto (matz@dyna)
+
+ * マルチバイト文字列を識別子に使えるように. 個人的には使いたくは無
+ いけどなあ.
+
+ * `-v'フラグの状態を$verboseでアクセスできるように.
+
+ * CVSの導入に伴い, バージョン管理の方法を変更.
+
+ * 真面目にChangeLogをつける事にした.
+
+Tue Mar 8 10:09:25 1994 Yukihiro Matsumoto (matz at nws119)
+
+ * %変数名 によるクラス定数を導入.
+
+ * undef メソッド によるメソッド定義の取り消しを導入.
+
+ * rb_get_method_bodyではthe_envを変更せず, rb_call()で明示的に変更
+ するように. これでresponds_toなどで環境が破壊されない.
+
+Mon Mar 7 17:46:15 1994 Yukihiro Matsumoto (matz at nws119)
+
+ * 「&文字列」形式. 「式.文字列」型のメッセージセンドはなくなった.
+
+ * 自己代入形式(+=. -=, ...)
+
+ * obj.attr = expr形式の採用.
+
+Thu Feb 24 16:23:28 1994 Yukihiro Matsumoto (matz at nws119)
+
+ * toint, tofloat, print_stringをそれぞれto_i, to_f, to_sに変更.
+
+ * String:clone - Copy on Writeの実現.
+
+Tue Feb 22 11:11:44 1994 Yukihiro Matsumoto (matz at nws119)
+
+ * re.c: マッチした文字列の保存に失敗していた.
+
+ * trap: 可能ならば処理に時間のかかるシステムコール(read, wait,
+ sigpause, select)をフックして割り込み処理の即答性を高める(DOSな
+ どでは無理だなあ).
+
+ * trap: 割り込みをその場で処理するか(迅速だが危険), 安全なタイミン
+ グで処理するかを選択できるように.
+
+Tue Feb 17 11:11:12 1994 Yukihiro Matsumoto (matz at nws119)
+
+ * trap: 割り込みハンドラ.
+
+Wed Feb 16 12:29:12 1994 Yukihiro Matsumoto (matz at nws119)
+
+ * String:crypt: 暗号化ルーチン
+
+ * "::"演算子の追加. a::b は {a, b}と同義. a::b::c は {a, {b, c}}と
+ 同義(右結合). 同義とはいうものの, "::"演算子を使った方が少しだけ
+ メモリ効率が良い.
+
+ * Dir.rmdir(), File.unlink(), File.utime() -- 各システムコールへの
+ インタフェース.
+
+ * kill -- kill(2) I/F
+
+ * select(): readのチェックではstdioにバッファリングされているかど
+ うかをチェックするように.
+
+Tue Feb 15 15:08:31 1994 Yukihiro Matsumoto (matz at nws119)
+
+ * file.c: statをキャッシュするように.
+
+ * File:utime()を追加.
+
+ * unliteralize(): フラグを破壊していた.
+
+ * Bug(): coreを吐くように.
+
+ * String:tr -- tr(1)互換. 引数パターンがちょっと違うけど….
+
+Mon Feb 14 18:24:13 1994 Yukihiro Matsumoto (matz at nws119)
+
+ * unless, untilが例外も偽と見なすように.
+
+ * select() -- select(2) I/F
+
+ * Array:pack, String:unpack: perlのpack/unpackの同等品
+
+Tue Feb 8 17:11:10 1994 Yukihiro Matsumoto (matz at nws119)
+
+ * setenv()のないシステムのためにputenv()を使ったコードも用意した.
+
+Mon Feb 7 09:52:44 1994 Yukihiro Matsumoto (matz at nws119)
+
+ * 引数の一番最後に`*'を置けるようにした. これでrest引数のリストを
+ 操作する必要が少なくなる.
+
+Fri Feb 4 18:23:26 1994 Yukihiro Matsumoto (matz at nws119)
+
+ * ruby-mode.elを書き直す. ずいぶんましになったと思う.
+
+ * 文字列リテラルのCopy on Writeを実現. これで文字列がリテラルであ
+ るからといっていちいちcloneしなくても済む.
+
+Tue Feb 1 09:21:09 1994 Yukihiro Matsumoto (matz at nws119)
+
+ * sub(), gsub()で, マッチした文字列を$&, $1..$9でアクセスできるよ
+ うにした. 同時にマッチした部分文字列をコピーしておくように(元の
+ 文字列が変更されても状態を保存するため).
+
+Mon Jan 31 15:16:58 1994 Yukihiro Matsumoto (matz at nws119)
+
+ * プライベートメソッドの仕様を変更. 今までは同じクラスのメソッドか
+ らしかアクセスできなかったが, サブクラスのメソッドからもアクセス
+ できるようにした(C++におけるprotected メンバ関数).
+
+ * メソッドサーチのアルゴリズムを改善し, 10%程度の高速化を行なった.
+
+ * 高速化. Cで記述されたメソッドを呼び出す時にはsetjmpを呼ばないよ
+ うにした. これでCメソッドを多用する場合には3倍程度高速になった.
+
+Fri Jan 28 15:44:04 1994 Yukihiro Matsumoto (matz at nws119)
+
+ * sh-modeを元にruby-mode.elを作る. 演算子で終る, 2行に渡る文には対
+ 応していないけど….
+
+Thu Jan 27 11:35:19 1994 Yukihiro Matsumoto (matz at nws119)
+
+ * freenode(): NODE_NILの解放忘れ.
+
+ * 字句解析部のバグ修正(コメントの後の状態を戻し忘れ).
+
+ * protect .. endのバグ修正. GC_LINKのネストが不正だった.
+
+ * joinのバグ修正(使っているオブジェクトをfreeしていた).
+
+ * splitのバグ修正(アルゴリズムがおかしかった).
+
+ * fork()を追加.
+
+Wed Jan 26 17:09:56 1994 Yukihiro Matsumoto (matz at nws119)
+
+ * ファイルテストメソッドの追加.
+
+ * rb_autoexec(): クラスを初めてアクセスした時の挙動を制御できるよ
+ うにした. これでautoloadも実現できる. これにともないメソッド
+ unknownはなくなった.
+
+Tue Jan 25 15:51:36 1994 Yukihiro Matsumoto (matz at nws119)
+
+ * Dbmクラス, Mathモジュールを作成.
+
+ * -Iオプションでサーチパスに追加できるように.
+
+ * サーチパスを変数$load_pathに設定できるように.
+
+ * load(): ダイナミックロードを使えるようにした.
+
+Tue Jan 18 14:14:01 1994 Yukihiro Matsumoto (matz at nws119)
+
+ * Comparable:"<=>"
+
+ * Float,Fixnum:"**"
+
+ * Array:sort
+
+Fri Jan 14 16:53:37 1994 Yukihiro Matsumoto (matz at nws119)
+
+ * version 0.07
+
+ * メソッドに関するドキュメントを充実させた.
+
+ * String:index(): 引数positionを増やした.
+
+Thu Jan 13 15:13:52 1994 Yukihiro Matsumoto (matz at nws119)
+
+ * 未初期化の変数アクセスをなくした.
+
+ * 無駄なhash tableのアロケーションを削除.
+
+ * Purify'd(on Sun)
+
+ * ~RE と ~STRのコンパイル時展開の抑制.
+
+ * Sunへ移植. signal()の戻り値. RDataのbug修正.
+
+ * parse.y: nlsルールを削除.
+
+ * yylex(): 改行と符合の解析部分を変更.
+
+ * missing/strftime.c: 移植用.
+
+ * Time:strftime: その他のメソッドもstrftimeを利用するように.
+
+ * メソッド再定義時にメソッドキャッシュをクリアする.
+
+Fri Jan 7 15:23:20 1994 Yukihiro Matsumoto (matz at nws119)
+
+ * Float:coerce(): FixnumとFloat以外の引数を与えられるた時には例外
+ を発生するように.
+
+ * Stat: stat構造体の全てのメンバに対するアクセスメソッドを用意.
+
+ * 未定義のクラス/モジュールへの参照がunknownメソッドを呼び出すよう
+ にした.
+
+ * baseline - version 0.06.
diff --git a/doc/ChangeLog-0.50_to_0.60 b/doc/ChangeLog-0.50_to_0.60
new file mode 100644
index 0000000000..5f5b03ff40
--- /dev/null
+++ b/doc/ChangeLog-0.50_to_0.60
@@ -0,0 +1,462 @@
+Thu Dec 8 00:32:21 1994 Yukihiro Matsumoto (matz@dyna)
+
+ * io.c($<.file,$<.filename): きちんと初期化.
+
+ * parse.y(rb_class2name): includeしているクラス名を正常に表示でき
+ なかった.
+
+Wed Dec 7 15:40:36 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * dln.c: config.hをincludeしていなかった.
+
+ * missing/strdup.c: 忘れていた.
+
+Fri Dec 2 15:21:44 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * 関数の命名ルールを変えた(クラスメソッド: Sxxx_xxx,ユーティリティ
+ メソッドxxx_xxxなど).
+
+ * re.c(casefold): 個々の正規表現オブジェクトが大文字小文字を無視す
+ るかどうかを設定できるようにした.
+
+Thu Dec 1 01:44:51 1994 Yukihiro Matsumoto (matz@dyna)
+
+ * missing.c: システムで提供されないファイルの扱いを変更した.
+
+ * io.c($<): 変数`$<'が指しているものを現在読み込み中のファイル名か
+ ら仮想ファイル($ARGF)に変更した.また,現在読み込み中のファイル
+ 名とファイルオブジェクトにアクセスするメソッドも用意した.
+
+ * ruby.h(data_new): Dataオブジェクトの割り当て方法を改善した.
+
+Wed Nov 30 15:36:13 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * Makefile: ルールを整理した.
+
+Tue Nov 29 00:09:26 1994 Yukihiro Matsumoto (matz@dyna)
+
+ * array.c(`|'): 引数が配列でなく,かつそのオブジェクトが要素として
+ 含まれていない時,そのオブジェクトを追加する.あればなにもしない.
+
+ * process.c(gid,egid): GIDをアクセスするメソッド.
+
+ * io.c(print): 文字列と配列に対する処理を組み込んで若干の高速化を
+ 図った.出力が多い場合に効いてくるようだ.
+
+ * parse.y(parse_string): ""で囲まれた文字列内では対応するエスケー
+ プがない`\'を残さないように.つまり,今後は"\k" -> "k"である(以
+ 前は"\k"だった).
+
+Mon Nov 28 18:02:31 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * re.c(re_regsub): 置換文字列の置換えが不完全だった.
+
+ * 一時オブジェクトの解放をすべてGCに任せた.今のままではまずいタイ
+ ミングでオブジェクトを解放する可能性があった.昔のGCの時にはこれ
+ でも良かったのだが.
+
+Tue Nov 22 00:15:24 1994 Yukihiro Matsumoto (matz@dyna)
+
+ * eval.c($"): 既にロードしたファイル名の配列.
+
+Mon Nov 21 01:09:50 1994 Yukihiro Matsumoto (matz@dyna)
+
+ * array.c(&,|): 集合としての積演算と和演算.
+
+ * io.c($<): 文字列を代入した時には自動的にopenするように.IOのサブ
+ クラスかどうかのチェックも行う.
+
+Sun Nov 19 23:02:27 1994 Yukihiro Matsumoto (matz@dyna)
+
+ * eval.c($:): $LOAD_PATHの別名.
+
+ * io.c($>): デフォルト出力先.IO.defaultは無くなった.
+
+ * io.c($<): $FILENAMEの別名
+
+ * glob.c(each): ワイルドカードにマッチするものがない場合,パターン
+ そのものを与えるように.
+
+ * file.c(chmod,chown,unlink,utime): `\'でワイルドカードをエスケー
+ プできるように.
+
+Fri Nov 18 00:20:42 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * version 0.55 released
+
+ * file.c(chmod,chown,unlink,utime): 引数として与えられた文字列にワ
+ イルドカードが含まれている場合にはGlobオブジェクトに変換する.
+
+Wed Nov 16 17:33:48 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * file.c(chmod,chown,unlink,utime): 引数としてワイルドカードも受け
+ 付けるように. その場合はマッチするファイル全体に適用される.
+
+Fri Nov 11 00:07:28 1994 Yukihiro Matsumoto (matz@dyna)
+
+ * string.c(strip): 文字列そのものを変更するように.
+
+ * eval.c(rb_cal): 環境をスタックに積むタイミングが間違っていたので,
+ 不適切なエラーメッセージが出る時があった.
+
+ * eval.c(rb_undefined): メソッドが無い時とメソッドにアクセスできな
+ い時とでメッセージを替えた.
+
+ * string.c: toupper/tolowerはupcase/downcaseを使って実現.
+
+ * string.c: lcfirst/ucfirstは削除.
+
+Thu Nov 10 16:15:16 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * string.c: sub/gsubは置換後の文字列を返すようにした.
+
+ * string.c: toupper/tolower/lcfirstなどを文字列を変更するものとし
+ ないものの2 種類を提供するようにした.
+
+Tue Nov 1 17:52:09 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * eval.c: 変数展開にバグがあって元の文字列を破壊していた.
+
+Thu Oct 27 09:56:48 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * eval.c: rest引数の処理が間違っていた.
+
+ * env.c(rb_yield): ローカル変数の設定が間違っていた.
+
+Wed Oct 26 19:01:43 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * eval.c: 引数セットの高速化.
+
+ * process.c: sleepのバグ.
+
+ * parse.y, gnuglob.c: Sunのccでもコンパイルできるように.
+
+Tue Oct 25 00:36:16 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * eval.c: 若干の高速化. スタックの処理によってrb_call()が少し遅く
+ なった分の穴埋めくらいか.
+
+ * eval.c: blockをenvから外すなどしてスタックを軽くした.
+
+Mon Oct 24 11:47:54 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * re.c: 正規表現アクセス用の変数($`, $', $+)を追加.
+
+ * re.c($KANJI): 処理する漢字コードをrubyプログラム内から設定できる
+ ようにした.
+
+Sat Oct 22 00:42:41 1994 Yukihiro Matsumoto (matz@dyna)
+
+ * eval.c: イテレータ内のredoとretryの処理にバグがあった.
+
+Fri Oct 21 00:53:21 1994 Yukihiro Matsumoto (matz@dyna)
+
+ * string.c(swapcase): 文字列の大文字小文字を置き換える.
+
+ * string.c(ljust,rjust,center): 文字列のレイアウト用メソッド.
+ sprintf()でも同じようなことはできるが.
+
+ * socket.c(recv,recvfrom): flags引数を省略可能にした. 省略時の値は
+ 0である.
+
+ * socket.c(recvfrom): recvと同様だが, データと相手アドレスのペアを
+ 返す.
+
+ * socket.c(accept): 戻り値をつながったソケットから, ソケットとアド
+ レスのペアに変更した.
+
+ * eval.c(eval): the_classをセットする時に, last_moduleがincludeさ
+ れているモジュール(T_ICLASS)であれば, 定義元のモジュールの方をセッ
+ トするように. この修正がないとICLASSに対してメソッドが呼ばれる可
+ 能性があり, 不審な動作をする(はず).
+
+ * class.c: オブジェクトのcloneの際に特異クラス(特異メソッド用のク
+ ラス)をきちんとコピーするようにした. 今までは個々のメソッドのコ
+ ピーを忘れていた.
+
+ * numeric.c: Numericのnewとcloneをundefした.
+
+Thu Oct 20 11:30:00 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * version 0.53 released.
+
+ * parse.y: TopLevelのdef文は関数メソッドを定義するようにした.
+
+ * parse.y: def文のprivate指定はなくなった. export/noexportメソッド
+ を使ってもらうことにした.
+
+ * parse.y: case文にthenを含むことができるようになった.
+
+Wed Oct 19 13:09:58 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * object.c(export,unexport): 関数メソッドの設定用メソッド.
+
+ * eval.c, class.c: 関数的メソッドを復活させ(またか…), `@'による
+ privateメソッドをなくした. やはり, 関数的なものは関数的に呼びた
+ い気がしてきた. こう仕様が変動しててはいけないような気もするなあ.
+ *BACKWARD INCOMPATIBILITY*
+
+ * eval.c: メソッドの構成を変更し, 別名管理と関数メソッドの管理を分
+ 離した.
+
+ * eval.c: the_env->last_funcをCメソッドの時にも更新する. これがな
+ いとStructのアクセスが動作しない.
+
+Fri Oct 14 13:22:18 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * version 0.52 released: ……なんてこったい.
+
+ * eval.c(rb_call): returnの処理が間違っていたので, マシンによって
+ はreturnで関数を終了するだけでなくtoplevelまでつき抜けていた.
+
+ * dbm.c: Dictと同様にeachが[key,value]を返すように.
+
+ * version 0.51 released
+
+Thu Oct 13 12:13:48 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * eval.c(SETUP_ARGS): 付加引数が配列でない時には配列に変換する.
+
+ * parse.y: 括弧なしのメソッド呼び出しでも`*'による付加引数が使える
+ ようにした. ただし, 通常引数が一つもない場合は乗算演算子と区別が
+ つかないので, 必ず括弧が必要.
+
+Wed Oct 12 10:09:07 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * eval.c(rb_call): キャッシュの計算をinline化. キャッシュミスがあ
+ れば関数呼び出しでメソッドを検索する. methods.cはなくなった.
+
+ * eval.c(rb_eval): ローカル変数用の領域をalloca()するように変更.
+ サイズの変更が必要になれば改めてmalloc()するように.
+
+ * parse.y: error recoveryの際にlex_stateを更新しておくように.
+
+Tue Oct 11 17:10:46 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * socket.c(for_fd): ファイル記述子(Fixnum)からソケットインスタンス
+ を得るメソッド. たとえばinetdから起動されたサーバで標準入出力に
+ ソケット操作を行なうために使う. つまりSocket.for_fd($stdin)で標
+ 準入力に対応するソケットオブジェクトが得られる.
+
+ * io.c(to_i): IOクラスのインスタンスを整数に変換するとそのファイル
+ 記述子を返すように.
+
+ * numeric.c(num2int): to_iメソッドを使ってできる限り整数に変換する.
+ 以前はnum2fixだけが全てのオブジェクトに対してto_iメソッドを適用
+ していた.
+
+ * sprintf.c(Fsprintf): 整数表示の際, オブジェクトをできる限り整数
+ に変換するように(to_iメソッドを使う).
+
+Fri Oct 7 14:06:32 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * eval.c(Fcaller): 必要性がよく分からないのでドキュメントから削除.
+ 将来デバッガを作る時に復活させよう.
+
+ * eval.c(rb_call): Cで記述されたメソッド呼び出しでは環境をスタック
+ にセーブしないことによって高速化.
+
+Wed Oct 5 15:00:58 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * ruby.h: 一時env.hに移動してたQselfの定義を復活. ただし今回は関数
+ として実現(env.hでは変数として再定義してある).
+
+ * ruby.h: TRUEでsyntax errorにならないよう#undefを追加.
+
+ * eval.c(rb_eval): thread化に挑戦したが, 失敗(速くならなかった).
+ が, Scopingなどの無駄なコードの削除とメソッド呼び出しの引数セッ
+ トのinline化で若干の高速化を実現した. 副作用として, argc, argv形
+ 式の関数呼び出しの仕様が変化した(argvにselfを含まなくなった).
+
+ * eval.c(rb_call): メソッド呼び出しの高速化.
+
+Tue Oct 4 11:40:53 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * ruby-mode.el: 修飾子に対応した.
+
+ * parse.y: 多重代入にrestをつけた. この機能を使えばoptional引数の
+ 解析が簡単にできる(はず).
+
+ * pack.c(unpack): uuencode形式のdecodeの際に文字列の長さが間違って
+ いた.
+
+Mon Oct 3 15:58:41 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * file.c(type): ファイルタイプを文字列で返すメソッド.
+
+Fri Sep 30 11:36:07 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * object.c: デフォルトの真の値である%TRUEの値を1(Fixnum)からtに変
+ 更した. to_sで文字列に変換した時にも`t'と表示される. 更に踏み込
+ んで`t'を予約語にしてlispのようにしようかとも思ったが, そこまで
+ は決心できなかった. 一文字のローカル変数はかなり使いそうな気がす
+ るので….
+
+ * array.c,dict.c: equalを再定義しているクラスで, hashを正しく定義
+ した.
+
+Wed Sep 28 23:30:28 1994 Yukihiro Matsumoto (matz@dyna)
+
+ * eval.c(Ffail): 今までfailはカーネルクラスのメソッドであったが,
+ 構文に組み込んだ. この変更によって, 1)`fail'は予約語となり, ロー
+ カル変数に用いることができなくなった. 2)`fail'単体で例外を発生す
+ るようになった. 3)failはメソッドではなくなったので再定義される可
+ 能性がなくなった.
+
+ * dic.c, dbm.c(indexes): Arrayのindexesと同様の機能を持つメソッド
+ を追加.
+
+ * array.c(indexes): 引数をインデックスとする要素の配列を返す. 整数
+ の配列を引数とする時には引数の要素をインデックスとする要素の配列
+ を返す.
+
+Mon Sep 19 13:42:31 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * array.c(aset): 部分配列に対する代入で配列以外のオブジェクトが指
+ 定された場合に多重代入と同じルールで配列化するようにした.
+
+ * io.c(print): 引数として与えられた各オブジェクトにprint_onメッセー
+ ジを与えるように. 実行速度は落ちるが柔軟性は増す.
+
+Fri Sep 16 14:59:18 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * glob.c: ワイルドカードの導入. bashに使われているGNUのglobルーチ
+ ンを流用した.
+
+Mon Sep 12 18:36:58 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * parse.y(value_expr): 式がnilの時に対応.
+
+ * class.c: ICLASSのclassが必ずClass/Moduleを指すように.
+
+Tue Sep 6 16:23:28 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * re.c: 正規表現内で「\数字」形式が指定できるように.
+
+ * parse.y:「do expr using var ... end」形式はなくなった. 寂しい気
+ もする. *BACKWARD INCOMPATIBILITY*
+
+Mon Sep 5 10:59:01 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * numeric.c(next): Numericクラスにもnextを提供.
+
+ * string.c(upto): uptoを提供.
+
+ * range.c(each): nextを使ったインタフェースからuptoを使うように変
+ 更した. この方が一つのメソッドで処理をまとめで行なうことができる.
+
+Fri Sep 2 15:25:39 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * dict.c(each): 戻り値を[key, value]のペアに変更. 今までのeachは
+ each_valueとして残る. *BACKWARD INCOMPATIBILITY*
+
+Thu Sep 1 10:49:04 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * 成功した(特別な戻り値を持たない)システムコールは`0'を返すように.
+
+Wed Aug 31 00:26:51 1994 Yukihiro Matsumoto (matz@dyna)
+
+ * string.c: チェックサムを得るメソッド`sum'を作った.
+
+ * class.c(include_class_new): ICLASSのclassをもとのクラスにした.
+ gcの際に元クラスをマークする必要があるのが, フィールドを増やす余
+ 地が無いので, classフィールドを流用した. 私の見積りが間違ってい
+ て, ICLASSのインスタンスにメッセージを送る事があれば, おかしな動
+ 作をするだろう.
+
+ * eval.c(masign): 式(a,b = nil)の値を[nil]からnilに変更した.
+
+Mon Aug 29 11:56:09 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * class.c: rb_define_mfuncを無くして, メタクラスにモジュールをイン
+ クルードするようにした.
+
+ * error.c(yyerror): 同じ行で複数のsyntax errorをリポートしないよう
+ にした.
+
+ * file.c: FileTestモジュールにファイルテストメソッドを分離した.
+
+ * parse.y: 演算子を指定する時のlex_stateを正しく設定した.
+
+Sat Aug 27 01:23:34 1994 Yukihiro Matsumoto (matz@dyna)
+
+ * parse.y: if/whileなどの複合式をprimaryに移動した. これによって例
+ えば「if cond then a else b end.message()」のような式が書けるよ
+ うになった.
+
+Fri Aug 26 10:46:30 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * spec: 整理された文法にしたがって書き直した.
+
+ * parse.y: ここ数日で混乱していた文法を整理した. 括弧を省略したメ
+ ソッド呼び出しができるようになったこと, modifierが付けられるよう
+ になったこと, returnにリストが渡せるようになったことが主な変更点
+ である.
+
+ * process周りが怪しいがとにかくSolaris 2.3で動くように.
+
+ * parse.y: 曖昧性がない場合にはメソッド呼び出しの引数の括弧を省略
+ できるように. 省略できるメソッド呼び出しの条件は, 1)かならず1個
+ 以上の引数を必要とすること, 2)第1引数が`+', `-', `(', `[', `{',
+ `/'など, 式の始まりに置かれた時と途中に現れた時とで解釈が違う記
+ 号で始まらないこと, である.
+
+Thu Aug 25 13:54:58 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * parse.y(cond): 条件式の展開部にbugがあった.
+
+Wed Aug 24 00:01:15 1994 Yukihiro Matsumoto (matz@dyna)
+
+ * parse.y: returnはコンマで区切ったリストも受け取るように. つまり,
+ return a, b, cはreturn [a, b, c]と同じ意味になる.
+
+ * parse.y: yield以外の大域脱出制御式をexprからexpr0に移した. よっ
+ てメソッドの引数に制御式を使えなくなる(これで困る人はいないはず).
+
+ * parse.y: `+'の定数展開の際に演算子の優先順位を忘れていた.
+
+ * eval.c: untilの戻り値はnilになった.
+
+ * parse.y: modifierとしてのif/unless/while/untilを追加.
+
+ * parse.y: 文法からendの後ろにつけるキーワードを削除. ほとんど使わ
+ なかった上に, emacsではruby-modeがあれば対応のチェックが機械的に
+ 出来るため.
+
+Tue Aug 23 18:08:33 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * eval.c: スクリプト実行開始前に例外が発生した時にcore dumpした.
+ 組み込み用にコードを変更した時にenbugしてしまった.
+
+Tue Aug 23 00:07:17 1994 Yukihiro Matsumoto (matz@dyna)
+
+ * eval.c: doの戻り値がいつもnilになっていた.
+
+ * parse.y: loop制御変数の多重代入化にbugがあった.
+
+ * parse.y(expand_op): 文字列も畳み込みの対象に.
+
+Mon Aug 22 10:50:01 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * parse.y(expand_op): `+'に関しては結合則を使って, より多く定数畳
+ み込みを行なうように.
+
+ * ruby.c(proc_options): argcが0の時にも対応.
+
+ * parse.y: forなどの制御変数に多重代入も使えるように.
+
+Sat Aug 20 00:59:40 1994 Yukihiro Matsumoto (matz@dyna)
+
+ * parse.y(call_op): 演算子`~'の取り扱いをルール部へ移動.
+
+Fri Aug 19 11:44:13 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * main.c: rubyをほかのプログラムに組み込めるようにmain()を分割した.
+ それにともない, プログラムの呼び出し構造を修正した.
+
+ * parse.y: 条件式の定義を変更. ifなどの条件式の中でだけ`&&'や`||'
+ および`!'の引数が条件式になるように. この変更により条件式以外の
+ 場所での `&&', `||', `!'演算子の動作が直観に一致する.
+
+ * parse.y: 実引数の`*'の後に続く引数はexprに制限した. 今までは全て
+ の文が有効
diff --git a/doc/ChangeLog-0.60_to_1.1 b/doc/ChangeLog-0.60_to_1.1
new file mode 100644
index 0000000000..33b0326892
--- /dev/null
+++ b/doc/ChangeLog-0.60_to_1.1
@@ -0,0 +1,3955 @@
+Tue Aug 12 16:02:18 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+
+ * variable.c: option variables: $-0, $-p(readonly), $-v,
+ $-I(load_path), $-a(readonly), $-K, $-d, $-F, $-i, $-l.
+
+ * parse.y (yylex): ignore rd (ruby document) in the code.
+
+Mon Aug 11 12:37:58 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+
+ * re.c (Init_Regexp): $-K as alias to the $KCODE.
+
+ * io.c (Init_IO): new virtual variable $-i for the value of -i
+ option.
+
+ * enum.c (Init_Enumerable): include? as alias of member?
+
+Fri Aug 8 11:16:50 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+
+ * io.c (io_foreach): now the record separator can be specified.
+
+ * io.c (io_s_readlines): new method to read in whole file (or
+ command output) from path.
+
+ * ext/socket/socket.c (Init_socket): recvfrom did not work.
+
+ * ext/socket/socket.c (sock_send): forgot to check nil for false
+ value.
+
+Thu Aug 7 11:40:01 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+
+ * variable.c (mod_constants): lists constants defiend in the
+ modules/classes.
+
+ * variable.c (rb_const_set): no longer warns about constant
+ overriding by subclasses.
+
+ * eval.c (mod_eval): does eval() on module's context. local
+ variables are shared with outer scope.
+
+ * object.c (Init_Object): remove private_attr/public_attr.
+
+Wed Aug 6 14:21:36 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+
+ * object.c (mod_attr): forgot to check nil for false value.
+
+Mon Aug 4 11:50:28 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+
+ * object.c (class_s_new): need not to specify names to create
+ classes (or modules) dynamically.
+
+ * variable.c (rb_class_path): scan class constants for anonymous
+ classes/modules to make up pathes.
+
+Wed Jul 30 08:45:12 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+
+ * eval.c (rb_eval): stop to cache const value in nodes.
+
+Sat Jul 26 03:17:22 1997 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+
+ * numeric.c (flo_to_s): wrong .0 at end.
+
+Sat Jul 26 00:36:36 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+
+ * eval.c (error_print): always print exception type in the
+ toplevel exception handler.
+
+ * string.c (str_hash): wrong hash value.
+
+Thu Jul 24 11:05:51 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+
+ * string.c (uscore_get): proper error message for unset $_.
+
+Wed Jul 23 09:56:55 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * object.c (obj_methods): returns list of method names of the
+ specified object.
+
+ * class.c (mod_instance_methods): returns list of method names of
+ the class instnace.
+
+Fri Jul 11 22:38:55 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * object.c (class_superclass): returns class's superclass
+ itself. (1.1)
+
+ * object.c (obj_type): returns object's class itself. (1.1)
+
+ * class.c (mod_included_modules): list included modules.
+
+ * object.c (class_superclass): raises error for Object.
+
+Thu Jul 3 09:54:02 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (SETUP_ARGS): save source position, remove nd_line().
+
+ * eval.c (rb_call): replace modulo by bit-masking.
+
+ * eval.c (POP_SCOPE): force recycle scope object to reduce gc rate.
+
+ * gc.c (obj_free): aboid calling run_final() when no finalizer is set.
+
+ * eval.c (PUSH_VARS): do not allocate the dynamic scope's end-mark
+ object.
+
+Wed Jul 2 14:25:07 1997 KIMURA Koichi <kkimura@pure.cpdc.canon.co.jp>
+
+ * Native mswin32 support.
+
+Tue Jul 1 09:59:00 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 1.0-970701
+
+ * parse.y (mrhs): allow rest-star(*) in right hand side.
+
+Tue Jun 24 19:04:31 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 1.0-970624
+
+Sat Jun 20 22:22:51 1997 Michio "Karl" Jinbo <karl@marcer.nagaokaut.ac.jp>
+
+ * eval.c: freebsd 3.0 <sys/select.h> support.
+
+Fri Jun 20 01:24:45 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 1.0-970620
+
+ * gc.c: eliminate uninitilalized field of Hash, Array etc., to
+ avoid dumping core.
+
+Thu Jun 19 01:29:44 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 1.0-970619
+
+ * string.c (str_split_method): wrong limit.
+
+Sat Jun 14 01:54:16 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * class.c (rb_singleton_class): no singleton for special
+ constants (now raises exception).
+
+ * eval.c (ruby_init): cbase in TOPLEVEL_BINDING need to be
+ initialized.
+
+Sat Jun 14 01:01:16 1997 maeda shugo <shugo@po.aianet.ne.jp>
+
+ * array.c (sort_2): wrong comparison.
+
+Sat Jun 14 00:53:44 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * hash.c (hash_foreach): safe iteration.
+
+Fri Jun 13 14:04:56 1997 Michio "Karl" Jinbo <karl@marcer.nagaokaut.ac.jp>
+
+ * configure.in: -Bshareable option for netbsd.
+
+Fri Jun 13 01:16:22 1997 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+
+ * io.c (pipe_open): call io_unbuffered() only for writable pipes.
+
+Thu Jun 12 01:14:15 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 1.0-970612
+
+ * ext/socket/socket.c (sock_new): use io_unbuffered().
+
+ * ext/marshal/marshal.c (w_long): compact long format, which
+ supports 64 bit architectures (unless longs are >32 bit size).
+
+ * ext/marshal/marshal.c: allows recursive data for marshaling.
+
+ * parse.y (rb_intern): raise exception for non-internable string.
+
+ * ext/marshal/marshal.c (marshal_load): allows direct loading from
+ strings.
+
+ * ext/marshal/marshal.c (marshal_dump): allows direct dump to strings.
+
+ * ext/marshal/marshal.c (marshal_dump): interface changed.
+
+Wed Jun 11 18:26:00 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * gc.c (rb_newobj): remove needless memset().
+
+Mon Jun 9 13:03:43 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (rb_eval): reduce condition checks from while/until loop.
+
+ * eval.c (rb_eval): wrong jump point for `next'.
+
+Fri Jun 6 11:47:39 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * ruby.c (ruby_set_argv): initialize dln_argv0 for dln_a_out.
+
+ * ext/socket/socket.c (open_unix): display path name for exceptions.
+
+ * ruby.c (proc_options): option -S did not work well.
+
+Fri May 30 02:14:44 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 1.0-970530
+
+ * eval.c (eval): set $! properly if exception raised in eval().
+
+ * io.c (io_write): now handles non T_FILE object.
+
+ * io.c (io_defset): $< can be anything which has `write' method.
+
+Thu May 29 15:40:22 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (eval): $@ is always an array (not string).
+
+ * pack.c (pack_unpack): avoid corrupting memory for unexpected
+ input strings.
+
+Wed May 28 12:46:13 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 1.0-970528
+
+ * process.c (rb_waitpid): do not block other threads.
+
+Tue May 27 12:02:31 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (ruby_init): split initialize and processing command line
+ options.
+
+ * ruby.c (ruby_options): ruby_init(0, 0, envp) dumps core.
+
+Tue May 20 18:59:45 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * variable.c (rb_ivar_set): invalid instance variable access for
+ built-in object raises TypeError.
+
+Fri May 16 17:32:21 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 1.0-970516
+
+ * dir.c (push_globs): was freeing non heap pointer.
+
+ * gc.c: remove some duplicated prototypes.
+
+ * ext/kconv/kconv.c: fix prototypes.
+
+Fri May 9 11:38:59 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 1.0-970509
+
+ * gc.c (obj_free): avoid free(NULL).
+
+ * eval.c (rb_check_safe_str): argument missing for TypeError().
+
+Thu May 8 01:14:28 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * file.c (file_s_dirname): need to return "." for path without
+ slashes.
+
+Wed May 7 19:18:48 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * process.c (f_fork): child processe does not inherit parent's
+ itimer setting on linux. call setitimer() again in the child
+ process.
+
+Sat May 3 02:49:43 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * ext/curses/curses.c: modified for portability and add to the
+ standard distribution.
+
+Wed Apr 30 00:34:00 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * file.c (file_s_size): returns 0 for empty files (not FALSE).
+
+Fri Apr 25 02:17:50 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 1.0-970425
+
+ * eval.c (f_load): free unused name-table.
+
+ * eval.c (f_load): copy local variable name-table.
+
+ * gc.c (obj_free): avoid free(NULL).
+
+ * eval.c (rb_eval): forgot to make link from the scope object to
+ NODE_SCOPE. It may crash the interpreter.
+
+Thu Apr 24 00:35:09 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * random.c (f_srand): save old seed anyway. srand() returns no
+ value on some systems.
+
+ * gc.c (obj_free): avoid double free of the local variable name
+ table.
+
+ * parse.y (top_local_setup): modify realloc to handle offset.
+
+Tue Apr 22 12:58:26 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 1.0-970422
+
+Thu Apr 17 00:40:51 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * configure.in (rb_cv_bsdpgrp): proper check for BSD
+ setpgrp/setpgrp.
+
+Wed Apr 16 16:14:02 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (proc_call): proc called in other thread must be orphan.
+
+Tue Apr 15 10:46:31 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 1.0-970415
+
+ * gc.c (obj_free): NODE_SCOPE marked from SCOPE object.
+
+ * gc.c (gc_mark): some nodes marked wrong.
+
+ * process.c (proc_getpgrp): wrong argument
+
+Fri Apr 14 18:32:42 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 1.0-970414
+
+Fri Apr 12 01:20:12 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * ruby.h: String pointer changed to unsigned char.
+
+Fri Apr 11 10:27:29 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 1.0-970411
+
+ * Makefile.in: create libruby.a before linking ruby.
+
+ * string.c (str_strip_bang): >0x80 characters for isspace().
+
+ * eval.c (proc_call): set safe-level temporally
+
+ * eval.c (proc_s_new): save safe-level in the proc context.
+
+ * eval.c (rb_eval): no class/module extension in safe mode.
+
+Thu Apr 10 02:10:41 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * gc.c (gc_mark): remove some pointer checks for speeding up.
+
+ * ruby.c (ruby_options): set $0 temporally for -r option.
+
+ * eval.c: built-in security feature.
+
+ * gc.c (gc_sweep): do not free nodes during compile.
+
+ * parse.y (yycompile): set flag when compiling.
+
+Wed Apr 9 10:19:02 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * ruby.c: forgot to include <ctype.h> for isspace().
+
+ * file.c: provide S_ISREG for some platforms.
+
+ * io.c (Init_IO): added some $< operations.
+
+ * lib/ping.rb: check host upness using TCP echo.
+
+Tue Apr 8 00:10:15 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * io.c (arg_read): bug with 0 length input.
+
+Mon Apr 7 11:36:16 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * ext/fcntl/fcntl.c: module for fcntl constants.
+
+ * eval.c (rb_alias): bug when original was an alias.
+
+ * parse.y (primary): syntax to access singleton class.
+
+ * eval.c (mod_public_method): method's to specify visibitily of
+ the class methods. make_method_{public,private} removed.
+
+Fri Apr 4 21:43:57 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 1.0-970404
+
+ * gc.c (obj_free): finalizer added for experiment.
+
+Thu Apr 3 02:12:31 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (thread_schedule): make Fatal rise on main_thread on
+ deadlocks.
+
+ * eval.c (thread_join): raise ThreadError instead of Fatal, in
+ case of deadlock.
+
+ * regex.c (re_compile_fastmap): uninitialized local variable.
+
+ * parse.y (parse_regx): new option //[nes] to specify character
+ code for regexp literals. Last specified code option is valid.
+
+ * re.c (reg_s_new): additional 3rd argument to specify compiled
+ regexp's character code.
+
+ * re.c (reg_new_1): regexp character code can be specified for
+ each regexp object.
+
+Wed Apr 2 14:51:06 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (thread_create): handle uncaught throw.
+
+ * eval.c (thread_create): halt on some deadlock conditions.
+
+ * regex.c (is_in_list): wrong result for non-mbc higher-byte
+ characters.
+
+ * regex.c (re_match): wrong skip for multi-byte characters.
+
+ * regex.c (re_compile_fastmap): wrong fastmap in non-mbc mode.
+
+ * hash.c (Init_Hash): hash compatible features added to ENV.
+
+Tue Apr 1 15:24:06 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (obj_extend): remove Object#extend as an iterator which
+ is in experimental state, since it unveils internal singleton
+ classes.
+
+Mon Mar 31 14:29:39 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 1.0-970331
+
+Sun Mar 30 19:40:57 1997 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+
+ * parse.y (terms): avoided win32 gcc's optimization bug.
+
+Sat Mar 29 11:21:58 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * struct.c (make_struct): St[val,..] creates new structure.
+
+Fri Mar 28 11:24:51 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (obj_make_private): new method make_method_{public,private}
+ to change visibility of singleton methods.
+
+ * regex.c (re_compile_pattern): enables numeric literal >= 0x80 in
+ the character class.
+
+ * regex.c (re_compile_pattern): enabled numeric literal >= 0x80,
+ in multibyte mode.
+
+ * regex.c (re_compile_fastmap): modified exantn and charset(_not)
+ to set fastmap for higher bytes properly.
+
+ * regex.c (is_in_list): now matches numeric literals.
+
+Thu Mar 27 13:34:20 1997 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+
+ * pack.c (pack_unpack): extra null byte after unpacked string.
+
+Wed Mar 26 15:20:34 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * regex.c (re_compile_pattern): register numbers must be fit in a
+ byte (0 <= regnum <= 0xff).
+
+ * regex.c (re_compile_fastmap): forgot to set mbchar map for
+ charset_not if RE_MBCTYPE is on.
+
+ * regex.c (re_compile_pattern): set list bits for multi-byte
+ characters for \W, \S, \D in range expression.
+
+ * object.c (obj_is_kind_of): defined that nil itself is kind of
+ nil. TRUE is kind of TRUE, FALSE is kind of FALSE likewise.
+ This change makes `obj.kind_of?(eval(obj.type))' always true.
+
+Tue Mar 25 14:08:43 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * lib/English.rb: provides nicer English alias for the variables.
+
+ * parse.y (expr): alias $var1 $var2 makes alias of the global
+ variable.
+
+Mon Mar 24 18:23:20 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 1.0-970324
+
+Thu Mar 20 22:04:59 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (mod_modfunc): forget to clear method cache.
+
+Wed Mar 19 17:06:55 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * parse.y (program): set methods' default private/public status
+ correctly under eval().
+
+ * eval.c (eval): set the_class correctly while evaluating string.
+
+Tue Mar 18 12:23:53 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (eval): yield can be called from eval().
+
+ * version 1.0-970318
+
+ * parse.y (program): regexp in condition expression should do
+ matching operation with $_.
+
+ * re.c (reg_regsub): wrong substitution.
+
+Fri Mar 14 14:36:28 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * hash.c (hash_invert): returns value to key mapping of the
+ associative array.
+
+ * ext/socket/extconf.rb: set environment variable SOCKS_SERVER to
+ compile with libsocks.a.
+
+ * ext/socket/socket.c (socks_s_open): SOCKSsocket class to access
+ internet via SOCKS library.
+
+ * sprintf.c (f_sprintf): unsigned formats display leading double
+ dots for imaginary sequence of signed bit to the left.
+
+ * sprintf.c (f_sprintf): correct width and precision formatting
+ for big integers.
+
+ * parse.y (yylex): enables negative hex/octal numbers and `_' in
+ non-decimal numbers.
+
+ * sprintf.c (f_sprintf): %u added for unsigned decimal format.
+
+Thu Mar 13 10:24:27 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * sprintf.c (f_sprintf): wrong output for bignums.
+
+ * array.c (ary_reverse_each): iterates in reverse order.
+
+ * pack.c (pack_unpack): L unpacked signed long.
+
+ * io.c (f_backquote): now returns an empty string for no output.
+
+Wed Mar 12 10:20:30 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * ext/socks/socks.c: socket module with socks library.
+
+Mon Mar 10 20:44:22 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * re.c (reg_regsub): \& for substitution. \`, \', and \+ are
+ avaiable also.
+
+Thu Mar 6 01:47:03 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 1.0-970306
+
+ * sample/rubydb.el (gud): ruby debugger emacs interface
+
+ * lib/debug.rb: ruby debugger
+
+ * parse.y (exprs): more accurate line number display.
+
+Wed Mar 5 21:31:46 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 1.0-970305
+
+Tue Mar 4 12:28:32 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * ruby.c (proc_options): search through RUBYPATH and PATH for
+ option -S.
+
+Mon Mar 3 22:44:55 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (thread_status): returns nil for exception terminated
+ threads.
+
+ * eval.c (thread_value): re-raise exceptions.
+
+Sat Mar 1 00:59:47 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (rb_eval): restore $! value after rescue clause, to
+ re-raise exceptions correctly.
+
+Fri Feb 28 16:43:38 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 1.0-970228
+
+Thu Feb 27 11:23:41 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (rb_yield_0): redo raises exception
+
+ * eval.c (thread_schedule): bug in interrupt handling by rescue.
+
+Wed Feb 26 00:55:36 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (eval): forgot to restore dynamic local variable
+ bindings.
+
+Tue Feb 25 11:22:08 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * ext/aix_ld.rb: AIX dynamic load support (not tested).
+
+ * eval.c (rb_eval): wrong return value for defined? super.
+
+ * error.c (exception): more error check.
+
+ * re.c (reg_regsub): wrong substitution when sub expanded to null
+ string.
+
+Fri Feb 21 13:01:47 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 1.0-970221
+
+ * eval.c (f_require): volatile added. register variable was
+ recycled, so that GC did not mark that variable.
+
+ * object.c (Init_Object): forget to mark main object (was mostly
+ ok, but made trouble with early GC.)
+
+Thu Feb 20 11:50:50 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 1.0-970220
+
+Thu Feb 20 11:25:50 1997 Yasuo OHBA <jammy@shljapan.co.jp>
+
+ * lib/date.rb: update
+
+Thu Feb 20 08:25:57 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * parse.y (yylex): forgot tokfix() before rb_intern().
+
+ * lib/tk.rb (TkVariable): give up using trace_var.
+
+Wed Feb 19 00:24:35 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 1.0-970219
+
+ * pack.c (pack_pack): packed by null for A specifier. must be
+ space filled.
+
+ * pack.c (pack_unpack): bug in skipping spaces
+
+ * gc.c (xmalloc): garbage collect for every 4 Meg. allocation.
+
+ * string.c (str_split_method): limit worked wrong way.
+
+ * io.c (io_gets_method): misunderstand 0xff in binary files when
+ $/ == nil.
+
+ * re.c (reg_regsub): re-implement.
+
+ * ext/socket/socket.c (thread_connect): remove O_NONBLOCK, which
+ is not defined on some platform like NeXT.
+
+Mon Feb 17 13:08:30 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 1.0-970217
+
+ * object.c (mod_eqq): === extended for subclass check (to use case
+ as typecase).
+
+Sat Feb 15 02:07:22 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * regex.c (re_compile_pattern): wrong match backref at end of pattern.
+
+ * io.c (arg_read): now works beyond end of file.
+
+Thu Feb 13 16:21:24 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * parse.y (expr): return/yield now accept normal argument format.
+
+ * parse.y (yylex): a star in `yield *x' must not be multiplication
+ operator.
+
+Wed Feb 12 15:06:44 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * time.c (time_plus): bug in simple addition.
+
+ * eval.c (thread_raise): raise exceptions from outside.
+
+ * eval.c (Init_Thread): Thread#alive? -- alias for Thread#status.
+
+Mon Feb 10 00:38:55 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * ruby.h (Data_Make_Struct): rename macros.
+
+Sun Feb 8 11:48:13 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * io.c (f_syscall): argument offset was wrong.
+
+Fri Feb 7 18:01:17 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 1.0-970207
+
+ * eval.c: add volatiles to avoid variable crobbering by longjmp().
+
+ * eval.c (f_raise): 1st argument can be the GlobalExit object now.
+
+ * array.c (ary_unshift): no longer accept more than 2 args.
+
+ * eval.c (f_raise): bug if 2nd argument is the exception.
+
+Tue Feb 4 00:37:29 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 1.0-970204
+
+ * eval.c (eval): check compile errors by nerrs.
+
+ * eval.c (rb_eval): check syntax error by nerrs, not by the return
+ value, which may be NULL.
+
+ * eval.c (compile): Do not clear errinfo.
+
+Mon Feb 3 10:13:06 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (obj_extend): move real inclusion to Module#extend_object
+ to allow redfinition.
+
+ * object.c (Init_Object): Kernel class is now Module. Object class
+ became the true root class.
+
+ * object.c (obj_inspect): remove useless buffer.
+
+ * hash.c (any_cmp): disable interrupts and context switching.
+
+ * st.c: remove ALLOW_INTS to disable interrupt during operations.
+
+Fri Jan 31 22:10:08 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * hash.c (hash_rehash): re-register all key-value.
+
+Thu Jan 30 02:14:49 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * io.c (io_reopen): re-implement according to clone() way.
+
+ * io.c (io_clone): copy IO object.
+
+ * struct.c (struct_eql): compare elements by eql?.
+
+ * io.c (io_mode_flags): detect "rb", "wb" etc.
+
+ * io.h (FMODE_BINMODE): added.
+
+ * ext/socket/socket.c (Init_socket): undef BasicSocket.new
+
+ * file.c (Init_File): File.new(path[,mode])
+
+ * io.c (Init_IO): IO.new(fd[,mode])
+
+ * eval.c (rb_method_boundp): forgot to enable priv argument.
+
+ * object.c (Init_Object): remove `=~' from Kernel class.
+
+ * ext/socket/socket.c (open_inet): initialize sockaddr before
+ calling bind(2).
+
+ * sample/ruby-mode.el (ruby-calculate-indent): skip comment lines
+
+Wed Jan 29 18:43:22 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (Init_Thread): DEFER_INTS during initializing threads.
+
+ * hash.c (Init_Hash): Hash#eql? checks for object identity.
+
+ * eval.c (thread_set_critical): wrong value assigned.
+
+Mon Jan 27 16:10:51 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * io.c (io_print): remove print_on().
+
+ * eval.c (f_missing): proper error message for undefined method
+ without argument
+
+Sat Jan 25 23:32:32 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * string.c (str_sub_s): false alert - sub() does not modify string.
+
+ * array.c (ary_times): negative multiplication detected
+
+ * string.c (str_times): negative multiplication detected
+
+Fri Jan 24 10:51:39 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * time.c (time_arg): month -> 0 == "jan" == "1" == "01", little bit
+ confusing but wanted to conform japanese style.
+
+ * version 1.0-970124
+
+Fri Jan 24 09:52:49 1997 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+
+ * util.c (_fixpath): supports SJIS filenames on DJGPP.
+
+Thu Jan 23 16:52:06 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * README.EXT: update. partially translated into English.
+
+ * ext/extmk.rb.in: inherit $LDFLAGS to the final link.
+
+ * ext/socket/socket.c (Init_socket): add various constants.
+
+Mon Jan 23 11:40:59 1997 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+
+ * eval.c (Init_Thread): allocate main_thread first to avoid crash.
+
+Thu Jan 23 02:09:26 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * gc.c (ObjectSpace): API modified. each_object method will do all
+ the iteration.
+
+ * eval.c (proc_call): wrong return from nested lambda.
+
+ * ext/GD/GD.c: debugged.
+
+Wed Jan 22 16:12:25 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 1.0-970122
+
+ * gc.c (gc_mark): forgot to mark match->str.
+
+ * ext/GD/GD.c: GD interface module.
+
+ * eval.c (PUSH_BLOCK): wrong value pushed as the block level.
+
+Mon Jan 20 14:01:31 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (thread_run): no context switch in the critical section.
+
+Mon Jan 20 09:40:59 1997 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+
+ * utils.c: supports 8+3 filenames
+
+Sat Jan 18 01:23:03 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 1.0-970118
+
+ * regex.c (PATFETCH): need cast to unsigned char.
+
+ * io.c (io_ctl): bug in case when arg is not a string.
+
+ * lib/tk.rb: forgot that Kernel#type returns the class name now.
+
+ * regex.c (re_search): "abc\n" =~ "^$" should not match.
+
+Fri Jan 17 12:31:37 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 1.0-970117
+
+ * ruby.c (ruby_options): constant PLATFORM, which is in the {cpu}-{os}
+ form, defined.
+
+ * configure.in: platform information embedded in the interpreter.
+
+ * regex.c (re_search): /^$/ did not match to "" by wrong exit condition.
+
+ * lib/thread.rb: re-write Mutex/Queue based on Thread.critical.
+
+ * eval.c (thread_set_critical): remove Thread.exclusive, add
+ Thread.critical = TRUE/FALSE instead.
+
+ * re.c (reg_search): re-compile pattern if needed
+
+ * regex.c (PATFETCH): do translate at compile time
+
+Thu Jan 16 00:49:10 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * gc.c (gc_mark_frame): forgot to mark frame->cbase.
+
+ * regex.c (re_compile_pattern): /a$|b)/ causes error.
+
+ * regex.c (re_compile_pattern): /(^|b)/ causes error.
+
+ * version 1.0-970116
+
+ * re.c (Init_Regexp): set RE_CONTEXTUAL_INVALID_OPS flag.
+
+Tue Jan 14 02:09:06 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (proc_call): Proc#callをイテレータとして呼んだ時に対応
+
+ * configure.in: nextstep対応?
+
+ * eval.c (rb_eval): a[b]=cで無駄な配列を割り当てない
+
+ * eval.c (f_send): イテレータとして呼ばれたらイテレータとしてメソッ
+ ドを呼ぶ.
+
+ * string.c (str_new4): match共有用の生成関数
+
+ * re.c (reg_search): matchの実体(文字列)をマッチを行った文字列と
+ copy-on-writeで共有
+
+ * string.c (str_hash): toupperをかける条件が違っていた
+
+ * array.c (sort_2): FixnumとStringを特別扱いして高速化
+
+Mon Jan 13 11:03:53 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (thread_create): threadが生成されるまで割込みを設定しない
+
+ * eval.c (Init_Thread): 割込みタイミングを100msecに
+
+Sat Jan 11 00:17:05 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * regex.c (re_search): マッチに失敗する場合があった(本当に直ったか?)
+
+ * io.c (io_ioctl,io_fcntl): 第2引数を省略可能に
+
+ * io.c (io_ioctl,io_fcntl): 戻り値がIOだった.整数(システムコール
+ の戻り値)を返すようにした.
+
+ * io.c (io_ctl): 引数が整数の時に対応
+
+ * io.c (io_fcntl): file.cから移動
+
+Fri Jan 10 17:01:47 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 1.0-970110
+
+ * ext/socket/socket.c (thread_connect): open(connect(2))で他の
+ threadをブロックしないように
+
+ * eval.c (thread_create): exitでないときにexitだと思い込む
+
+Mon Jan 6 17:42:22 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * string.c (str_sub_s): 文字列長より長いoffsetの検出
+
+ * regex.c (re_search): 空にマッチするパターン後の$で失敗
+
+Thu Jan 2 16:36:23 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * file.c (file_reopen): Fileのreopen(pathまたはIOで指定).
+
+ * io.c (io_reopen): IOのreopen(IOで指定) -- change classつき
+
+Wed Jan 1 11:09:01 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * io.c (f_select): timeoutでnilを返す
+
+Fri Dec 27 13:06:44 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * file.c (file_s_open): サブクラスではそのクラスのインスタンスを返
+ すように.
+
+Fri Dec 27 08:58:27 1996 <ono@isl.nara.sharp.co.jp>
+
+ * numeric.c (flo_to_s): index()を使わない.strstr()に.
+
+Thu Dec 26 01:34:17 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * lib/tk.rb: placeが使えるように
+
+ * pack.c (endian): マクロDYNAMIC_ENDIANを指定すると実行時にendian
+ を判定するように.
+
+ * eval.c (thread_alloc): 初期化忘れのメンバがあった.
+
+Wed Dec 25 00:33:19 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 1.0-961225
+
+ * io.c (Init_IO): newを無効化
+
+ * lib/tkthcore.rb: tk_call "global $foo; set foo 5"などもできるように
+
+ * eval.c (thread_restore_context): $~, $_でスタックを壊していた
+
+ * process.c (rb_waitpid): threadに一応対応
+
+Tue Dec 24 15:20:58 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.99.4-961224
+
+ * configure.in: charがunsignedかどうかもチェック
+
+ * regex.c (SIGN_EXTEND_CHAR): __CHAR_UNSIGNED__にも対応
+
+ * pack.c (pack_unpack): 明示的にsigned charを指定.
+
+Mon Dec 23 14:41:23 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * ruby.c (load_file): 標準入力からのスクリプトで一時ファイルを使わ
+ ないように
+
+ * object.c (f_integer): `0x', `0'などでbaseを解釈するように.
+
+Fri Dec 20 01:44:39 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * Makefile.in (flock.o): flockに対応
+
+Thu Dec 19 20:13:32 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.99.4-961219
+
+Wed Dec 18 00:06:48 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * glob.c (glob_filename): strrchrがマクロの場合に対応
+
+ * configure.in: <sys/select.h>をチェック
+
+ * ext/kconv/kconv.c: 1.62ベースに
+
+ * ext/kconv/kconv.c: Kconvモジュール
+
+ * string.c (str_substr): lenが元の文字列より長い時に対応
+
+ * parse.y (iterator): 「$bar do .. end」などは許さないように
+
+ * parse.y (iterator): FID(foo!,foo?)をdo形式のイテレータにできる.
+
+ * missing/flock.c (flock): lockf()を使って代替
+
+ * file.c (file_flock): flockを実装
+
+Tue Dec 17 12:13:38 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.99.4-961217
+
+Fri Dec 13 02:05:03 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * configure.in: RUBYLIBのカレントを後回し(@mix/awk offline)
+
+ * dln.c: AIXに対応した?(@mix/awk offline)
+
+ * eval.c (thread_schedule): critical sectionでも明示的なコンテキス
+ トスイッチは起きないとまずい
+
+ * re.c (reg_search): matchに失敗した時に$~をnilに.
+
+ * re.c (reg_search): 毎回matchを生成するように
+
+Thu Dec 12 17:03:30 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * numeric.c (flo_to_s): 2.0.to_s -> 2.0に
+
+ * eval.c (thread_save_context): $_, $~をthread毎に保存
+
+ * eval.c (thread_kill): main threadではexit(0)
+
+ * string.c (str_split_method): 間違った結果を返していた
+
+Thu Dec 12 15:32:48 1996 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+
+ * dir.c: CYGWIN32対応
+
+ * ext/socket/socket.c: CYGWIN32対応
+
+ * io.c: CYGWIN32対応
+
+Thu Dec 12 14:43:51 1996 Jun Kuroda <j_kuro@pluto.ai.kutech.ac.jp>
+
+ * lib/tk.rb: wish4.2も探索候補に含める
+
+ * config.guess: JCC対応
+
+Thu Dec 12 00:41:17 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.99.4-961212
+
+ * parse.y (parse_string): """..."""はやはり無くすことにした
+
+ * parse.y (parse_regx): %r|...|でterminatorを \ でエスケープできる
+ ように
+
+ * signal.c (posix_signal): sigactionを使うsignal
+
+ * configure.in: posix signal/bsd signalの検出
+
+Wed Dec 11 17:47:35 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (thread_schedule): critical sectionではコンテキストスイッ
+ チが起きないように
+
+ * lib/thread.rb: SharedMutexクラス
+
+ * lib/jcode.rb: String#scanを使うように
+
+Tue Dec 10 12:21:28 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.99.3-961210
+
+ * string.c (str_split_method): 正規表現に()を含む時にバグ
+
+ * lib/jcode.rb: ちょっとましになった
+
+ * string.c (tr_setup_table): 置換文字が短すぎる(2文字)のときのバグ
+
+Mon Dec 9 11:38:04 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * string.c (str_scan): 文字列のマッチを行う.イテレータとしても動
+ 作する
+
+ * regex.c (re_copy_registers): allocatedが初期化されていなかった
+
+ * re.c (match_to_s): $~の文字列化
+
+ * re.c (match_to_a): $~を配列化できるように
+
+ * re.c (match_getter): レジスタが初期化されていなかった
+
+Thu Dec 5 11:06:10 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * string.c (str_split_method): マッチしなかった括弧は空文字列を
+ pushするべきではない
+
+ * string.c (str_succ): アルファベットを含まない文字に対応
+
+Wed Dec 4 10:48:09 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.99.3-961204
+
+ * io.c (io_binmode): DJGPPでのbinmode対応
+
+ * sprintf.c (f_sprintf): intの範囲の数値は直接sprintfで変換する
+
+ * sprintf.c (f_sprintf): "%02s"に頼らない
+
+ * re.c (reg_search): indexでSEGV
+
+Tue Dec 3 10:09:36 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.99.3-961203
+
+ * ext/extmk.rb.in (install): INSTALL_DATAからINSTALLに変更
+
+ * dln.c: hpux対応
+
+ * string.c (str_aset_method): 負の値を含む範囲でも例外を起こさない
+
+ * array.c (ary_replace): 負の値を含む範囲でも例外を起こさない
+
+ * array.c (beg_len): beg==endの時,長さ0に
+
+Mon Dec 2 14:07:12 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * configure.in: HP shl対応
+
+ * string.c (str_upto): beg > endの時無限ループに落ちるのを止めた
+
+ * range.c (range_each): String#uptoが再定義された場合に対応
+
+ * string.c (str_split_method): "ABC".split(/(B)/)が誤動作
+
+Sat Nov 30 01:43:52 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (rb_eval): undefでSEGV
+
+Fri Nov 29 12:17:59 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * sample/ruby-mode.el (ruby-parse-region): %Q#..#などに対応.しか
+ し,区切り文字が演算子で行末にある場合には対応できなかった.
+
+ * re.c (reg_raise): 例外でもスラッシュをエスケープ
+
+ * re.c (reg_inspect): スラッシュをエスケープ
+
+ * parse.y (parse_string): `%[QqXxRr](.)..\1'なる文字列形式(テスト
+ 採用)
+
+ * parse.y (parse_qstring): '''...'''の形式
+
+ * ext/dbm/dbm.c (Init_dbm): 述語key?,value?の追加
+
+ * ext/dbm/dbm.c (Init_dbm): includes->include?
+
+ * hash.c (Init_Hash): 述語key?,value?,include?の追加
+
+ * eval.c (rb_eval): unlessでelse節が実行されない(うーん)
+
+ * string.c (str_sub_iter_s): イテレータブロック内でマッチが行われ
+ ると位置がずれる(時に無限ループに落ちる)
+
+ * string.c (str_resize): lenが0の時sizeの調整が行われなかった
+
+Thu Nov 28 00:59:54 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.99.3-961128
+
+ * parse.y (parse_string): 3-quote styleの文字列(例:"""abc"d"e""")
+
+ * configure.in (EXTSTATIC): extを静的にリンクする時にはrubyはdllを
+ 使うように
+
+ * io.c (Init_IO): getsの引数が間違っていた
+
+ * string.c (str_each_line): RSを明示的に指定できるように
+
+Wed Nov 27 12:37:46 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.99.3-961127
+
+ * eval.c (rb_eval): iver defined? でselfを指定するのを忘れた
+
+ * io.c: gets等でRSを明示的に指定できるように
+
+ * ext/extmk.rb.in (install): static linkに失敗
+
+Tue Nov 26 10:33:04 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.99.3-961126
+
+ * string.c (str_sub_s): 置換後の文字列長さが間違っていた
+
+Mon Nov 25 09:11:22 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * numeric.c (fix_rshift): 32以上の右シフトで0を返すように(Cの
+ rshiftは(x>>(y%32))を返していた).
+
+ * string.c (str_gsub): 置換が行われない場合があった
+
+ * string.c (str_resize): 本当に必要な時だけrealloc
+
+Thu Nov 21 04:13:21 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * configure.in (EXTSTATIC): --with-static-linked-extで全てのモジュー
+ ルを静的リンクするように
+
+ * pack.c (pack_unpack): 行末の改行がない時にもチェックサムをスキッ
+ プするように
+
+Wed Nov 20 21:42:51 1996 Yasuo OHBA <jammy@shljapan.co.jp>
+
+ * configure.in: freebsd対応
+
+Wed Nov 20 10:24:24 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * ext/extmk.rb.in (install): 通常リンク用のLDFLAGSとダイナミックリ
+ ンク用のDLDFALGSを分離
+
+ * ext/extmk.rb.in (install): コンパイルの成功したものを静的リンク
+ のリストに追加する
+
+ * eval.c (f_missing): オブジェクトの文字列表現が長すぎる時バッファ
+ を書き潰していた
+
+ * process.c (proc_exec_v): forkした後例外を発生させてはいけない
+
+Tue Nov 19 13:28:15 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.99.3-961119
+
+ * eval.c (mod_method_defined): Module#method_defined? の追加
+
+ * parse.y (call_args): 引数が唯一のコマンドコールである時のバグ(戻
+ り値が展開されてしまう)
+
+Mon Nov 18 13:28:18 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * string.c (str_sub): 失敗した時にnilを返していた
+
+ * string.c (str_split_method): 検索開始位置が移動してなかった
+
+ * ext/socket/socket.c (sock_s_getservbyaname): まだ間違っていた
+
+ * version 0.99.3-961118
+
+ * string.c (str_sub_s): 元の文字列を置換するのを止めた
+
+ * pack.c (encodes): 領域外をアクセスしていた
+
+Fri Nov 15 17:10:35 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * bignum.c (big_divmod): Bignumが引数の場合の対応忘れ
+
+ * sample/ruby-mode.el (ruby-expr-beg): word?形式への対応が不完全
+
+Wed Nov 13 15:42:40 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * string.c (str_tr_s_bang): tr_sでtrが行われていなかった
+
+ * eval.c (rb_eval): autoloadクラスのチェック
+
+ * string.c (f_sub): subがsub!と同じ動作になっていた
+
+ * eval.c (thread_sleep): stopとsleepの分離
+
+Mon Nov 11 13:53:19 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.99.3-961111
+
+ * numeric.c (fix_step): to, stepが整数以外の場合に対応
+
+ * eval.c (rb_call): dynamic varがdynamic scopingになっていた(これ
+ はまずい)
+
+ * string.c (str_chop_bang): 長さ0の文字列のchopで,領域外のアクセ
+ スが発生していた.
+
+ * parse.y (yyerror): 割り当てた領域外をアクセスしていた
+
+Fri Nov 8 11:54:46 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (thread_yield): scopeをheapにコピー
+
+Thu Nov 7 09:56:53 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * numeric.c (num_coerce): とりあえず両辺をFloatに変換することに
+
+Wed Nov 6 10:45:13 1996 Yasuo OHBA <jammy@shljapan.co.jp>
+
+ * lib/parsearg.rb: 第2引数を変更.
+
+Tue Nov 5 14:21:09 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.99.3-961105
+
+Sat Nov 2 01:11:40 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * bignum.c (big_pow): typo (dy -> dx)
+
+ * bignum.c (big_divmod): 知らない型はfloatに変換してみる
+
+ * numeric.c (fix_lshift): 境界条件のバグ(負になっていた)
+
+ * bignum.c (big_pow): 無駄なfloatへの変換をなくした
+
+ * math.c (math_atan2): typo(x -> y)
+
+Fri Nov 1 15:30:59 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * ext/socket/socket.c (sock_gethostname): gethostnameがない時には
+ unameを使ってホスト名を得る
+
+ * ext/etc/etc.c (etc_getlogin): getloginがNULLを返しても環境変数を
+ 調べるように
+
+ * object.c (krn_clone): オブジェクトのフラグもコピー
+
+ * hash.c (rb_cmp): ハッシュの比較を`=='でなく`eql?'に変更
+
+ * math.c (Need_Float): Float()を使って変換する
+
+ * compar.c (cmp_gt): 以前の右辺を返す仕様の名残が残っていた
+
+Thu Oct 31 12:55:51 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.99.3-961031
+
+ * numeric.c (Init_Numeric): typo
+
+ * eval.c (error_print): 長すぎるtrace backを途中省略する
+
+ * regex.c (re_compile_pattern): 全角のrangeに対応
+
+Wed Oct 30 03:03:18 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.99.3-961030
+
+ * io.c (f_ungetc): 関数を追加
+
+ * eval.c (dyna_var_asgn): return値忘れ
+
+Tue Oct 29 10:05:28 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * string.c (f_split): 関数splitを追加
+
+ * eval.c (rb_call): ネストした外側のクラス/モジュールの定数を参照
+ できるように
+
+Mon Oct 28 09:51:03 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * string.c (str_sub): offsetが文字の末尾にある時のチェック
+
+ * regex.c (re_match): 割り当てるレジスタの数が1多かった
+
+ * io.c (io_gets): $/ = ""の動作をperlに合わせる(awkとはちょっと違
+ うらしい)
+
+ * io.c (io_gets): $/ = nilの時少し高速化
+
+ * string.c (str_split_method): 括弧がnullにマッチした時にも無視し
+ ないように
+
+ * string.c (str_split_method): 括弧にマッチした分はlimitの数に含め
+ ないように.
+
+ * numeric.c (num_coerce_bin): coerceの定義を変更,2要素の配列
+ [x,y]を返すように
+
+ * sample/ruby-mode.el (ruby-calculate-indent): "do |aa|"の対応を改
+ 善した.
+
+Sat Oct 26 01:43:51 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * ext/marshal/marshal.c (w_object): ビルトインクラスのサブクラスを
+ 正しく復旧できるように
+
+ * ext/marshal/marshal.c (w_object): ユーザ定義dumpの優先
+
+ * numeric.c (flo_coerce): Float()を使って定義
+
+ * numeric.c (Init_Numeric): Numericのnewのundefはまずい
+
+ * ext/marshal/marshal.c (w_symbol): シンボルの内容(文字列)は一度し
+ かファイルに書き出さない.
+
+ * sample/ruby-mode.el (ruby-parse-region): if/while修飾子に対応し
+ なくなっていた
+
+ * bignum.c (Init_Bignum): Bignum.newを除く
+
+ * eval.c (rb_eval): 引数評価後にファイル名と行番号を再設定
+
+ * numeric.c (flo_div): typo
+
+ * sample/ruby-mode.el (ruby-parse-region): def /, def `に対応
+
+Fri Oct 25 09:26:29 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * sample/ruby-mode.el (ruby-calculate-indent): "do |aa|"に対応
+
+ * array.c (ary_aset): indexがfixnumの場合ちょっと高速化
+
+ * eval.c (thread_fd_writable): 書き込み前のselectチェック
+
+ * array.c (ary_assoc): 無限ループに落ちた
+
+ * eval.c (thread_wait_for): selectがエラー終了した時,linux以外で
+ の動作が正しくなかった.
+
+Thu Oct 24 08:26:48 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (backtrace): `$@'を文字列から配列に変更した.
+
+ * eval.c (eval): eval中の例外発生位置を保存する
+
+ * bignum.c (bigsub): オペランドの大小比較の失敗
+
+ * re.c (reg_search): 直接参照がない時にも`$~'がセットされるように
+
+Wed Oct 23 10:40:10 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.99.2-961023
+
+ * ext/marshal/marshal.c (r_bytes): mallocをやめ,allocaを使う
+
+ * sample/ruby-mode.el (ruby-calculate-indent): 括弧の対応を変更.
+ ()内ではインデントをレベルを合わせるように
+
+Tue Oct 22 12:59:11 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * hash.c (hash_s_new): sizeを指定できるように
+
+ * ext/marshal/marshal.c (w_object): dumpする深さ制限を指定できるよ
+ うに
+
+ * array.c (ary_s_new): sizeを指定した時の初期化忘れ
+
+ * object.c (f_float): big2dblの宣言忘れ.
+
+ * bignum.c (bigsub): 大きさの近いBignum同士の演算で結果が負になる
+ 場合に間違いがあった.
+
+ * array.c (ary_aset): 置換先と置換元が同じ長さの時内容を
+ shift(memmove)しないように.
+
+ * ext/marshal/marshal.c (marshal_dump): ファイルフォーマットにバー
+ ジョンを埋め込むように
+
+ * ext/marshal/marshal.c (tmpnam): linux-aout-dln用に定義
+
+Mon Oct 21 08:40:20 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * ext/socket/socket.c (sock_s_gethostbyname): hostent構造体の情報
+ を返す
+ (sock_s_gethostbyaddr): IPアドレスからhostent構造体を得る
+ (sock_s_getservbyaname): getservbyname(3)
+
+Fri Oct 18 10:37:36 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * sample/ruby-mode.el (ruby-indent-to): 移動先カラムが負になるバグ
+
+ * eval.c (compile): evalで元ソースの行番号でエラーを表示する
+
+Thu Oct 17 09:52:28 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (eval): evalで文法エラーがあった時にSEGV
+
+ * lib/safe.rb: Restricted.evalの中だけ制限を加える.
+
+ * eval.c (error_print): バックトレースの出力.callerで例外発生位置
+ を調整した時に問題が出る(そんなことをしなければ良いのだが…)
+
+ * eval.c (make_backtrace): バックトレースの生成
+
+Wed Oct 16 12:56:22 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * ruby-man-0.99.2-jp/index.html: 日本語版ドキュメントの完成(長かった…)
+
+ * re.c (reg_regcomp): $=がnilの時の処理
+
+ * string.c (f_chop): $_に対するchop
+
+Tue Oct 15 11:04:23 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.99.2-961015
+
+Mon Oct 14 18:22:38 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (thread_schedule): BOW対応.selectが-1を返した時にバグ(実
+ はdo .. whileがcontinueで先頭にジャンプすると思い込んでいた.条
+ 件の直前だったのね ^^);;;;;
+
+ * sample/ruby-mode.el (ruby-mode-syntax-table): ?のsyntaxが"/"では
+ まずいらしい
+
+ * hash.c (rb_hash): name conflict
+
+Fri Oct 11 00:23:05 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.99.2-961011
+
+ * ext/marshal/marshal.c (w_object): 結局動いていなかった循環オブジェ
+ クト対応を外した.
+
+ * hash.c (rb_hash): Fixnumと文字列の高速化
+
+ * ext/marshal/marshal.c (w_object): 無駄なデータの削除(フォーマッ
+ トの非互換性)
+
+ * io.c (io_readline): 戻り値の不備
+
+ * ext/marshal/marshal.c (marshal_dumps): MSDOS対応
+
+ * ruby.c (load_file): MSDOS対応
+
+Wed Oct 9 17:46:27 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * ext/extmk.rb.in (install): 無駄なコピーを避ける
+
+ * string.c (str_sub_method): マッチがなかった時のString#subの値が
+ 違っていた.
+
+ * eval.c (obj_extend): extendした時にobject_extendedを呼ぶように
+
+Tue Oct 8 00:55:38 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (thread_alloc): 割当の平均化
+
+ * eval.c (thread_schedule): joinのバグを修正
+
+ * eval.c (thread_wait_for): selectへの割込みなどに対応
+
+ * eval.c (thread_select): linuxのselectの挙動に対応(timeoutが変化
+ する)
+
+Mon Oct 7 09:47:19 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.99.2-961007
+
+ * eval.c (PUSH_BLOCK): the_classの保存を忘れていた.
+
+ * ext/dbm/dbm.c (fdbm_store): sizeの保存する場所が間違っていた
+
+ * ext/socket/socket.c (s_accept): thread対応していなかった
+
+Sat Oct 5 01:32:27 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * io.c (io_readchar): EOFで例外を発生させる
+
+Fri Oct 4 11:59:54 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * ext/marshal/marshal.c (w_object): HashとObjectの復旧に必要なハッ
+ シュテーブルが渡されていなかった.
+
+ * variable.c (rb_path2class): ユーザ定義クラスの復旧に失敗していた
+
+ * variable.c (rb_path2class): クラスが存在しない時のエラーをFatal
+ からNameErrorへ.
+
+ * range.c (range_s_new): first,lastが両方Numericの時エラーになって
+ いた.
+
+ * range.c: start->first, end->last
+
+Wed Oct 2 02:02:46 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * file.c: DJGPPでchmod,chownを使えるように(ってDOSにchownがあるのか?)
+
+ * class.c (rb_singleton_class): ビルトインクラスもextendしたり特異
+ メソッドを追加したりできるように
+
+ * variable.c (rb_set_class_path): ユーザ定義のトップレベルクラスに
+ pathを設定しない
+
+ * eval.c (eval): 例外がRuntimeErrorに化けていた
+
+ * eval.c (eval): eval中の例外の表現の改善
+
+ * eval.c (eval): eval_with_bindingとの一本化
+
+ * eval.c (rb_eval): クラス/モジュール定義の中から定義中のクラス/モ
+ ジュールが参照できるように
+
+Tue Oct 1 01:40:09 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.99.2-961001
+
+ * parse.y: cur_crefが2度宣言されていた
+
+ * signal.c (trap): SIGSEGV,SIGBUSのない機種に対応
+
+ * io.c (Init_IO): 引数タイプの指定間違い
+
+Mon Sep 30 15:28:00 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.99.2-960930
+
+ * config.guess,config.sub: $host_osが正しく設定されない
+
+ * eval.c (rb_eval): yieldで正しくないselfが設定されていた
+
+ * eval.c (ruby_run): toplevelの例外処理のバグ
+
+Mon Sep 30 09:13:26 1996 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+
+ * djgpp対応
+
+Sat Sep 28 02:45:10 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.99.2-960928
+
+ * sample/ruby-mode.el (ruby-beginning-of-block): ブロックの先頭に
+ 移動(正しくインデントしていないと動作しない)
+ (ruby-end-of-block): 同上
+
+ * eval.c (class_s_new): Class#newがイテレータとして呼ばれた時は
+ initializeもイテレータとして呼ばれるように
+
+ * signal.c (sigsegv): SEGVでbacktraceを表示するように
+
+Fri Sep 27 09:51:07 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.99.2-960927
+
+ * eval.c (error_print): 引数のないraiseでメッセージが正しく表示さ
+ れるように.
+
+ * eval.c (rb_longjmp): mesgがnilの時RuntimeErrorを生成する.
+
+ * eval.c (f_raise): 引数がない時に対応
+
+ * eval.c (thread_mark): stack上にないデータのアドレス変換を行って
+ いた.
+
+ * eval.c (Init_Thread): 割込みの間隔が1秒と長すぎた.
+
+Thu Sep 26 16:02:45 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (thread_schedule): 一度ペンディングになるとフラグがクリア
+ されていなかった.
+
+ * process.c (rb_proc_exec): system/execの引数が空文字列であった場
+ 合,例外を発生すべきだった.
+
+ * config.sub/config.guess: 新しいものに置き換え
+
+Thu Sep 26 15:41:35 1996 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+
+ * io.c (next_argv): -i.bakをBOWとDOSに対応.
+
+Thu Sep 26 01:31:43 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * io.c (io_sysread): EOFで例外
+
+ * io.c (f_readline): EOFで例外を発生するように.getsは互換性のため
+ nilを返すままにする
+
+ * eval.c (proc_call): lambdaからのreturnでIN_BLOCKフラグが立ったま
+ まだった
+
+ * eval.c (PUSH_BLOCK2): threadに対応するためBlockを一度stackにコピー
+
+Wed Sep 25 11:54:11 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * parse.y (method_call): Const::method()形式を使えるようにしてみた.
+ 引数括弧は省略できない.
+
+ * sample/test.rb: Process.killの存在を確かめてからテストを行う
+
+ * eval.c (eval_with_binding): 第2引数としてbinding(またはlambda)を
+ 与えるとその環境でevalを実行するようにした
+
+ * eval.c (f_binding): 現在のbindingを返す関数
+
+ * eval.c: block構造体にthe_classを保存するメンバを追加
+
+ * process.c (Init_process): kill,wait,waitpidをProcessに移動
+
+Tue Sep 24 02:44:43 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * sample/ruby-mode.el: いろいろ問題が多いので以前の高速化は破棄.
+ 別のアプローチを使った.
+
+ * lib/tk.rb (Tk.pack): 複数のウィンドウを受け付けるpack
+
+Sat Sep 21 11:08:09 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * parse.y (exprs): 空文も受け付けるように文法を変更.今までは改行
+ の連続だけが許されていた.
+
+Fri Sep 20 11:39:18 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * Failの大半を名前つき例外に変更.
+
+ * re.c (Init_Regexp): 名前つき例外を導入.
+
+ * eval.c (f_missing): Objectはinspectしない.
+
+ * object.c (inspect_i): Object#inspectでloopに対応.
+
+ * regex.c (re_search): /^$/が""にマッチしなかった.
+
+Thu Sep 19 19:25:12 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * regex.c (re_search): /^$/が非空行にマッチしていた.
+
+Tue Sep 17 10:28:11 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.99.2-960917
+
+Mon Sep 16 10:47:56 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * sample/ruby-mode.el (ruby-calculate-indent): 演算子継続の場合の
+ 文字列の判定のバグ
+
+ * sample/ruby-mode.el (ruby-calculate-indent): elseなどの次の行の
+ インデント計算を正しく.
+
+Sat Sep 14 08:37:19 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.99.2-960914
+
+Fri Sep 13 08:06:03 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * ext/socket/socket.c (tcpaddr): port番号にntohsをつけ忘れ
+
+ * dln.c (link_undef): テーブルの種類が間違っていた.
+
+ * bignum.c (bigadd): 引き算が発生する時に計算違いが起きていた.
+
+ * parse.y (iter_do_block): do..endでもdynamic variableを.
+
+ * bignum.c (big_pow): より正確な計算を(整数同士ではfloatに変換しな
+ い).
+
+Thu Sep 12 13:11:55 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * variable.c (rb_set_class_path): Stringクラスが初期化される前に
+ Stringを作っていた.組込みクラスにはpathはいらない
+
+ * parse.y (yylex): 0.1が0になっていた
+
+ * parse.y (yylex): 行番号の不整合
+
+ * gc.c (oblist_live_obj): 今「生きている」全部のオブジェクトを返す
+ イテレータ.そのクラス(またはサブクラス)の全部のインスタンスを返
+ すeach_object_ofも定義した.
+
+ * class.c (rb_define_class_id): 無駄なクラスを割り当てていた.結果
+ として未初期化のクラスオブジェクトが存在していた.
+
+Wed Sep 11 00:56:23 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * parse.y (yylex): octalの定数の検出をより正確に(090はエラーとか).
+
+ * bignum.c (big_minus): yがxより大きい場合にエラー.
+
+ * parse.y (yylex): エラー行番号の表示をより正確に
+
+ * sample/ruby-mode.el (ruby-expr-beg): 変数名が1文字の時誤動作して
+ いた.
+
+ * sample/ruby-mode.el (ruby-calculate-indent): ?/でループに落ちい
+ たバグを修正.
+
+ * enum.c (enum_min,enum_max): sortのようにイテレータとしても動作す
+ るように.
+
+ * enum.c (enum_find_all): typo
+
+Tue Sep 10 12:07:12 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * node.h (nd_line): NODEのlineをflagsに押し込めてオブジェクトサイ
+ ズを小さくした.制限:32bit intのマシンの場合,ファイルの行数が
+ 32767を越えると正常に表示されない.
+
+ * st.c: hashとcompareの関数メンバを構造体にパック,クラス的な使い
+ 方を行う.1 tableあたり4 byteの節約.
+
+Mon Sep 9 16:35:54 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * file.c (file_truncate): 提供されない時には特別な例外を発生するよ
+ うに.
+
+ * eval.c (Init_Proc): 不適切な位置のlocal-jumpを例外に.
+
+Sat Sep 7 17:06:15 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (proc_call): まだスコープがスタック上にある時には局所脱出
+ を有効にする.これで,procを生成してcallすることは,スコープを脱
+ 出しない限り,yieldと同じ意味を持つことになる.
+
+Fri Sep 6 13:30:59 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * sample/ruby-mode.el (ruby-indent-to): インデントが変わらない時に
+ はバッファを変更しない.
+ (ruby-calculate-indent): まず文字列の内部か判断してから,前の行
+ からパーズを行う.defunが大きくなった時の高速化.
+ (ruby-in-string-p): 文字列の内部かどうかを判断する関数(以前の
+ parseから分離)
+ (ruby-parse-region): 文字列に対する処理をはずす.
+ (ruby-beginning-of-block): ブロックの先頭に
+ (ruby-end-of-block): ブロックの末尾に(遅い…)
+
+Thu Sep 5 14:23:07 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * file.c (file_s_split): [dirname,basename]にsplitする.
+
+ * eval.c (rb_eval): evalの中でも定数の値が正しくなるように.これで
+ 定数に関しては静的なスコープが保証されるようになった.
+
+ * st.c (rehash): ハッシュ拡大の系数を2から1.79に.割算がより良い値
+ を返すように.
+
+Thu Sep 5 00:32:07 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (class_superclass) クラスのスーパークラスを返すメソッド.
+
+Wed Sep 4 16:54:56 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * random.c (f_rand): Bignumやlongの範囲を越えるFloatに対する乱数も
+ 発生できるように.
+
+ * struct.c (struct_alloc): Fatalではなく例外を発生させるように(通
+ 常の使用で発生しうる).
+
+ * struct.c (struct_s_members): Structの特異メソッドではなく,生成
+ されたStructクラスの特異メソッドにした.
+
+ * st.c (st_init_table): ruby専用にパラメタを固定にした(サイ
+ ズが減った)
+
+Mon Sep 2 11:37:59 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * array.c (ary_shift): capaがあまりにも大きい時には領域をREALLOC
+ (ary_pop): 同上
+
+ * string.c (str_inspect): multibyte character 対応にミス.
+ (str_inspect): unsigned charにしないと符号展開されてしまう
+
+ * parse.y (primary): `::'をprimaryに移動 Foo::Bar.Bazがエラーにな
+ らないように.
+
+ * parse.y (primary): オペレータ形式の特異メソッドが定義できない
+
+ * random.c (f_rand): maxが0の時に対応
+
+ * io.c (io_printf): 関数を定義していたがインタプリタに登録していな
+ かった.
+
+ * file.c (file_s_basename): 第2引数が無い時にエラー.
+
+Thu Aug 29 10:49:40 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * parse.y (expr): イテレータの新形式に「method do .. end」形式を採
+ 用した.もちろん昔の形式も有効.
+
+ * sample/ruby-mode.el (ruby-calculate-indent): endの数の方が多い場
+ 合にもエラーを起こさないように.
+
+Wed Aug 28 09:41:36 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * numeric.c (upto,downto,step,times): 対象がfixnumの範囲を越えても
+ 動作するように.
+
+Mon Aug 26 10:04:37 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * missing/setenv.c (envix): typo(missing `== 0' for memcmp)
+
+ * dir.c (dir_foreach): foreach(dir open -> read loop -> closeまで)
+
+ * io.c (io_foreach): foreach(file open -> read loop -> closeまで)
+
+ * Fatalのうち捕捉可能ないくつかを例外に.
+
+Sat Aug 24 23:56:37 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * bignum.c (bigdivmod): FIX2INT -> INT2FIX 大間違い
+
+Fri Aug 23 18:13:03 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * regex.c (re_free_registers): allocateしていない時には当然 free
+ してはいけない.
+
+Thu Aug 22 01:20:35 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (thread_create): 外側から強制終了させられたthreadは
+ cleanupする必要が無い.
+
+Wed Aug 21 09:57:28 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (thread_create): threadを終了させた大域脱出の情報を
+ main_threadに渡すように.
+
+ * parse.y (call_args): 最終引数に括弧を省略したメソッド呼出しを置
+ けるように(例: print foo bar, baz == print(foo(bar,baz)))
+
+Tue Aug 20 13:37:16 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (masign): 多重代入とrest引数の動作を合わせて空の配列を代
+ 入するように.
+
+ * parse.y (arg): defined?の強度をもうちょっと強く
+
+ * eval.c (error_print): -wで例外名も表示するように
+
+ * eval.c (rb_eval): 新構文に対応
+ (handle_rescue): 捕捉する例外を kind_of? で同定
+
+ * parse.y (primary): rescueの構文を変更(同定引数の追加,複数rescue)
+
+ * Fail()のかなりを適当な例外を使うように
+
+ * eval.c (thread_interrupt): Interrupt(今はnon-local jump)は
+ main-threadに送られるように.
+
+ * eval.c (rb_longjmp): $! の内容を文字列から例外クラスに変更
+ (rb_raise): rb_fail から名称変更
+ (rb_interrupt): 例外化
+ (rb_exit): 例外化
+
+ * error.c (Init_Exception): 例外クラスの新設(文字列のサブクラス)
+
+Mon Aug 19 19:40:52 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * signal.c (trap): 古いハンドラを返すように.
+
+Wed Aug 14 00:07:18 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (rb_trap_eval): ハンドラのためにthreadをforkすることを止
+ めた.
+
+ * eval.c (thread_mark): thread毎の $!, $@ をマークし忘れ
+
+ * ext/dbm/dbm.c (fdbm_delete): イテレータとして呼ばれた場合,要素
+ が無ければブロックを評価する.
+
+ * hash.c (hash_delete): イテレータとして呼ばれた場合,要素が無けれ
+ ばブロックを評価する.
+
+ * array.c (ary_delete): イテレータとして呼ばれた場合,要素が無けれ
+ ばブロックを評価する.
+
+ * eval.c (rb_interrupt): SIGINTのデフォルトをexitから特別な大域脱
+ 出に.やはり割り込まれた位置の表示が無いのは寂しいので.
+
+Tue Aug 13 01:34:00 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (rb_exit): sub-thread内でのexitもstatusを保存するように
+ (thread_create): 自thread内のexitに対応
+
+ * signal.c (sighandle): SIGINTのデフォルトハンドラはexitするように
+ (以前は例外を発生していた).
+
+ * 例外の一部をFatalに.
+
+ * string.c (str_aset): 文字列の置換の対象が部分文字列でなかった時,
+ 例外を発生させないように
+
+ * eval.c (proc_call): Procの中からbreak/nextは通し,他のものは通さ
+ ないように
+
+Mon Aug 12 14:15:09 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * object.c (krn_type): 文字列を返す
+
+ * eval.c (thread_create): sub-thread内でのexitに対応
+
+ * numeric.c (fix_type): 文字列を返す
+
+ * io.c (f_p): デバッグ用データ表示メソッド
+
+ * eval.c (f_missing): nil/TRUE/FALSEを特別扱い
+
+ * string.c (str_inspect): 長い文字列を短縮表示.inspectの働きを
+ human readable stringの生成に統一(re-generatable string は正式に
+ 無くなった).
+
+Sat Aug 10 16:54:21 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * object.c (Init_Object): kernel/nil/false/trueのクラス名を変更(小
+ 文字に),rubyスクリプトからアクセスできないように.
+
+ * eval.c (rb_eval): CONSTANTのアクセス先を単純化.crefを使わない.
+
+ * eval.c (f_eval): 特異メソッド内でも定数の値が正しくなるように
+
+Fri Aug 9 12:23:17 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * array.c (ary_concat): append -> concat Stringに合わせた
+
+ * parse.y (yylex): `$;'が使えなかった.
+
+ * array.c (ary_push_method): 複数引数を受け付けるように.
+ (ary_unshift): 複数引数を受け付けるように.
+
+ * io.c (io_popen): IO.popenでcommand pipeが開けるように.
+
+ * object.c (Init_Object): KernelとNilをruby scriptからアクセスでき
+ ないように.
+
+Thu Aug 8 01:21:47 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * object.c (f_integer): 整数への変換関数
+ (f_float): 実数への変換関数
+ (f_string): 文字列への変換関数
+ (f_array): 配列への変換関数
+
+ * bignum.c (big_to_i): FIXNUMの範囲でない時はBignumのまま返すよう
+ に変更.
+
+Wed Aug 7 09:28:38 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.99.1-960807
+
+ * parse.y (mlhs): 「*foo = 1,2,3」タイプの多重代入も可能に.
+
+ * object.c (Init_Object): クラスTrue/Falseをruby scriptからアクセ
+ スできないように.
+
+ * object.c (nil_inspect): inspect表現は"nil"に
+
+ * io.c (io_print): nilのprintをnilに.
+
+ * object.c (nil_to_s): nilの文字列表現を""に.
+
+Tue Aug 6 01:12:32 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * dir.c (dir_s_open): file descripterが足りない時にはgcしてからも
+ う一度openしてみる.
+
+ * io.c (rb_fopen): すべてのfopen()についてfile descripterが足りな
+ い時にはgcしてからもう一度openしてみる.
+
+ * ext/socket/socket.c (Init_socket): 定数の追加.
+
+ * sample/ruby-mode.el (ruby-indent-to): インデント後のカーソル位置
+ の調整を正しく.
+
+ * gc.c (gc): 割込みチェックを行わない(Cコードの中で安心して
+ malloc()が使えなくなるので).
+
+ * st.c (call_hash_func): signalとthreadによる割込みに対応.
+
+ * sig.h (DEFER_INTS): 割込み禁止区間の指定
+
+ * eval.c (f_require): threadによるrequireの競合に対応(最初の
+ requireが終了するまで他のthreadは待つ).
+
+ * bignum.c (str2inum): 0x80000000の値が負になっていた
+
+ * sprintf.c (f_sprintf): 文字列末尾,行末の単独の`%'に対応
+
+ * bignum.c (big_cmp): 比較の結果が逆になる時があった.
+
+Mon Aug 5 10:58:13 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * process.c (proc_exec_v): 例外のメッセージを分かりやすく.
+
+ * ext/dbm/dbm.c (fdbm_store): nilを格納すると要素の削除になる
+
+ * ext/dbm/dbm.c: サイズをキャッシュ.
+
+Sat Aug 3 01:52:52 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (rb_fail): `fail'が引数無しで呼ばれた時だけ以前の`$@'を保
+ 存するように.
+
+ * eval.c (f_fail): frameの調整
+
+Fri Aug 2 11:26:21 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * ext/socket/socket.c (bsock_setopt): valとしてTRUE/FALSE/Fixnumも
+ 受け付けるように.
+
+ * ext/socket/socket.c (Init_socket): SO_REUSEADDR等の定数の追加
+
+ * ext/md5/md5init.c: md5モジュール(初の複数ファイルからなるモジュー
+ ルでもある)
+
+ * ruby.h (Make_Data_Struct): Data: objectのinstance変数に格納 ->
+ Data型のObjectに(Dir,Time,Proc,Thread,DBM)
+
+Thu Aug 1 11:38:44 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * ext/dbm/dbm.c (fdbm_store): valueが文字で無い時に対応
+
+Wed Jul 31 10:53:42 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * ext/socket/socket.c (open_inet): htonsが必要であった
+ (tcpaddr): ntohlで変換した
+
+ * process.c (rb_proc_exec): execvp -> execv
+
+Tue Jul 30 17:48:33 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c: `$?'をthread localに
+
+ * Makefile.in (install): install時にstripを行う
+
+ * configure.in: install時のstripの検出
+
+ * configure.in: NEXTSTEP対応
+
+ * version 0.99.1-960730
+
+Tue Jul 30 16:40:35 1996 SHIROYAMA Takayuki <psi@fortune.nest.or.jp>
+
+ * dln.c (dln_load): NeXT dln(mach-o)対応.configureは未対応
+
+Tue Jul 30 09:46:51 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * process.c (f_system): 複数引数もとれるように
+
+ * process.c (f_exec): 複数引数もとれるように
+
+ * array.c (ary_append): 配列(またはEnum)の要素を破壊的に追加
+
+ * array.c (ary_plus): Enumはその要素を追加
+
+ * file.c (file_s_open): File.openを追加
+
+ * struct.c (struct_new): FIX2INTを忘れていた
+
+ * file.c (Init_File): exists? -> exist?
+
+ * object.c (obj_is_kind_of): is_kind_of? -> kind_of?, is_a?
+
+ * object.c (obj_is_instance_of): is_instance_of? -> instance_of?
+
+Mon Jul 29 16:40:02 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * parse.y (parse_regx): 式展開を行った場合,casefoldの設定ができて
+ いなかった.
+
+ * object.c (true_type): TRUE/FALSEにtypeを実装.
+
+ * parse.y (read_escape): 3文字以内のoctalに対応(\0とか)
+
+Fri Jul 26 00:31:45 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * array.c (ary_reverse_bang): in-placeで配列を反転させる
+ (ary_sort_bang): in-placeでsortする
+ (ary_sort): sortした配列を返すように
+ (ary_delete_at): 指定した位置の要素を削除する
+
+ * eval.c (rb_call): stack深さチェックを毎回は行わないように
+
+ * error.c (Warning): 実行中のwarningが表示されていなかった
+
+ * eval.c (compile): 例外発生を分離.
+
+ * eval.c (f_eval): 変数rb_in_evalを正しく管理するように
+
+ * ext/dbm/dbm.c (fdbm_store): 格納するkeyを文字列に変換
+
+ * eval.c (rb_call): 無限再帰のチェックを大域脱出を行うC methodにも
+ 対応させた.threadのstack深さチェックルーチンを流用.
+
+ * parse.y (yylex): 第1引数のunary -/+の判定が間違っていた.
+
+ * parse.y (yylex): unary +で数字を余計に読んでいた(ex. +5 -> 55)
+
+Thu Jul 25 12:15:04 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * parse.y (yylex): 曖昧でない引数に対して警告を出していた.
+
+ * eval.c (iterator_p): 引数で呼んでも正しい結果を返すように.
+
+ * parse.y: break/next/redo/retryのメソッド化.
+
+ * sample/ruby-mode.el (ruby-calculate-indent): nestのチェックミス
+
+ * sample/ruby-mode.el (ruby-parse-region): 予約語のチェックを強化
+
+ * parse.y (primary): unless/untilの復活
+
+Tue Jul 23 18:50:10 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * array.c (Array#empty?), Hash.c (Hash#empty?), ext/dbm/dbm.c (DBM#empty?):
+ 空の判定述語
+
+ * eval.c (f_unless): ifの逆をするイテレータ
+
+ * eval.c (f_until): whileの逆をするイテレータ
+
+ * parse.y: notの優先順位をand/orより高く
+
+ * parse.y (expr): `!'を引数括弧を省略したcallでも有効に
+
+Mon Jul 22 10:15:38 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.99-960722
+
+ * array.c (ary_print_on): OFSのNILチェックが不完全
+
+ * ruby.c (load_file): 標準入力からのスクリプトが空の時に対応.
+
+ * ruby.c (proc_options): -wでは引数無しの時には標準入力からスクリ
+ プトをとる(-vではたんに終了する).
+
+ * array.c (ary_compact): nilの要素を取り除くメソッド
+
+ * array.c (ary_nitems): nilでない要素を数えるメソッド
+
+Sun Jul 20 00:51:53 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * ruby.c (proc_options): -w optionを追加
+
+ * parse.y: {}が閉じていない時には展開しない文字列を
+
+Fri Jul 19 16:16:05 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.99-960719
+
+ * lib/find.rb: 石塚版(pruneの拡張付き)
+
+ * file.c (test_l): lstatで調べないとね.
+
+ * eval.c (f_throw): 第2引数を省略可能に.
+
+ * parse.y (str_extend): {}のネストに対応
+
+Thu Jul 18 18:25:46 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.99-960718
+
+ * parse.y (str_extend): 文字列中の式展開に \" ' ` / を含む事ができ
+ るように.
+
+Tue Jul 16 15:55:31 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * sample/ruby-mode.el (ruby-parse-region): 正規表現内のエスケープ
+ に対応
+
+ * version 0.99-960716
+
+Fri Jul 12 10:06:19 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * io.c (f_select): 引数のclose check.
+
+ * ruby.c (load_file): #!行の引数チェックを第1引数に限定(実をいうと
+ DOS改行対策)
+
+Wed Jul 10 17:18:35 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.99-960710
+
+ * time.c (time_s_timegm/time_s_timelocal): 時間を生成するメソッド
+
+Mon Jun 17 15:59:20 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.99-960617
+
+ * parse.y (yyerror): エラー表示の簡略化.
+
+Wed Jun 12 14:11:01 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * signal.c (rb_trap_exit): trap 0はthreadを生成せずに処理する.
+
+Fri Jun 7 10:17:01 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * array.c/hash.c (indexes): 配列1引数のパターンを無くした.配列の
+ 場合は`*ary'を使ってもらおう.
+
+ * eval.c (thread_wait_threads): main_threadが終了する前に他の
+ threadを待つ(強制的には終了させない).
+ (ruby_run): 他のthreadを待っている間にシグナルが来たら,全thread
+ を強制終了させる.
+
+ * eval.c (rb_fail): メソッド名を`$!'に埋め込む.
+
+ * eval.c (thread_create): main_threadのコンテクストがセーブされな
+ い場合があった.
+
+ * process.c (f_sleep): 時間を指定せず,threadがひとつしかない状況
+ にも対応.
+
+ * eval.c (thread_create): create後,fnを呼び出す前にcontext switch
+ が起きると違うcontextでfnが実行されてしまうバグ.
+
+Mon Jun 3 08:03:17 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * struct.c (struct_s_def): メンバの指定を文字列,シンボル(FIXNUM)
+ 双方で可能にした.
+
+ * ext/etc/etc.c (Init_etc): 構造体オブジェクトをGCから保護した.
+
+ * error.c (rb_sys_fail): nil/FALSEを引数として受け付けるように.
+
+Thu May 30 16:19:08 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (thread_select): EINTRに対応.
+
+Wed May 29 11:04:51 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (f_catch): catch/throwを実装した.
+
+Tue May 28 13:30:52 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.99-960528
+
+ * eval.c (thread_cleanup): main threadが終了すると他のthreadも終了
+ することの明確化.
+
+ * signal.c (trap): SIGINTのデフォルトの設定ミス(本当にSIG_DFLでは
+ まずかった).rubyではちゃんとハンドルしないと.
+
+ * eval.c (thread_interrupt): SIGINTはmain_threadに例外を発生させる
+ ように.
+
+Mon May 27 15:13:31 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (thread_status): threadの状態を返すメソッド.threadの終了
+ を待たない.
+
+ * eval.c (thread_value): 一種のpromiseを実装するためのメソッド.
+
+ * eval.c (thread_join): 待っているthreadが例外を起こした時には,
+ joinがその例外を発生するように.
+
+ * eval.c (thread_create): threadでの例外をpropagateしないように.
+
+Fri May 24 10:47:53 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * enum.c (Init_Enumerable): `size' as alias to the `length'
+
+ * eval.c (thread_save_context): `$@', `$!'をスレッド毎にセーブ.
+
+ * eval.c (superclass): エラー表示をより親切に.
+
+Thu May 23 10:38:41 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.99-960523
+
+ * eval.c (superclass): エラー時にスーパークラス名を(分かれば)表示
+ するように.
+
+Wed May 22 19:48:42 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * parse.y (superclass): スーパークラスの指定子を`:'から`<'に変更.
+
+Tue May 21 09:27:59 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * lib/thread.rb: threadをサポートするクラス(Mutex, Queue).
+
+Mon May 20 09:39:49 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * time.c (time_cmp): 浮動小数点数も扱えるように.
+ (time_minus): Time - Timeが浮動小数点数を返すように.
+
+Fri May 17 15:40:10 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * process.c (rb_proc_exec): Thread対応時にexecの直前に
+ ITIMER_VIRTUALをリセットする.
+
+Tue May 14 02:12:44 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * signal.c (sighandle): SIGINTに対してデフォルトで例外を発生させる
+ のをやめ,status 130でexitするようにした.
+
+ * eval.c (thread_schedule): Threadのバグはほとんどとれたようだ.
+
+Fri May 10 11:21:08 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (thread_schedule): ユーザレベルThread機能.効率はともかく
+ 移植性はある.今後,thread間の通信機能を実装する予定.
+
+Thu May 2 21:22:31 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * time.c (time_timeval): struct timevalを直接返すように(static変数
+ を使わない).
+
+Wed May 1 17:27:32 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * process.c (f_sleep): 整数以外のtimeを指定できるように.
+
+Thu Apr 25 08:19:15 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * file.c (file_s_dirname): ファイル名が"/"を含まない時,"."を返す
+ ように(GNU dirnameの仕様).
+
+ * file.c (file_s_basename): まだnilと0を混同しているソースが残って
+ いた.
+
+ * parse.y (exprs): エラーリカバリを追加.
+
+Wed Apr 24 15:51:05 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * string.c (str_chop_bang): CRLFの場合2 bytesをchop!するように.
+
+ * ext/socket/socket.c (tcp_svr_s_open): まだnilと0を混同しているソー
+ スが残っていた.
+
+Tue Apr 23 18:14:25 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * pack.c (pack_pack): "A/a"のバグ.余計なpaddingが入っていた.
+
+Thu Apr 18 13:02:11 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * configure.in: アーキテクチャ依存部を別ディレクトリにインストール
+ するように.
+
+ * parse.y (yyerror): エラー発生時にエラー行とその位置を表示するよ
+ うに.
+
+Wed Apr 17 14:22:42 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * defines.h: SAFE_SIGHANDLEを無くし,危険な選択はできないように.
+
+ * io.c (io_ungetc): 新機能.
+
+ * ruby.c (load_file): ファイルからの読み込み方式が変わったのに対応.
+
+ * parse.y (compile_file): ファイルからの入力を一度全部読み込むのを
+ 止めて,getsを使うことにした.
+
+Wed Apr 10 17:40:11 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.98
+
+Tue Apr 9 09:54:30 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * parse.y (iter_block): イテレータブロックの指定をメソッド呼び出し
+ に限定.文法の明確化.
+
+ * eval.c (rb_eval): 条件式の正規表現の比較をinline化.
+
+ * eval.c (rb_eval): defined? の 定義情報(種別)を文字列で返す.
+
+ * node.h: NODE_BEGIN -> NODE_RESCUE, NODE_ENSUREに分離.
+
+ * eval.c (rb_eval): option -n/-pのトップレベルループのinline展開.
+
+ * parse.y (cond0): 条件式中の文字列は比較の対象としない
+
+Wed Mar 27 12:33:54 1996 Tairo Nomura <tairo@hucom.tp.titech.ac.jp>
+
+ * defines.h: NeXT対応
+
+Wed Mar 27 10:02:44 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * parse.y: 予約語の変更 continue -> next
+
+Mon Mar 25 07:34:37 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * parse.y (parse_regx): o(once)オプションを追加.
+
+Fri Mar 22 14:25:35 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.97d
+
+ * eval.c (dyna_var_defined): 動的ローカル変数の定義チェック用ルー
+ チン.
+
+ * parse.y (gettable): eval()の中での動的ローカル変数(既に値を持っ
+ ているもの)の検出に失敗していた.
+
+Tue Mar 19 10:46:47 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.97c
+
+ * re.c (reg_s_new): compile時にsegmentation fault.
+
+ * parse.y (str_extend): いつもevalするように.
+
+Wed Mar 13 11:00:42 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * parse.y (str_extend): 文字列中の式展開の不備を無くした.
+
+ * parse.y: 下手なエラーリカバリを外した.
+
+Tue Mar 12 12:30:20 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (rescue): 間違ってensureでも例外を捕捉していた.
+
+Wed Mar 6 12:11:03 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * parse.y (var_extend): 変数展開"#{}"で,任意の式を書けるようにし
+ た,これで「変数」展開では無くなっちゃったなあ.
+
+ * regex.c (init_syntax_once): `_'をwordに追加.
+
+ * regex.c (re_compile_pattern): `\w',`\W'の判定をsyntax tableを使
+ うように.
+
+Tue Feb 27 10:15:32 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * object.c (obj_inspect): 表示するインスタンス変数が無い時には,
+ to_sを使う.
+
+ * configure.in: dlnの検出を自動的に.
+
+Mon Feb 26 19:55:33 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * ruby.c (readin): read(2)で一度にファイルが読み込めない場合に対応.
+
+Sat Feb 24 14:47:18 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.97b
+
+Fri Feb 23 11:26:02 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * class.c (rb_define_module): C言語で定義されたモジュールのPATHの
+ 設定忘れ.文字列化でcore dump.
+
+ * eval.c (mod_include): 戻り値をnilに.
+
+ * version 0.97a
+
+Thu Feb 22 21:03:42 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * array.c (ary_times): 「配列*文字列」がjoinと同じ働きをするように.
+
+Wed Feb 21 11:18:09 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * configure.in : fileCountをcache.
+
+ * configure.in : LinuxでELF環境を自動的に検出できるよう.
+
+Tue Feb 20 11:18:09 1996 Mitsuhide Satou <mit-sato@aries.bekkoame.or.jp>
+
+ * FreeBSD dynamic link対応.
+
+Fri Feb 16 08:50:01 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * object.c (obj_inspect): インスタンス変数を持たないオブジェクトも
+ 正しく表示されるように.
+
+Wed Feb 14 16:56:44 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (rb_eval): 条件式の`2..2'など左辺成立直後に右辺が成立する
+ パターンにバグ.
+
+Tue Feb 13 18:22:22 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.97
+
+Fri Feb 9 21:32:55 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * lib/tkscrollbox.rb: スクロールでtclの設定を行い,ruby<->wishの不
+ 要な通信を無くした.
+
+Wed Feb 7 10:26:52 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * string.c (str_aref): indexをunsigned intでとっていた.
+
+ * string.c (str_aref): 範囲外のindexに対してnilを返す.
+
+ * parse.y (special_local_set): `$_'が宣言無しに使われた場合に対応.
+ 関数をvariable.cから移動.
+
+ * string.c (str_sub): 置換開始位置が間違っていた.
+
+Tue Feb 6 16:17:31 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * sample/ruby-mode.el (ruby-parse-region): コメントの読み飛ばしの
+ バグ.
+
+Fri Feb 2 18:35:28 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * variable.c (lastline_get): `$_'を`$~'と同じようにSCOPEローカルな
+ 変数にした.
+
+Thu Feb 1 14:14:07 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * file.c: statのcacheをやめた.
+
+Wed Jan 31 07:13:08 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (proc_s_new): procの中でyieldを呼ばれた時にcore dumpして
+ いた.とりあえず例外を発生させる.
+
+ * variable.c (rb_class2path): singleton classに対応.
+
+ * ext/etc/etc.c (Init_etc): struct_defineのターミネータがnilだった
+ (0でなければならない).
+
+ * ext/marshal/marshal.c: TRUE/FALSEを吐き出せるように.
+
+ * eval.c (rb_get_method_body): キャッシュのalias対応,いままでは
+ aliasはキャッシュに入っていなかった.
+
+Tue Jan 30 09:55:13 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (rb_eval): NODE_BLOCK - tail recursive(というほどでもない
+ が).
+
+ * io.c (io_pipe): pipe(2)を実装した.
+
+ * eval.c (rb_eval): Qselfをなくした.thread対応への第一歩.先は遠
+ いが….
+
+ * eval.c (proc_call): procの中でのreturnはprocの終了を意味するよう
+ に.ただし,procからのyieldの中でのreturnは例外を発生する.
+
+Wed Jan 24 11:33:48 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.96a
+
+ * dir.c (dir_each): `$_'の値を変更するのをやめた.
+
+ * io.c (f_readlines): nilとFALSEの分離のあおりで無限ループに落ちて
+ いた.
+
+ * ruby.c (ruby_options): $0の設定ミス.
+
+Tue Jan 23 15:28:21 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (rb_eval): ``は文字列を引数とするメソッド(`)呼び出しのシ
+ ンタックスシュガーであるとした.
+
+ * ruby.c (addpath): `-I'オプションでディレクトリが「前に」追加され
+ るように変更.
+
+Fri Jan 19 11:23:12 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * dln.c (load_1): N_INDR対応(出来たような気がする).
+
+Thu Jan 18 18:14:20 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * ruby.texi: FALSEとnilの分離を反映した.
+
+Tue Jan 16 17:39:23 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.96 - とりあえずnilとFALSEを区別する版
+
+Wed Jan 10 15:31:48 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * re.c (reg_match): マッチしなかった時の戻り値はFALSE.
+
+ * object.c (rb_equal): `0 == nil'がTRUEになるバグ.
+
+Tue Jan 9 00:44:58 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * nilとFALSEが分離可能に変更.
+
+ * nilとFALSEと0の区別を厳密に.
+
+ * struct.c (struct_new): 引数を0で終る必要が無くなった.
+
+ * object.c (inspect_i): オブジェクトのチェックのバグ(Fixnumでcore
+ dumpしていた).
+
+ * range.c (range_to_s): Rangeの表示を改善.
+
+ * object.c (true_inspect): TRUEの表示を`TRUE'に.
+
+Mon Jan 8 15:02:33 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * numeric.c (fix_mul): divide by zero errorが発生した(オーバーフロー
+ 検出のバグ)
+
+ * texinfo.texをパッケージに含めた.
+
+Sun Dec 31 00:08:49 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (rb_eval): `::'では,そのクラスで定義された定数を参照する
+ ように変更.
+
+ * string.c (Init_String): eachをeach_lineに戻した.
+
+Thu Dec 28 12:31:55 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (rb_eval): caseの演算子を`=~'から`==='に.
+
+ * variable.c (rb_const_set): クラス定数の再定義を許す(同じクラスで
+ は不可).警告は出す.
+
+Wed Dec 27 13:27:52 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.95c
+
+ * ext/tkutil/tkutil.c: wishがあってもなくても一応コンパイルだけは
+ するように.
+
+ * lib/tk.rb: 環境変数PATHから{wish|wish4.0}を探すように.
+
+Tue Dec 26 01:03:42 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * sample/ruby-mode.el (ruby-parse-region): 正規表現の検出強化.
+
+ * numeric.c (fix_mul): 乗算のオーバーフロー検出アルゴリズムのバグ.
+
+ * ext/extmk.rb.in: ./install-shを使う場合のPATHを調整.
+
+ * Makefile.in (install): lib/*.rbを一つずつインストール.
+
+ * io.c (io_each_line): イテレータの戻り値をnilで統一.
+
+Fri Dec 22 10:34:32 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.95b
+
+ * variable.c (f_untrace_var): 第2引数を指定すると特定のtraceを削除
+ できるように.
+
+ * variable.c (f_trace_var): 第2引数がnilの時,traceを削除する.
+
+ * lib/tk.rb (file_readable/file_writable): 第2引数をnilにすること
+ によるevent handlerの削除.
+
+ * parse.y (variable): ドキュメントに`__FILE__'と`__LINE__'が残って
+ いた.`caller(0)'で代用したはずだったのに.
+
+ * eval.c (f_eval): $!のリセット.
+
+ * error.c (err_sprintf): 勝手に"\n"を付加するのを止めた.
+
+ * parse.y (f_arglist): 引数リスト直後のif/whileの読み間違い.
+ lex_stateの値が設定されていなかった.
+
+Thu Dec 21 00:56:57 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.95a - ^^;;;
+
+ * lib/tkscrollbox.rb: パッケージに入ってなかった.
+
+ * configure.in: FILE structureのチェックにバグ.
+
+ * Makefile.in (clean): ext以下をinstallしていた.
+
+ * ext/socket/extconf.rb: Solarisにおける-lnlsのチェック.
+
+ * array.c (beg_len): バグがあった….悲しい.
+
+ * version 0.95 - fj.sourcesに
+
+ * eval.c (rb_eval): rescueのロジックをrb_rescue()に一元化.
+
+Wed Dec 20 19:30:58 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * Makefile.in: 不要なコンパイルの回避(より完全に).
+
+ * class.c (singleton_class_new): `single'->`singleton'
+
+Tue Dec 19 07:14:33 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * io.c (closed?): IOがcloseされているかどうかを知る述語.
+
+ * parse.y (primary): 特異メソッドの引数のlex_stateが不適切.
+
+ * lib/tk.rb: tcl->rubyの変換関数の用意.
+
+ * ext/extmk.rb.in (install): installの2重コンパイルの回避.
+
+ * array.c (range_beg_len): range指定の不適切なエラーを訂正.
+
+ * string.c (str_aref): range指定のバグを削除.
+
+ * lib/tk.rb (tk_split_list): Tclのリストに対応.
+
+Mon Dec 18 09:58:12 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.94
+
+ * dln.c (dln_load): HP対応(未確認)
+
+ * eval.c (Init_Proc): BlockをProcに改名.
+
+Sat Dec 16 13:46:14 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (rb_eval): retryでイテレータの再実行ができるように.
+
+Fri Dec 15 17:14:30 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c: proc:lambdaの親しみやすい別名
+
+Thu Dec 14 17:21:55 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (dyna_var_asgn): イテレータブロック内で最初に初期化された
+ ローカル変数の有効範囲をそのブロック内に限定.これでlambdaと呼べ
+ ないことはない.
+
+Wed Dec 13 02:30:58 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * gc.c: autoloadのマークミス.
+
+ * lib/tk.rb: wishからの複数行の戻り値に対応
+
+ * lib/tkcomposite.rb: 複合widget
+
+ * variable.c (rb_class2path): ICLASSに対応してなかった.
+
+ * eval.c (ruby_run): exit(0)のバグ
+
+Sat Dec 9 01:21:24 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * ext/marshal/marshal.c (dumps|load): 文字列に対する入出力を可能に
+ した(ただし実はファイル経由なのだ).
+
+Fri Dec 8 18:29:11 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * ext/marshal/marshal.c: シンボルを一度だけ初期化する.
+
+Thu Dec 7 07:58:50 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * parse.y (yylex): 第1引数の正規表現の認識にエラーがあった.同時に
+ 状態数を減らした.
+
+ * string.c (str_sub): 置換でスキップ幅が大きすぎた.
+
+Wed Dec 6 15:14:23 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * string.c (str_sub_method): sub/gsub(!なし)は置換が行なわれなかっ
+ た時,置換前の文字列を返す.
+
+Tue Dec 5 00:55:15 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * parse.y (yylex): 括弧を省略した時の引数展開の`*'に対応.
+
+ * eval.c (ruby_run): EXITハンドラ内での例外に対応.
+
+ * bignum.c (big_cmp): BignumとFixnumの比較で落ちる.
+
+Mon Dec 4 14:21:18 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * parse.y (call_op): コンパイル時の定数式の展開をやめた.労多くし
+ て益少ないと判断したので.
+
+Thu Nov 30 01:35:15 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * lib/tk.rb: {Radio,Check}Buttonのvariableの実装.
+
+ * eval.c (rb_yield_0): Block.callがネストした時のバグ.
+
+ * io.c (f_select): 常に配列3つをふくむ配列を返すように
+
+ * lib/tk.rb: fileeventをruby側で実装.
+
+Wed Nov 29 17:53:23 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * variable.c (rb_ivar_get): selfを常に指定するように.
+
+Tue Nov 14 00:07:29 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * lib/tk.rb: Tk4.0対応
+
+Mon Nov 13 16:23:32 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.93
+
+Thu Nov 9 23:26:01 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * gc.c (gc_mark): モジュールのMixinのマーク忘れ.
+
+ * parse.y (f_arglist): メソッド定義の引数を括弧で括らなくても良い
+ ようにした.
+
+Wed Nov 8 00:17:51 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (rb_yield_0): 未初期化のローカル変数があった.
+
+ * eval.c (rb_eval): pendig signalのチェックをeval実行後に行うよう
+ にした.でないとシグナルの発生と検出が遠く離れてしまう事がある.
+
+ * parse.y: class文のsuperclass部を定数から式に拡張した.
+
+ * lib/tk.rb: Tkのほぼ全ウィンドウクラスに対応.キャンバスとテキス
+ ト上のオブジェクトが残っている.
+
+Tue Nov 7 08:18:37 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * signal.c (trap): ブロックを指定できるように.
+
+Mon Nov 6 16:44:00 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (f_caller): 呼出元の情報を得る.
+
+ * ext/tkutil/tkutil.c: wishのstderr出力を監視することで,エラー処
+ 理を行う.
+
+ * ext/tkutil/tkutil.c: wishとの通信部をCで記述.
+
+Sat Nov 4 01:12:59 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * sample/ruby-mode.el (ruby-calculate-indent): インデントの計算を
+ もう少しスマートにした(正規表現のチェック,継続行のチェック).
+
+ * eval.c (rb_call): 無限再帰を避けるため,関数のネストレベルの制限
+ を行なう.
+
+ * lib/tk.rb: Tkインターフェース.まだ不完全だが.
+
+ * eval.c (rb_yield_0): 空のBlockのバグ.
+
+ * sample/ruby-mode.el (ruby-calculate-indent): 行末の演算子による
+ 行継続に対応.
+
+Fri Nov 3 12:56:21 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (rb_call): 本体が空の関数の実行にバグ.
+
+ * parse.y (var_extend): 文字列の末尾の変数展開のバグ.
+
+ * variable.c (rb_gvar_set): traceの評価時にに変数値を与えるように.
+
+ * eval.c (f_require): ruby scriptのrequireにbug.
+
+ * variable.c (rb_const_get): モジュールのinclude対策.
+
+Thu Oct 19 13:56:06 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * dln.c (dln_load): HP対応でのtypo.
+
+Wed Oct 18 17:39:39 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.92
+
+ * object.c (krn_type): オブジェクトの動的な型を返すメソッド.
+
+Tue Oct 17 00:48:18 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * ruby.c (proc_options): -X オプション.chdirだけを行う.
+
+ * re.c (reg_search): 漢字コードを途中で変更できるように.コンパイ
+ ル時のコードが変更された時にはマッチの直前に正規表現の再コンパイ
+ ルを行う.定数KCODEから変数$KCODEへ.
+
+ * parse.y: ()のなかにcompexprを許す.
+
+ * re.c (reg_search): メモリリークを直した.
+
+Fri Oct 13 13:19:19 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * string.c (str_sub): 文字列置換にバグ.
+
+ * string.c (str_strip_bang): 文字列の後ろの長さの調整が行われてい
+ なかった.
+
+ * re.c (reg_search): $&, $1...はローカルに束縛するようになった.呼
+ び出したメソッドでのマッチは現スコープの$&などの値に影響しない.
+ マッチの情報をスコープ外で得たいときには$~を使って束縛情報を持ち
+ 出す必要がある.
+
+Thu Oct 12 00:33:33 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * re.c (reg_search): String:split, String:indexでは$&, $1...が変化
+ しないようにした.
+
+ * io.c (rb_str_setter): setterの仕様が変更になっていた.
+
+ * variable.c (f_trace_var): 第2引数を省略してイテレータとして呼べ
+ るように.
+
+Wed Oct 11 11:50:59 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.91
+
+ * variable.c (var_setter): 引数が間違っていた.致命的バグ.
+
+ * io.c (pipe_open): $stderrの値が変更されている時にはそちらを
+ 子プロセスのstderrに設定する.
+
+Mon Oct 9 13:06:33 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * object.c (mod_to_s): モジュール内のモジュールは`::'を使った表現
+ で表示されるように.
+
+ * variable.c (rb_gvar_set): 代入によるループが発生しないように,
+ trace内での代入ではtraceを評価しない.
+
+ * struct.c (struct_equal): structのequal判定にクラスの一致を含めた.
+
+Sat Oct 7 00:18:32 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (rb_eval): defined?の機能を拡張(yieldのチェック,superの
+ 存在など).
+
+Fri Oct 6 12:06:47 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.90
+
+ * st.c (st_foreach): 要素を削除した時に要素数が変化していなかった.
+
+ * hash.c (hash_values): バグ修正.keysを返していた….
+
+ * parse.y (call_op): defined? の引数では定数の畳み込みを行わない
+ (チェックする前にコンパイルエラーになっては困る).
+
+ * スコープ生成の一部見直し.
+
+Thu Oct 5 00:29:43 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * 関数とクラスの命名規則を変更した.関数名,変数名の全面書き換え.
+
+ * gc.c (looks_pointerp): ヒープチェックの高速化.
+
+ * struct.c (Fstruct_aset): 構造体に対する`[]='.
+ (struct_set): 構造体メンバに対する代入.
+
+Wed Oct 4 09:54:07 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.89
+
+ * eval.c (Frequire): ダイナミックロードのエラーチェックを厳しく.
+
+ * struct.c: structの構造を完全に書き換えた.以前は順序付きの
+ id->valueの連想配列であったが,今度は構造体毎に新しいクラスを生
+ 成するようにした.
+
+ * parse.y: `::'の意味をAssocの生成からクラス(モジュール)内の定数ア
+ クセスへ変更.
+
+ * assoc.c: なくす.
+
+Tue Oct 3 13:31:08 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * variable.c (Ftrace_var): trace_var, 大域変数への書き込みhookを設
+ 定する.
+
+ * variable.c: global_entryの構成を書き換えた.これでtrace_varを実
+ 装できる.
+
+ * file.c (Ffile_stat): "&"で直前のfstatの結果も参照できるように.
+
+Fri Sep 29 14:15:13 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.88
+
+ * dln.c (dln_load): AIXとHPに対応したコードを入れた(動作は未確認).
+
+ * ext/extmk.rb.in: 必要に応じて,定数EXTLIBを定義するように.
+
+ * dln.c (dln_load): dln独立に書き換える.将来の拡張用.
+ (load_1): dln_a_outにおいてソースコードでライブラリを明示的にロー
+ ドする必要がないように変更した.
+
+Thu Sep 28 13:31:37 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * sample/ruby-mode.el: もっとましなhilit19対応(正規表現).
+
+Wed Sep 27 04:12:44 1995 Takahasi Mamoru <taka@soum.co.jp>
+
+ * sample/test.rb: echoで-nを使わないように(SysV対策).
+
+ * ext/extmk.rb.in: sub -> sub!
+
+Tue Sep 26 19:12:42 1995 Yasuo OHBA <jammy@csg.mes.co.jp>
+
+ * dln.c (dln_find_1): `.', `..'から始まるパスに対応した.
+
+Mon Sep 25 12:33:03 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.87
+
+Sat Sep 23 10:00:18 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (Fmod_modfunc): メソッドをprivateにし,同時に特異メソッド
+ も定義するメソッド.パッケージ的使い方のモジュール用.
+
+Fri Sep 22 11:02:44 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * lib/find.rb: findを提供するライブラリ
+
+ * variable.c (rb_define_variable): hookの設定を分離.
+ (add_hook): 1変数に対して複数のhookを設定できるように.
+
+Thu Sep 21 00:22:11 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * string.c (Fstr_frozen): 文字列が更新不可かどうかをチェックする述
+ 語メソッド.
+
+ * hash.c (Fhash_aset): keyが文字列の時,キーの内容が変化しないよう
+ に,dupしてfreezeする.
+
+Wed Sep 20 16:12:44 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.86
+
+ * ext/extmk.rb.in (have_header): キャッシュにバグ.
+
+ * ext/extmk.rb.in (have_library): 引数の順序が変わった.
+
+Thu Sep 14 18:00:59 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * object.c (obj_is_instance_of): is_member_ofから名称変更.
+
+ Wed Sep 13 15:44:35 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * string.c (Fstr_tr_bang): 範囲外の文字に対する変換バグ.
+
+Tue Sep 12 14:27:58 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * file.c (Sfile_expand_path): expand_file_name -> expand_pathに名
+ 称変更.
+
+ * enum.c (Fenum_member): includes? -> member? に名称変更.
+
+ * string.c (Fstr_each_byte): StringはByteArrayであるという基本に戻っ
+ て,eachの定義をeach_byteに変更した.今までのeachはeach_lineでア
+ クセスできる.
+
+Mon Sep 11 18:31:17 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * file.c (cache_stat): ファイル名として"&"を指定すると直前の
+ stat(2)の結果を再利用するように.
+
+Fri Sep 8 14:18:51 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * ruby.texi: `!', `?'に対応してアップデート.
+
+ * parse.y: defined -> defined?
+
+ * file.c: FileOpの一文字メソッドをなくす.一文字テストはtestメソッ
+ ドにまかせる.
+
+ * parse.y (yylex): 変数名の後ろに`?'も許す.述語メソッドの後ろに
+ `?'を追加する.
+
+Thu Sep 7 20:01:33 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * string.c: 文字列の中身を更新するメソッドの名前の終りに`!'を付加.
+ `!'の無いバージョンも用意した.
+
+ * parse.y: 変数名の後ろに`!'を許す.
+
+Wed Sep 6 14:12:19 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.85
+
+ * string.c (Fstr_dup): 文字列の複製を作る
+ (Fstr_freeze): 文字列の更新不可属性を設定できるように.
+ (Fsub/Fgsub): $_の内容をdupしてから置換を行うように.
+
+ * ruby.h (CLONESETUP): flagsの状態もコピー
+
+Tue Sep 5 01:27:50 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * sample/test.rb: 失敗の検出を厳しく.
+
+Fri Aug 25 14:31:02 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * process.c (Ffork): イテレータとしても動作するように.
+
+ * version 0.84
+
+ * signal.c (sig_beg): ハンドラが設定されている時には再設定しない.
+
+ * ext/extmk.rb.in (create_makefile): shared objectのリンクの際に
+ `-l'オプションを指定するように.
+
+ * signal.c (trap): `EXIT'で終了処理を行う設定が出来る.
+
+Wed Aug 16 00:13:22 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * signal.c (sig_beg): デフォルトではbegin節の中でだけSIGINTを捕捉
+ するように変更.
+
+ * io.c (io_ctl): fcntlを持たないシステムにも対応.
+
+ * 各ディレクトリに分散していたMANIFESTをまとめた.拡張モジュール毎
+ には必要.
+
+ * string.c (Sstr_new,str_sub,Fstr_crypt): 引数を自動的に文字列に変
+ 換するように.
+
+Sat Aug 12 00:44:02 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * string.c (Fstr_crypt): PD cryptを用意した.
+
+Fri Aug 11 14:37:03 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * assoc.c (Fassoc_clone): assocもcloneできるように.
+
+ * io.c: マクロREAD_DATA_PENDINGの定義を変更(Linux対応)
+
+ * io.c (io_fptr_finalize): fptrの開放時の処理を指定できるように.
+
+Wed Aug 9 16:52:41 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * eval.c (rb_provided): 複数のfeatureをロードすると無限ループに落
+ ちるという単純な(しかし凶悪な)ミス.
+
+ * ext/extmk.rb.in (install): dlopen対応を行った.今までdlnにしか十
+ 分に対応していなかった.
+
+Tue Aug 8 14:17:06 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.83
+
+Mon Aug 7 12:47:41 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * parse.y: resque -> rescue.恥ずかしいがtypoを残しておくわけには
+ いかないよなあ.なんで今まで気がつかなかったのか….
+
+Thu Aug 3 18:18:05 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * missing/nt.c: NT移植用の関数群をまとめた.
+
+ * variable.c (rb_const_get): また例外を発生するようにした.defined
+ がある以上例外を発生させない理由がないので(例外が発生した方がタ
+ イプミスの検出などの点で有利).
+
+ * variable.c (Fautoload): autoloadを実装.今度は使えるか.
+
+Mon Jul 31 15:44:21 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * parse.y (arg_ambiguous): 第1引数のあいまいさを警告(-vオプション
+ で有効).
+
+ * eval.c (rb_eval): `-v'オプションをつけて`def'が呼ばれると不必要
+ なエラーメッセージが出た.
+
+ * parse.y (yylex): メソッドの第1引数の判定をもうちょっと賢くした.
+
+Fri Jul 28 19:04:43 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * parse.y (yylex): `+/-/['の直前に空白が来るかどうかで動作を変更し
+ た(混乱のもとか?)
+
+Wed Jul 26 09:21:23 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.82a
+
+ * sprintf.c (Fsprintf): `%s'で'\0'を含む文字列に対応.
+
+ * pack.c (Fpck_pack): packの要素確保のバグ.
+
+ * eval.c (Floop): 無限ループのイテレータ.
+
+ * io.c (next_argv): 存在しないファイル名が指定された時のエラー処理
+ が行われていなかった.
+
+Mon Jul 24 17:37:34 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.82
+
+ * ext/extmk.rb.in (install): 拡張モジュールをstatic linkする場合は
+ そのモジュールが既にrequireされたのと同じようにfeatureを設定する.
+ これで拡張モジュールの機能が必要な時には(static linkされているか
+ どうかにかかわらず)requireすればよくなる.
+
+ * eval.c (Frequire): `$"'に格納する文字列をフルパスでなくフィーチャ
+ 名とする.rubyスクリプトをロードした時には`.rb',オブジェクトを
+ ロードした時には`.o'をフィーチャ名に付加する.lispのrequireと
+ provideの働きに(少し)近い.
+
+Thu Jul 20 12:50:05 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * Makefile.in (test): make testができるように.
+
+ * struct.c (struct_new): typo.
+
+ * eval.c (rb_eval): `defined'を追加.メソッド/変数/定数の定義状態
+ を知る事が出来る.
+
+Wed Jul 19 18:04:01 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.81
+
+Mon Jul 17 14:53:51 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * variable.c (rb_const_get): 未初期化のCONSTANTの値をnilにした.し
+ かし,今後また例外に戻す可能性はある.要はoptionalなクラス/モジュー
+ ルが存在するかチェックしたいだけなんだな.
+
+ * st.c (int): grow_factorを固定にした(大嶋さんのマシンに対応).
+
+Fri Jul 14 00:48:40 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * ext/extmk.rb.in: キャッシュのバグを修正.
+
+ * parse.y (var_extend): #{$数字}に対応した.
+
+ * dln.c (dln_load_1): `Init_FILENAME'だけを有効に.`init_*'は今後
+ 実行しない.
+
+ * ext/etc/etc.c : Etcモジュールを拡張モジュールとして分離.実はNT
+ 対応への布石だったりするかもしれない.
+
+Tue Jul 11 17:12:48 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * gcc -Wallで出たwarningを元にソースを変更.
+
+ * signal.c (trap): typo.
+
+Fri Jul 7 10:08:51 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.80
+
+ * ruby.texi: texinfo documentを提供.specとruby.1は無くなった.
+
+ * signal.c (Ftrap): 割込み禁止中の例外発生に対応.
+
+ * eval.c (Flambda): Blockオブジェクトを返す.Block.newと同義.
+
+Thu Jul 6 00:35:03 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * signal.c (Ftrap): SIG_DFLの処理を変更.SIGINTへのデフォルトハン
+ ドラを用意(例外を発生する).
+
+ * file.c (Sfile_expand_fname): パス名を絶対パスに展開するメソッド.
+ (Sfile_basename): basenameを得るメソッド.拡張子も外せる.
+ (Sfile_dirname): basenameの反対.
+
+ * eval.c (rb_call): argument評価中の例外発生に対応.
+
+ * file.c (Ftest): `M', `A', `C'を追加.
+
+Tue Jul 4 12:36:33 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * file.c (Ftest): ファイルテスト用メソッド.
+
+ * ruby.c (proc_options): `-r'オプションを追加.
+
+ * parse.y (f_args): デフォルト引数を追加.
+
+ * eval.c (rb_call): 該当する引数が無い時,rest引数の値をnilに.
+
+ * numeric.c (num_equal): 数値以外との比較で例外が発生していた.
+ FALSEを返すように.
+
+ * eval.c (masign): 多重代入のrest部の動作がおかしかった.
+
+Sat Jun 17 01:03:16 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * parse.y (gettable): 未初期化のローカル変数の参照(独立した識別子)
+ は正式にメソッド呼び出しとした.
+
+ * parse.y (read_escape): tokenbufを使わないように修正.それにとも
+ ない,`\C-x',`\M-x'などのエスケープ表現を復活.これでドキュメン
+ トと実際の処理系が一致した.
+
+Thu Jun 15 15:42:00 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * re.c (re_regcomp): cacheのチェックを改善.
+
+Mon Jun 12 18:50:51 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 0.79
+
+Sat Jun 10 00:25:01 1995 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * re.c (re_regcomp): cache判定に`$='の値も反映させた.
+
+ * sample/test.rb: test suite作成.
+
+Fri Jun 9 15:58:34 1995 Yukihiro Matsumoto <matz@ix-02>
+
+ * re.c (re_regcomp): cacheの判定が間違っていた.
+
+Fri Jun 9 00:01:35 1995 Yukihiro Matsumoto (matz@dyna)
+
+ * eval.c (rb_yield): block構造体に初期化していないメンバ(iter)があっ
+ たのでイテレータのネストが正しく動作しなかった.
+
+Thu Jun 8 00:59:03 1995 Yukihiro Matsumoto (matz@dyna)
+
+ * re.c (=~): String以外との比較がFALSEを返すように(例外を発生して
+ いた).
+
+ * extmk.rb.in: 判定した値をファイルにキャッシュするようにした.
+
+ * assoc.c (to_a): to_aメソッドが再定義されていなかった.
+
+ * eval.c (rb_eval): 初期化されていないローカル変数へのアクセスを引
+ 数の無いメソッド呼び出しと解釈する.ただし,(現状では)メソッドが
+ 定義されていない場合,エラーにせず変数未初期化のwaringを出して
+ nilを返している.「ruby -pe print」などが実行できるという意味で
+ はありがたいこの仕様は,しかし今後の検討が必要である.-- メソッ
+ ド呼び出しとするのを止めるか(以前の仕様),いつもメソッド呼び出し
+ とする(未定義ならばエラー)か,今の仕様で行くか.
+
+ * eval.c (rb_eval): 初期化されていないローカル変数へのアクセスで
+ (evalなどで)初期化された事が分かった時には以後初期化されたローカ
+ ル変数とみなす.
+
+Wed Jun 7 11:58:12 1995 Yukihiro Matsumoto <matz@ix-02>
+
+ * eval.c (rb_fail): 例外処理後も`$!'をクリアしないように.
+ (rb_fail): `$!'変数に最後に改行を追加しない.
+
+ * io.c (Fprint): privateメソッドに変更.引数を取らない時の動作を変
+ 更(`$_'を出力する).
+ (Fio_print): 出力先指定のprintメソッド.
+ (Fio_printf): 出力先指定のprintfメソッド.
+
+ * parse.y: not演算子の追加.優先順位の低い`!'演算子.
+
+Mon Jun 5 19:00:55 1995 Yukihiro Matsumoto <matz@ix-02>
+
+ * version 0.78
+
+Fri Jun 2 17:52:03 1995 Yukihiro Matsumoto <matz@ix-02>
+
+ * ruby.c (proc_options): -Iオプションで`$:'への追加される順番を修
+ 正した.
+
+Fri Jun 2 00:36:34 1995 Yukihiro Matsumoto (matz@dyna)
+
+ * parse.y: while修飾子の動作を通常のwhileと同じにした.ただし,
+ begin式へのwhile修飾子だけはdo..while型のループとなる.
+
+Wed May 31 18:36:30 1995 Yukihiro Matsumoto <matz@ix-02>
+
+ * version 0.77
+
+Mon May 29 18:39:37 1995 Yukihiro Matsumoto <matz@ix-02>
+
+ * ext/extmk.rb.in (install): 拡張モジュールもインストールできるよ
+ うに.
+
+Fri May 26 14:43:01 1995 Yukihiro Matsumoto <matz@ix-02>
+
+ * process.c (Fsystem): 戻り値をサブプロセスの失敗/成功を表す真偽値
+ にした.終了ステータスは`$?'で得る.
+
+Tue May 23 10:58:11 1995 Yukihiro Matsumoto <matz@ix-02>
+
+ * string.c (Fstr_upto): 無限ループに陥らないように.
+
+ * parse.y (cond): `||'などの右辺に制御式が書けるように,条件式がか
+ ならずしも値を持たなくても良いようにした.
+
+ * ext/marshal/marshal.c: オブジェクトの読み書きをメソッドの再定義
+ でコントロールできるように.インスタンスが`_dump_to'というメソッ
+ ドを定義している時はそちらを使うように.
+
+ * ext/extmk.rb.in: static linkも設定できるような仕様にした.
+ ext/Setupというファイルにディレクトリ名を記述するとそのディレク
+ トリに存在するモジュールはstatic linkされる(はず).
+
+ * eval.c (rb_eval): `..'を文法に組み込み,`..'と`...'の動作をperl
+ に合わせた.
+
+Sat May 20 01:22:48 1995 Yukihiro Matsumoto (matz@dyna)
+
+ * io.c (select): timeout時と割込み時の動作の明確化.
+
+Fri May 19 15:33:23 1995 Yukihiro Matsumoto <matz@ix-02>
+
+ * version 0.76
+
+Fri May 19 00:48:08 1995 Yukihiro Matsumoto (matz@dyna)
+
+ * string.c (Fstr_each): イテレータブロック中で文字列の変更が行われ
+ たかどうかをチェック.ポインタの値が変わっていれば例外を発生する.
+
+ * ruby-mode.el: ruby-electric-braceの新設.
+
+Thu May 18 12:27:23 1995 Yukihiro Matsumoto <matz@ix-02>
+
+ * string.c (Fstr_tr): trの置換対象に`\0'を含む時に正しく置換を行わ
+ ないバグがあった.更に置換文字列をASCII順に指定しないと動作しな
+ い問題もあった.結果としてtrを書き換えたので,copyrightの問題は
+ 無くなった(と思う).
+
+ * gc.c (gc): the_scopeをマークしていなかったので,ローカル変数の指
+ しているオブジェクトが間違って開放される場合があった.
+
+ * gc.c (mark_locations_array): 若干の高速化.
+
+Mon May 15 11:43:49 1995 Yukihiro Matsumoto <matz@ix-02>
+
+ * ext/extmk.rb.in: Dynamic Loadモジュールのコンパイル用チェックを
+ 行うruby script.autoconfに近い感覚で使える.新しいモジュールを
+ 提供したい人はextの下にディレクトリを作るだけで良い.必須のファ
+ イルはファイル名の一覧を記録した`MANIFEST'というファイルのみ.必
+ 要に応じて`depend'(ファイルの依存関係を記述するファイル gcc -MM
+ の出力),`extconf.rb'(コンパイル用にライブラリと関数の存在チェッ
+ クするファイル)を用意できる.
+
+ * eval.c (rb_call): rubyメソッドの引数チェック時に未初期化の
+ jmp_bufを使用していた.
+
+ * parse.y: `or'と`and'の優先順位を同じにした.
+
+Wed May 3 18:21:36 1995 Yukihiro Matsumoto (matz@dyna)
+
+ * dln.c: Linuxでは`__.SYMDEF/'であった.
+
+ * dln.c: system callのエラーチェックを忘れていた.
+
+Wed Apr 26 09:50:56 1995 Yukihiro Matsumoto (matz@ix-02)
+
+ * parse.y: イテレータブロックの変数宣言を`|'で括るようにした.これ
+ でイテレータ変数がない時は宣言そのものを省略できる.文法の変更は
+ 久しぶりだ.
+
+Tue Apr 25 12:04:17 1995 Yukihiro Matsumoto (matz@ix-02)
+
+ * eval.c(require): loadからダイナミックロードの機能を移してきた.
+ さらに拡張子の補完機能を追加してユーザがdln/dlopenの差を意識する
+ 必要のないようにした.
+
+ * string.c(sub,sub): イテレータとしても動作するように.
+
+ * object.c: init_object -> initialize.
+
+Mon Apr 24 14:22:39 1995 Yukihiro Matsumoto (matz@ix-02)
+
+ * NEWS-OS 3.4対応
+
+ * io.c: Solarisのstdioの動作が違うようだ.signalでEOFを返してしま
+ う….perlでも同様の問題がある.
+
+Fri Apr 21 20:04:39 1995 Yukihiro Matsumoto (matz@ix-02)
+
+ * version 0.75
+
+ * signal.c: trapがなくなっていた.うーむ.
+
+ * configure: Solaris 2.3対応.
+
+ * io.c: #elifのないcppもある.
+
+ * dir.c: autoconf 2.xへの対応が不十分
+
+Thu Apr 20 12:31:24 1995 Yukihiro Matsumoto (matz@ix-02)
+
+ * version 0.74
+
+ * env.h, gc.c, regex.c: IRIXへの移植対応
+
+ * configure: dlopen用にpicを生成するoptionの検出のため,システムタ
+ イプをチェックするように.
+
+Tue Apr 18 19:08:17 1995 Yukihiro Matsumoto (matz@ix-02)
+
+ * gc.c(xrealloc): ptr=nilの時,malloc()と同じ働きを
+
+ * array.c(astore): 空の配列の0番目の要素に代入するとsize=0で
+ realloc()を呼んでいた.
+
+ * configure, glob.c: Solaris 2.xでコンパイルできるように
+
+Mon Apr 10 18:36:06 1995 Yukihiro Matsumoto (matz@ix-02)
+
+ * version 0.73
+
+Fri Apr 7 13:51:08 1995 Yukihiro Matsumoto (matz@ix-02)
+
+ * cons.c->assoc.c: consの余計な機能は外してpairとしての機能だけを
+ 残した.Enumerableをincludeするのもやめた.
+
+ * string.c(esub): 文字列置換イテレータ.perlのs///eの相当する.
+
+Wed Apr 5 11:35:21 1995 Yukihiro Matsumoto (matz@ix-02)
+
+ * version 0.72
+
+ * EWS4800対応
+
+ * file.c: utimesがない時はutimeを使うように.
+
+Mon Apr 3 15:19:41 1995 Yukihiro Matsumoto (matz@ix-02)
+
+ * version 0.71
+
+ * regexp.c(re_match): バグがあった.match_2を削除した時にenbugして
+ いたのだった.
+
+Mon Mar 27 15:41:43 1995 Yukihiro Matsumoto (matz@ix-02)
+
+ * dict.c: Dict->Hashに全面的に移行.
+
+Thu Mar 23 20:30:00 1995 Yukihiro Matsumoto (matz@ix-02)
+
+ * dbm.c,socket.c: extディレクトリに分離.
+
+ * configure: dln周りのチェックの強化
+
+ * dln.c: initの呼び出しをdlopen()版に合わせた.
+
+Mon Mar 20 17:45:08 1995 Yukihiro Matsumoto (matz@ix-02)
+
+ * configure: autoconf 2.2に対応(一部).
+
+Fri Mar 17 15:56:44 1995 Yukihiro Matsumoto (matz@ix-02)
+
+ * dln.c: dlopenのあるマシンではそちらを使うように.ただし,ちゃん
+ と動いているかどうかは自信がない.
+
+ * regex.c: virtual concatinationをやめた.
+
+Thu Mar 16 11:32:57 1995 Yukihiro Matsumoto (matz@ix-02)
+
+ * version 0.70
+
+ * eval.c,regex.c: gccでのコンパイルエラー.
+
+ * io.c: inplace-editで拡張子が指定されない場合,もとのファイルを削
+ 除する.
+
+Wed Mar 15 14:59:18 1995 Yukihiro Matsumoto (matz@ix-02)
+
+ * version 0.69
+
+ * eval.c(method_missing): unknownから名称変更.
+
+ * eval.c(single_method_added): 特異メソッドが定義された時に呼ばれ
+ るメソッド.hookとして使える.実際に定義される直前に呼ばれる.
+
+Tue Mar 14 14:46:44 1995 Yukihiro Matsumoto (matz@ix-02)
+
+ * ruby.c(proc_options): 引数の解析を自分でやることにより引数指定の
+ 方法がperlに近付いた.getopt_longはもう使わない.
+
+ * dir.c(glob): `{}'のネストを許すようにした.
+
+Mon Mar 13 17:56:25 1995 Yukihiro Matsumoto (matz@ix-02)
+
+ * glob.c: Glob(ワイルドカードオブジェクト)はなくなった.ワイルドカー
+ ドの展開はDir.glob(文字列)を使う.ワイルドカードのマッチは正規表
+ 現で代用.
+
+Fri Mar 10 18:35:46 1995 Yukihiro Matsumoto (matz@ix-02)
+
+ * eval.c: Mathのようなモジュールは自分自身でextendする.
+
+ * eval.c: クラスやモジュールを定義する時,既に同名のものがあれば追
+ 加定義となるように.ただし.superクラスの違いなどはチェックする.
+
+ * regex.c: debug.
+
+ * math.c: 定数PIとEを定義.
+
+Thu Mar 9 21:35:12 1995 Yukihiro Matsumoto (matz@ix-02)
+
+ * regex.c: EUC,SJISモードでは0x80以上の8進,16進リテラルを禁止.
+
+ * regex.c: クラス内でも数値リテラル・文字クラスが使えるようした.
+
+Wed Mar 8 17:39:05 1995 Yukihiro Matsumoto (matz@ix-02)
+
+ * regex.c: \200など括弧の数以上の表現は8進リテラルと解釈する.ただ
+ し,\1から\9までは例外.
+
+ * regex.c: \9以上のリファレンスも有効にした.
+
+Tue Mar 7 14:26:01 1995 Yukihiro Matsumoto (matz@ix-02)
+
+ * eval.c(public/private): スコープ制御メソッドの名称変更.静的なア
+ クセスも出来るようにしてみたが,不採用.
+
+Mon Mar 6 19:34:32 1995 Yukihiro Matsumoto (matz@ix-02)
+
+ * eval.c(inlcude): メソッド化.動的にモジュールをインクルードでき
+ るように.さらに任意のオブジェクトにもモジュールをインクルードで
+ きるメソッド `extend'も用意した.
+
+ * parse.y: 文法からincludeを削除.メソッド化.
+
+Tue Feb 28 15:35:10 1995 Yukihiro Matsumoto (matz@ix-02)
+
+ * parse.y: 配列,連想配列の最後に`,'をおけるように.
+
+Fri Feb 24 13:15:43 1995 Yukihiro Matsumoto (matz@ix-02)
+
+ * version 0.68
+
+Thu Feb 23 11:19:19 1995 Yukihiro Matsumoto (matz@ix-02)
+
+ * eval.c: resque節のselfの値が間違っていた.
+
+ * eval.c(rb_clear_cache): キャッシュのクリアし忘れがあった.
+
+ * eval.c: 定数のスコープをクラス内の静的スコープに変更した.これに
+ よって,特異メソッドから参照される定数は,レシーバのクラスではな
+ く,定義されたスコープのクラスの定数となる.
+
+Wed Feb 22 00:51:38 1995 Yukihiro Matsumoto (matz@dyna)
+
+ * regex.c: ignorecaseを正規表現のコンパイル前に指定しないと正しく
+ 動作しない.修正.
+
+ * string.c(toupper,tolower): bug fix.
+
+ * ENV,VERSION: readonly変数から定数へ.
+
+Tue Feb 21 18:56:56 1995 Yukihiro Matsumoto (matz@ix-02)
+
+ * io.c(STDIN, STDOUT, STDERR): 定数として定義.
+
+ * io.c(select): bug fix.
+
+ * version 0.67
+
+Mon Feb 20 16:10:14 1995 Yukihiro Matsumoto (matz@ix-02)
+
+ * parse.y(yylex): 定数を`%識別子'から,第1文字が大文字の識別子に変
+ 更.それにともないクラスは定数となった.
+
+ * eval.c: クラス定義内のselfがクラス定義外部のthe_classだった.
+
+ * variable.c(rb_name_class): クラス名をインスタンス変数に格納する.
+
+Thu Feb 16 15:36:17 1995 Yukihiro Matsumoto (matz@ix-02)
+
+ * parse.y: BLOCKをbraceで表現する文法に変更したものを作ってみる.
+ MLに提示してみるが反応がない.
+
+ * object.c(do,forever): なくした.
+
+Wed Feb 15 13:20:49 1995 Yukihiro Matsumoto (matz@ix-02)
+
+ * re.c(new): 第2引数が与えられて,かつnilでないときだけ設定するよ
+ うに(以前はnilの時にも設定を行なっていた).
+
+ * parse.y(parse_regexp): 正規表現リテラルで大文字小文字を無視する
+ かどうか指定できるように.
+
+Tue Feb 14 00:55:33 1995 Yukihiro Matsumoto (matz@dyna)
+
+ * parse.y: (compexpr) -> (expr).
+
+Fri Feb 10 16:30:00 1995 Yukihiro Matsumoto (matz@ix-02)
+
+ * ruby.c(load_file): scriptを読み込む時だけ"#!"の解析を行うように.
+
+ * ruby.c(readin): ファイル読み込み時に先頭に"#!"があり,その行が
+ "ruby"という文字列を含む時,rubyに引数が与えられていれば,その引
+ 数も有効になる.
+
+ * parse.y(yylex): コメント行の終りが`\'であった時,次の行に継続し
+ ているとみなすようにした.
+
+Thu Feb 9 16:18:37 1995 Yukihiro Matsumoto (matz@ix-02)
+
+ * version 0.66
+
+ * parse.y: protectをbeginに変更.begin..endは例外処理だけでなく,
+ 文括弧としても働くことになった.
+
+Wed Feb 1 19:48:24 1995 Yukihiro Matsumoto (matz@ix-02)
+
+ * version 0.65
+
+ * string.c(str_replace): 置き換える文字列の長さが等しい時メモリコ
+ ピーをしない.
+
+ * string.c(rindex): バグ修正.
+
+Mon Jan 30 11:23:05 1995 Yukihiro Matsumoto (matz@ix-02)
+
+ * parse.y(value_expr): ifのチェックを追加.
+
+ * gc.c(gc_mark): free cellの扱いにバグ.
+
+ * parse.y: 文法の変更(よりシンプルに).例外を減らした.
+
+Thu Jan 26 00:52:55 1995 Yukihiro Matsumoto (matz@dyna)
+
+ * parse.y: 引数として連想配列を置くことができるように.この場合,
+ 連想配列リテラルが最終引数となる.
+
+ * parse.y: 配列参照の`[]'内が空でもよいことにした.
+
+Tue Jan 24 14:45:15 1995 Yukihiro Matsumoto (matz@ix-02)
+
+ * class.c(rb_include_module): `-v'を指定した時にはincludeしたモジュー
+ ルとクラス定数が衝突していないかチェックする.
+
+Mon Jan 23 10:42:09 1995 Yukihiro Matsumoto (matz@ix-02)
+
+ * parse.y(rb_class2name): メタクラスに関するbug fix.
+
+ * dict.c: Dict[..]で辞書の生成が出来るように.
+
+ * array.c: Array[..]で配列の生成が出来るように.
+
+ * parse.y: 辞書の表現として{a,b,..}という形式も許すように.
+
+Fri Jan 20 10:28:38 1995 Yukihiro Matsumoto (matz@ix-02)
+
+ * re.c(Regexp.quote): 正規表現をエスケープするメソッド.
+
+ * 無駄なrb_intern()を減らした.
+
+ * parse.y: `!', `!=', `!~'を特殊演算子にする.よってこれらは再定義
+ できなくなった.
+
+Wed Jan 18 13:20:41 1995 Yukihiro Matsumoto (matz@ix-02)
+
+ * parse.y: 文法の整理(unless,untilをなくした).
+
+Tue Jan 17 11:11:27 1995 Yukihiro Matsumoto (matz@ix-02)
+
+ * eval.c: defでメソッド再定義時にはスーパークラスのメソッドの可視
+ 性を継承する.最初の定義の時は今までと同じデフォルト(トップレベ
+ ルで関数的,クラス定義内で通常メソッド).
+
+ * object.c(Class#new): オブジェクトの生成時に関数的メソッド
+ init_objectが必ず呼ばれるように変更.
+
+ * eval.c: 未定義のメソッドに対してunknownメソッドが呼ばれるように
+ なった.エラー表示が今までと同じになるようにenvを調節している.
+
+Fri Jan 13 14:40:30 1995 Yukihiro Matsumoto (matz@ix-02)
+
+ * gc.c: gcを若干書き換えて整理した.が,あまり変化はなかったようだ.
+
+ * parse.y(yylex): symbolを\symから:symに変更した.
+
+Thu Jan 12 01:39:28 1995 Yukihiro Matsumoto (matz@dyna)
+
+ * eval.c: 新規関数 rb_eval_string().
+
+ * gc.c: gc_mark()を一部非再帰化.
+
+ * variable.c(rb_ivar_{get,set}): インスタンス変数のアクセス周りで
+ チェックが足りなかった.
+
+ * variable.c: クラス定数とインスタンス変数でハッシュテーブルを共有
+ するようにした.
+
+ * ruby.h: iv_tblをRBasicからRObjectとRClassへ移動した.これにより,
+ ObjectとClass,Moduleしかインスタンス変数を持てなくなる.が,メモ
+ リ効率は若干向上する.
+
+Tue Jan 10 00:58:20 1995 Yukihiro Matsumoto (matz@dyna)
+
+ * 0.64 released
+
+ * eval.c: レシーバと引数は常にiterではない.
+
+ * cons.c(aref,aset): negative offset対応.
+
+Mon Jan 9 14:40:39 1995 Yukihiro Matsumoto (matz@ix-02)
+
+ * parse.y: foo{..}の形式において,fooをローカル変数やクラス名では
+ なく,引数なしの関数型メソッド呼び出しとみなすようにした.
+
+ * list.c -> cons.c: 名称変更(クラス名も).
+
+ * list.c: a::b::c::nilをリスト(a b c)とみなすlisp形式から,a::b::c
+ をリスト(a b c)とみなすruby形式に変更.[], []=, eachもそれに会わ
+ せた仕様とする.
+
+ * list.c: consペアとしての機能を強調.仕様変更.
+
+Sat Jan 7 01:26:26 1995 Yukihiro Matsumoto (matz@dyna)
+
+ * eval.c: 自己代入の不具合修正.
+
+ * eval.c(masign): 多重代入が配列もリストもとれるようにした.
+
+ * list.c: assocを2要素の配列からList(CONSペア)に変更した.
+
+Fri Jan 6 13:42:12 1995 Yukihiro Matsumoto (matz@ix-02)
+
+ * parse.y: a[b]+=cやa.b+=cなどの自己代入形式で,aやbを2度評価しな
+ くなった.
+
+ * eval.c: iterator設定のバグフィックス.
+
+ * list.c: Listクラスを新設.
+
+Thu Jan 5 13:55:00 1995 Yukihiro Matsumoto (matz@ix-02)
+
+ * parse.y: SCOPEのメモリリークをなくした.
+
+ * eval.c: built-inメソッドへの引数の引き渡し方を変更して,配列の生
+ 成数を減らした.
+
+ * re.c: match-dataを毎回生成することをやめた.`$~'をアクセスした時
+ にon-demandで生成する.
+
+ * string.c etc: 不必要なmemmoveをmemcpyに置換.
+
+ * parse.y: =~, !~は副作用があるのでコンパイル時に展開できない.
+
+Tue Jan 3 02:04:36 1995 Yukihiro Matsumoto (matz@dyna)
+
+ * eval.c: rest引数のbug fix.
+
+ * eval.c,gc.c: scopeをオブジェクトにした.
+
+ * eval.c: envとscopeの扱いを変更した.
+
+Wed Dec 28 09:46:57 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * parse.y: evalでローカル変数が追加された場合に対応した.
+
+ * parse.y: 演算子を含むaliasのbug fix.
+
+Tue Dec 27 16:45:20 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * parse.y: def A Bをalias A Bに変更.
+
+ * eval.c: alias関係のbug修正.nodeをオブジェクト化した時にenbugし
+ たようだ.
+
+ * signal.c: システムコールの再定義を止めた.
+
+ * io.c(select): write/exceptのフラグ設定にバグ.
+
+ * Makefile.in: static link用オプションをMake変数として独立させた.
+
+Tue Dec 20 00:46:19 1994 Yukihiro Matsumoto (matz@dyna)
+
+ * 0.63 released
+
+ * eval.c(rb_call): superの呼び出しで落ちる.argc, argvの設定を忘れ
+ ていた.
+
+ * parse.y(read_escape): 展開エラー.
+
+ * variable.c: 定義済みの変数のhookを変更しないように.
+
+Mon Dec 19 12:01:10 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * parse.y(cond): 条件式に代入式が置かれた場合,`-v'オプションで警
+ 告が出るように.
+
+ * parse.y(**): 冪乗演算子`**'の優先順位を単項演算子より高くした.
+
+ * parse.y(and,or): 優先順位の低い演算子`and', `or'.
+
+ * 0.62 released.
+
+ * eval.c: 不必要になったPUSH_ENV, POP_ENVを減らした.
+
+ * env.h: ENVIONからselfをはずした.PUSH_ENVはsuperの準備のためだけ
+ に用いることにした.
+
+ * eval.c: 下記のオブジェクト化で遅くなった実行速度をもとに戻した.
+
+Mon Dec 17 23:01:10 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * eval.c: env.{argv,argc}とscope.local_varsのオブジェクト化.
+
+ * eval.c: 1スコープ内で複数Blockを生成したときのバグを修正.
+
+Fri Dec 16 15:52:06 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * parse.y: `&&'と`||'の両辺はいつでも条件式とした.
+
+Thu Dec 15 00:16:04 1994 Yukihiro Matsumoto (matz@dyna)
+
+ * eval.c(Block): Blockオブジェクトを実現.
+
+ * node.h: NODE_QLISTはなくなった.
+
+ * eval.c(rb_call): 引数への代入を名前で一つずつ代入するのをやめて,
+ 一度にコピーするようにした.
+
+ * eval.c(rb_call): rubyで記述されたメソッドへの引数渡しをinline化.
+
+ * eval.c: イテレータ判定処理の全面書き換え.不適切なイテレータ呼び
+ 出しをなくした.例えば「[foo(),bar()]{i|baz(i)}」でfooもbarもイ
+ テレータとして呼び出され*ない*.
+
+ * eval.c(rb_call): SCOPE処理をinline化.メソッド呼び出しの若干の高
+ 速化.
+
+Wed Dec 14 18:09:33 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * node.h: nodeもオブジェクトにする.よってGCで回収される.
+
+Thu Dec 8 14:17:29 1994 Yukihiro Matsumoto (matz@ix-02)
+
+ * 0.60 released - alpha test baseline.
diff --git a/doc/ChangeLog-1.8.0 b/doc/ChangeLog-1.8.0
index 07d7c6b165..0d00266735 100644
--- a/doc/ChangeLog-1.8.0
+++ b/doc/ChangeLog-1.8.0
@@ -1454,7 +1454,7 @@ Fri Jun 27 03:24:54 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
Thu Jun 26 21:34:49 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* class.c (class_instance_method_list): get rid of warning about
- arguement type mismatch, and inline method_list().
+ argument type mismatch, and inline method_list().
[ruby-core:01198]
Wed Jun 25 14:40:33 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
@@ -3361,7 +3361,7 @@ Fri Apr 11 02:41:35 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
Thu Apr 10 21:12:19 2003 Minero Aoki <aamine@loveruby.net>
- * lib/net/pop.rb: Exception line was accidentaly removed.
+ * lib/net/pop.rb: Exception line was accidentally removed.
[ruby-dev:19989]
Thu Apr 10 18:42:13 2003 Tadayoshi Funaba <tadf@dotrb.org>
@@ -5986,7 +5986,7 @@ Thu Nov 7 09:51:37 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
Wed Nov 6 16:57:06 2002 Yukihiro Matsumoto <matz@ruby-lang.org>
* class.c (rb_define_method): do not set NOEX_CFUNC if klass is
- really a module, whose methods must be safe for reciever's type.
+ really a module, whose methods must be safe for receiver's type.
* eval.c (rb_eval): nosuper should not be inherited unless the
overwritten method is an undef placeholder.
diff --git a/doc/ChangeLog-1.9.3 b/doc/ChangeLog-1.9.3
index b8e3162511..b3deb551b0 100644
--- a/doc/ChangeLog-1.9.3
+++ b/doc/ChangeLog-1.9.3